Improve error handling (M. Richter)
[u/mrichter/AliRoot.git] / PWGHF / Makefile
CommitLineData
f4545ac7 1# $Id$
2
3PACKAGE = PWGHF
4
5include Makefile.arch
6
7ALICEINC = -I.
8
9### define include dir for local case and par case
10ifneq ($(ESD_INCLUDE),)
11 ALICEINC += -I../$(ESD_INCLUDE)
12 ifneq ($(STEERBase_INCLUDE),)
13 ALICEINC += -I../$(STEERBase_INCLUDE)
14 endif
15 ifneq ($(CDB_INCLUDE),)
16 ALICEINC += -I../$(CDB_INCLUDE)
17 endif
18 ifneq ($(AOD_INCLUDE),)
19 ALICEINC += -I../$(AOD_INCLUDE)
20 endif
21 ifneq ($(ANALYSIS_INCLUDE),)
22 ALICEINC += -I../$(ANALYSIS_INCLUDE)
23 endif
24 ifneq ($(ANALYSISalice_INCLUDE),)
25 ALICEINC += -I../$(ANALYSISalice_INCLUDE)
26 endif
27 ifneq ($(CORRFW_INCLUDE),)
28 ALICEINC += -I../$(CORRFW_INCLUDE)
29 endif
3009475b 30 ifneq ($(CORRFW_INCLUDE),)
31 ALICEINC += -I../$(CORRFW_INCLUDE)
f4545ac7 32 endif
3009475b 33 ifneq ($(PWGHFvertexingHF_INCLUDE),)
34 ALICEINC += -I../$(PWGHFvertexingHF_INCLUDE)
35 endif
36 ifneq ($(PWGflowBase_INCLUDE),)
37 ALICEINC += -I../$(PWGflowBase_INCLUDE)
38 endif
39 ifneq ($(PWGflowTasks_INCLUDE),)
40 ALICEINC += -I../$(PWGflowTasks_INCLUDE)
41 endif
f4545ac7 42else
43 ifneq ($(ALICE_ROOT),)
1cd7bb2c 44 ALICEINC += -I$(ALICE_ROOT)/include -I$(ALICE_ROOT)/PWGHF/base -I$(ALICE_ROOT)/PWGHF/vertexingHF -I$(ALICE_ROOT)/PWGHF/hfe -I$(ALICE_ROOT)/PWG/FLOW/Base -I$(ALICE_ROOT)/PWG/FLOW/Tasks
3009475b 45 else
f4545ac7 46 endif
47endif
48
49SRCS = $(wildcard $(subst PWGHF,,$(PACKAGE))/*.cxx)
50HDRS = $(SRCS:.cxx=.h)
51DHDR = $(PACKAGE)LinkDef.h
52CXXFLAGS += $(ALICEINC) -g
53
54DHDR_PWGHF := $(DHDR)
55HDRS_PWGHF := $(HDRS)
56SRCS_PWGHF := $(SRCS) G__$(PACKAGE).cxx
57OBJS_PWGHF := $(SRCS_PWGHF:.cxx=.o)
58
59PARFILE = $(PACKAGE).par
60
61lib$(PACKAGE).so: $(OBJS_PWGHF)
62 @echo "Linking" $@ ...
63 @/bin/rm -f $@
f6815a36 64ifeq ($(PLATFORM),macosx)
65 $(LD) $(SOFLAGS) -flat_namespace -undefined suppress $(LDFLAGS) $^ $(OutPutOpt) $@ $(EXPLLINKLIBS)
66else
f4545ac7 67 $(LD) $(SOFLAGS) $(LDFLAGS) $^ $(OutPutOpt) $@ $(EXPLLINKLIBS)
f6815a36 68endif
f4545ac7 69 @chmod a+x $@
70 @echo "done"
71
72%.o: %.cxx %.h
73 $(CXX) $(CXXFLAGS) -c $< -o $@
74
75G__$(PACKAGE).cxx G__$(PACKAGE).h: $(HDRS) $(DHDR)
76 @echo "Generating dictionary ..."
77 rootcint -f $@ -c $(ALICEINC) $^
78
79clean:
80 @rm -f $(OBJS) *.so G__$(PACKAGE).* $(PARFILE)