Removing obsolete module
[u/mrichter/AliRoot.git] / PWGJE / 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 ($(PWGBase_INCLUDE),)
45   ALICEINC += -I../$(PWGBase_INCLUDE)
46 endif
47
48 ifneq ($(PHOSUtils_INCLUDE),)
49   ALICEINC += -I../$(PHOSUtils_INCLUDE)
50   CXXFLAGS+=-D__PHOSUTIL__
51 endif
52
53 ifneq ($(EMCALUtils_INCLUDE),)
54   ALICEINC += -I../$(EMCALUtils_INCLUDE)
55   CXXFLAGS+=-D__EMCALUTIL__
56 endif
57
58 ifneq ($(EMCALbase_INCLUDE),)
59   ALICEINC += -I../$(EMCALbase_INCLUDE)
60 endif
61
62 ifneq ($(EMCALsim_INCLUDE),)
63   ALICEINC += -I../$(EMCALsim_INCLUDE)
64 endif
65
66 ifneq ($(EMCALrec_INCLUDE),)
67   ALICEINC += -I../$(EMCALrec_INCLUDE)
68 endif
69
70 ifneq ($(PWG4PartCorrBase_INCLUDE),)
71   ALICEINC += -I../$(PWG4PartCorrBase_INCLUDE)
72 endif
73
74 ifneq ($(PWG4PartCorrDep_INCLUDE),)
75  ALICEINC += -I../$(PWG4PartCorrBase_INCLUDE) 
76  ALICEINC += -I../$(PWG4PartCorrDep_INCLUDE)
77 endif
78
79 ifneq ($(PWG4GammaConv_INCLUDE),)
80   ALICEINC += -I../$(PWG4GammaConv_INCLUDE)
81 endif
82
83 ifneq ($(PWG4JetTasks_INCLUDE),)
84   ALICEINC += -I../$(PWG4JetTasks_INCLUDE)
85 endif
86
87 ifneq ($(JETAN_INCLUDE),)
88   ALICEINC += -I../$(JETAN_INCLUDE)
89 endif
90
91 ifneq ($(JETANDEV_INCLUDE),)
92   ALICEINC += -I../$(JETANDEV_INCLUDE)
93 endif
94
95 ifneq ($(PWG4JCORRAN_INCLUDE),)
96   ALICEINC += -I../$(PWG4JCORRAN_INCLUDE)
97 endif
98
99 # only if no par file was loaded before
100 #ifeq ($(ALICEINC),-I.)
101   ifneq ($(ALICE_ROOT),)
102     ALICEINC += -I$(ALICE_ROOT)/include
103     ALICEINC += -I$(ALICE_ROOT)/ANALYSIS
104     ALICEINC += -I$(ALICE_ROOT)/JETAN   # some extra includes
105     ALICEINC += -I$(ALICE_ROOT)/PHOS
106     ALICEINC += -I$(ALICE_ROOT)/EMCAL
107     ALICEINC += -I$(ALICE_ROOT)/PWG4/PartCorrBase
108   endif
109 #endif
110
111 CXXFLAGS += $(ALICEINC) -g
112
113 SRCS     = $(wildcard $(subst PWG4,,$(PACKAGE))/*.cxx)
114 HDRS     = $(SRCS:.cxx=.h)
115 DHDR     = $(PACKAGE)LinkDef.h
116
117 DHDR_PWG4 := $(DHDR)
118 HDRS_PWG4 := $(HDRS)
119 SRCS_PWG4 := $(SRCS) G__$(PACKAGE).cxx
120 OBJS_PWG4 := $(SRCS_PWG4:.cxx=.o)
121
122 PARFILE       = $(PACKAGE).par
123
124 lib$(PACKAGE).so: $(OBJS_PWG4)
125         @echo "Linking" $@ ...
126         @/bin/rm -f $@
127 ifeq ($(PLATFORM),macosx)
128 # We need to make both the .dylib and the .so
129                 $(LD) $(SOFLAGS)$@ $(LDFLAGS) $^ $(OutPutOpt) $@
130 ifneq ($(subst $(MACOSX_MINOR),,1234),1234)
131 ifeq ($(MACOSX_MINOR),4)
132                 ln -sf $@ $(subst .$(DllSuf),.so,$@)
133 else
134                 $(LD) -bundle -undefined $(UNDEFOPT) $(LDFLAGS) $^ \
135                    $(OutPutOpt) $(subst .$(DllSuf),.so,$@)
136 endif
137 endif
138 else
139 ifeq ($(PLATFORM),win32)
140                 bindexplib $* $^ > $*.def
141                 lib -nologo -MACHINE:IX86 $^ -def:$*.def \
142                    $(OutPutOpt)$(EVENTLIB)
143                 $(LD) $(SOFLAGS) $(LDFLAGS) $^ $*.exp $(LIBS) \
144                    $(OutPutOpt)$@
145 else
146                 $(LD) $(SOFLAGS) $(LDFLAGS) $^ $(OutPutOpt) $@ $(EXPLLINKLIBS)
147 endif
148 endif
149         @chmod a+x $@
150         @echo "done"
151
152 %.o:    %.cxx %.h
153         $(CXX) $(PACKCXXFLAGS) -c $< -o $@
154
155 clean:
156         @rm -f $(OBJS_PWG4) *.so G__$(PACKAGE).*
157
158 G__$(PACKAGE).cxx G__$(PACKAGE).h: $(HDRS) $(DHDR)
159         @echo "Generating dictionaries ..." $(ALICEINC)
160         rootcint -f $@ -c $(CINTFLAGS) $(ALICEINC) $^