cmake and linkdef changes for temporary dev task
[u/mrichter/AliRoot.git] / PWG / Makefile
CommitLineData
222034d3 1PACKAGE = invalid-only-for-proof
2
41f671ab 3include Makefile.arch
222034d3 4
5ifndef PACKCXXFLAGS
6 PACKCXXFLAGS = $(CXXFLAGS)
7endif
8
9ALICEINC = -I.
10
11### define include dir for local case and par case
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
24ifneq ($(ANALYSIS_INCLUDE),)
25 ALICEINC += -I../$(ANALYSIS_INCLUDE)
26endif
27
28ifneq ($(ANALYSISalice_INCLUDE),)
29 ALICEINC += -I../$(ANALYSISalice_INCLUDE)
30endif
31
32ifneq ($(EventMixing_INCLUDE),)
33 ALICEINC += -I../$(EventMixing_INCLUDE)
34endif
35
36ifneq ($(JETAN_INCLUDE),)
37 ALICEINC += -I../$(JETAN_INCLUDE)
38endif
39
40ifneq ($(JETANDEV_INCLUDE),)
41 ALICEINC += -I../$(JETANDEV_INCLUDE)
42endif
43
44ifneq ($(CORRFW_INCLUDE),)
45 ALICEINC += -I../$(CORRFW_INCLUDE)
46endif
47
60875c3c 48ifneq ($(PWGflowBase_INCLUDE),)
49 ALICEINC += -I../$(PWGflowBase_INCLUDE)
50endif
51
60875c3c 52ifneq ($(PWGflowTasks_INCLUDE),)
53 ALICEINC += -I../$(PWGflowTasks_INCLUDE)
54endif
55
ce44bc7a 56ifneq ($(PHOSUtils_INCLUDE),)
57 ALICEINC += -I../$(PHOSUtils_INCLUDE)
58 CXXFLAGS+=-D__PHOSUTIL__
59endif
60
61ifneq ($(EMCALUtils_INCLUDE),)
62 ALICEINC += -I../$(EMCALUtils_INCLUDE)
63 CXXFLAGS+=-D__EMCALUTIL__
64endif
65
66ifneq ($(PWGCaloTrackCorrBase_INCLUDE),)
67 ALICEINC += -I../$(PWGCaloTrackCorrBase_INCLUDE)
68endif
69
c092acfc 70ifneq ($(PWGEMCAL_INCLUDE),)
18fa5078 71 ALICEINC += -I../$(PWGEMCALTasks_INCLUDE)
c092acfc 72endif
73
222034d3 74# only if no par file was loaded before
75#ifeq ($(ALICEINC),-I.)
76 ifneq ($(ALICE_ROOT),)
77 ALICEINC += -I$(ALICE_ROOT)/include
78 ALICEINC += -I$(ALICE_ROOT)/ANALYSIS
f4545ac7 79 ALICEINC += -I$(ALICE_ROOT)/PWG/FLOW/Base
80 ALICEINC += -I$(ALICE_ROOT)/MUON
ce44bc7a 81 ALICEINC += -I$(ALICE_ROOT)/EMCAL
82 ALICEINC += -I$(ALICE_ROOT)/PHOS
222034d3 83 endif
84#endif
85
86CXXFLAGS += $(ALICEINC) -g
87
88SRCS = $(wildcard *.cxx)
89HDRS = $(SRCS:.cxx=.h)
90DHDR = $(PACKAGE)LinkDef.h
91
92DHDR_PWG := $(DHDR)
93HDRS_PWG := $(HDRS)
94SRCS_PWG := $(SRCS) G__$(PACKAGE).cxx
95OBJS_PWG := $(SRCS_PWG:.cxx=.o)
96
97PARFILE = $(PACKAGE).par
98
99lib$(PACKAGE).so: $(OBJS_PWG)
100 @echo "Linking" $@ ...
101 @/bin/rm -f $@
f2113d25 102 $(LD) $(SOFLAGS) $(LDFLAGS) $^ $(OutPutOpt) $@ $(PACKLDFLAGS) $(EXPLLINKLIBS)
222034d3 103 @chmod a+x $@
104 @echo "done"
105
f2113d25 106ifeq ($(PLATFORM),macosx)
107ROOTLIBDIR := $(shell $(RC) --libdir)
108ifeq ($(PACKAGE),PWGmuon)
109 PACKLDFLAGS = $(STEERBase_LIBS) $(ESD_LIBS) $(AOD_LIBS) $(ANALYSIS_LIBS) $(OADB_LIBS) $(CORRFW_LIBS) $(ANALYSISalice_LIBS) -L$(ROOTLIBDIR) -lXMLIO -lEG -lTreePlayer
110endif
111endif
112
222034d3 113%.o: %.cxx %.h
114 $(CXX) $(PACKCXXFLAGS) -c $< -o $@
115
116clean:
117 @rm -f $(OBJS_PWG) *.so G__$(PACKAGE).*
118
119G__$(PACKAGE).cxx G__$(PACKAGE).h: $(HDRS) $(DHDR)
120 @echo "Generating dictionaries ..." $(ALICEINC)
121 rootcint -f $@ -c $(CINTFLAGS) $(ALICEINC) $^