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