Added OADB as external library dependency to ANALYSISalice. OADB will get automatical...
[u/mrichter/AliRoot.git] / PWG4 / Makefile
1 PACKAGE = PWG4JetTasks
2
3 include Makefile.arch
4
5 ifndef PACKCXXFLAGS
6    PACKCXXFLAGS = $(CXXFLAGS)
7 endif
8
9 ALICEINC = -I.
10
11 ### define include dir for local case and par case
12 ifneq ($(STEERBase_INCLUDE),)
13   ALICEINC += -I../$(STEERBase_INCLUDE)
14 endif
15
16 ifneq ($(ESD_INCLUDE),)
17   ALICEINC += -I../$(ESD_INCLUDE)
18 endif
19
20 ifneq ($(AOD_INCLUDE),)
21   ALICEINC += -I../$(AOD_INCLUDE)
22 endif
23
24 ifneq ($(ANALYSIS_INCLUDE),)
25   ALICEINC += -I../$(ANALYSIS_INCLUDE)
26 endif
27
28 ifneq ($(ANALYSISalice_INCLUDE),)
29   ALICEINC += -I../$(ANALYSISalice_INCLUDE)
30 endif
31
32 ifneq ($(EventMixing_INCLUDE),)
33   ALICEINC += -I../$(EventMixing_INCLUDE)
34 endif
35
36 ifneq ($(JETAN_INCLUDE),)
37   ALICEINC += -I../$(JETAN_INCLUDE)
38 endif
39
40 ifneq ($(CORRFW_INCLUDE),)
41   ALICEINC += -I../$(CORRFW_INCLUDE)
42 endif
43
44 ifneq ($(PHOSUtils_INCLUDE),)
45   ALICEINC += -I../$(PHOSUtils_INCLUDE)
46   CXXFLAGS+=-D__PHOSUTIL__
47 endif
48
49 ifneq ($(EMCALUtils_INCLUDE),)
50   ALICEINC += -I../$(EMCALUtils_INCLUDE)
51   CXXFLAGS+=-D__EMCALUTIL__
52 endif
53
54 ifneq ($(EMCALbase_INCLUDE),)
55   ALICEINC += -I../$(EMCALbase_INCLUDE)
56 endif
57
58 ifneq ($(EMCALsim_INCLUDE),)
59   ALICEINC += -I../$(EMCALsim_INCLUDE)
60 endif
61
62 ifneq ($(EMCALrec_INCLUDE),)
63   ALICEINC += -I../$(EMCALrec_INCLUDE)
64 endif
65
66 ifneq ($(PWG4PartCorrBase_INCLUDE),)
67   ALICEINC += -I../$(PWG4PartCorrBase_INCLUDE)
68 endif
69
70 ifneq ($(PWG4PartCorrDep_INCLUDE),)
71  ALICEINC += -I../$(PWG4PartCorrBase_INCLUDE) 
72  ALICEINC += -I../$(PWG4PartCorrDep_INCLUDE)
73 endif
74
75 ifneq ($(PWG4GammaConv_INCLUDE),)
76   ALICEINC += -I../$(PWG4GammaConv_INCLUDE)
77 endif
78
79 ifneq ($(PWG4JetTasks_INCLUDE),)
80   ALICEINC += -I../$(PWG4JetTasks_INCLUDE)
81 endif
82
83 ifneq ($(JETAN_INCLUDE),)
84   ALICEINC += -I../$(JETAN_INCLUDE)
85 endif
86
87 ifneq ($(PWG4JCORRAN_INCLUDE),)
88   ALICEINC += -I../$(PWG4JCORRAN_INCLUDE)
89 endif
90
91 # only if no par file was loaded before
92 #ifeq ($(ALICEINC),-I.)
93   ifneq ($(ALICE_ROOT),)
94     ALICEINC += -I$(ALICE_ROOT)/include
95     ALICEINC += -I$(ALICE_ROOT)/ANALYSIS
96     ALICEINC += -I$(ALICE_ROOT)/JETAN   # some extra includes
97     ALICEINC += -I$(ALICE_ROOT)/PHOS
98     ALICEINC += -I$(ALICE_ROOT)/EMCAL
99     ALICEINC += -I$(ALICE_ROOT)/PWG4/PartCorrBase
100   endif
101 #endif
102
103 CXXFLAGS += $(ALICEINC) -g
104
105 SRCS     = $(wildcard $(subst PWG4,,$(PACKAGE))/*.cxx)
106 HDRS     = $(SRCS:.cxx=.h)
107 DHDR     = $(PACKAGE)LinkDef.h
108
109 DHDR_PWG4 := $(DHDR)
110 HDRS_PWG4 := $(HDRS)
111 SRCS_PWG4 := $(SRCS) G__$(PACKAGE).cxx
112 OBJS_PWG4 := $(SRCS_PWG4:.cxx=.o)
113
114 PARFILE       = $(PACKAGE).par
115
116 lib$(PACKAGE).so: $(OBJS_PWG4)
117         @echo "Linking" $@ ...
118         @/bin/rm -f $@
119 ifeq ($(PLATFORM),macosx)
120 # We need to make both the .dylib and the .so
121                 $(LD) $(SOFLAGS)$@ $(LDFLAGS) $^ $(OutPutOpt) $@
122 ifneq ($(subst $(MACOSX_MINOR),,1234),1234)
123 ifeq ($(MACOSX_MINOR),4)
124                 ln -sf $@ $(subst .$(DllSuf),.so,$@)
125 else
126                 $(LD) -bundle -undefined $(UNDEFOPT) $(LDFLAGS) $^ \
127                    $(OutPutOpt) $(subst .$(DllSuf),.so,$@)
128 endif
129 endif
130 else
131 ifeq ($(PLATFORM),win32)
132                 bindexplib $* $^ > $*.def
133                 lib -nologo -MACHINE:IX86 $^ -def:$*.def \
134                    $(OutPutOpt)$(EVENTLIB)
135                 $(LD) $(SOFLAGS) $(LDFLAGS) $^ $*.exp $(LIBS) \
136                    $(OutPutOpt)$@
137 else
138                 $(LD) $(SOFLAGS) $(LDFLAGS) $^ $(OutPutOpt) $@ $(EXPLLINKLIBS)
139 endif
140 endif
141         @chmod a+x $@
142         @echo "done"
143
144 %.o:    %.cxx %.h
145         $(CXX) $(PACKCXXFLAGS) -c $< -o $@
146
147 clean:
148         @rm -f $(OBJS) *.so G__$(PACKAGE).*
149
150 G__$(PACKAGE).cxx G__$(PACKAGE).h: $(HDRS) $(DHDR)
151         @echo "Generating dictionaries ..." $(ALICEINC)
152         rootcint -f $@ -c $(CINTFLAGS) $(ALICEINC) $^