Generation of dictionaries and rootmaps with Root6
[u/mrichter/AliRoot.git] / PWG / Makefile
1 PACKAGE = invalid-only-for-proof
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 ($(JETANDEV_INCLUDE),)
41   ALICEINC += -I../$(JETANDEV_INCLUDE)
42 endif
43
44 ifneq ($(CORRFW_INCLUDE),)
45   ALICEINC += -I../$(CORRFW_INCLUDE)
46 endif
47
48 ifneq ($(PWGflowBase_INCLUDE),)
49   ALICEINC += -I../$(PWGflowBase_INCLUDE)
50 endif
51
52 ifneq ($(PWGflowTasks_INCLUDE),)
53   ALICEINC += -I../$(PWGflowTasks_INCLUDE)
54 endif
55
56 ifneq ($(PHOSUtils_INCLUDE),)
57   ALICEINC += -I../$(PHOSUtils_INCLUDE)
58   CXXFLAGS+=-D__PHOSUTIL__
59 endif
60
61 ifneq ($(EMCALUtils_INCLUDE),)
62   ALICEINC += -I../$(EMCALUtils_INCLUDE)
63   CXXFLAGS+=-D__EMCALUTIL__
64 endif
65
66 ifneq ($(PWGCaloTrackCorrBase_INCLUDE),)
67   ALICEINC += -I../$(PWGCaloTrackCorrBase_INCLUDE)
68 endif
69
70 ifneq ($(PWGEMCAL_INCLUDE),)
71   ALICEINC += -I../$(PWGEMCALTasks_INCLUDE)
72 endif
73
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
79     ALICEINC += -I$(ALICE_ROOT)/PWG/FLOW/Base
80     ALICEINC += -I$(ALICE_ROOT)/MUON
81     ALICEINC += -I$(ALICE_ROOT)/EMCAL
82     ALICEINC += -I$(ALICE_ROOT)/PHOS
83   endif
84 #endif
85
86 CXXFLAGS += $(ALICEINC) -g
87
88 SRCS = $(wildcard *.cxx)
89 HDRS = $(SRCS:.cxx=.h)
90 DHDR = $(PACKAGE)LinkDef.h
91
92 DHDR_PWG := $(DHDR)
93 HDRS_PWG := $(HDRS)
94 SRCS_PWG := $(SRCS) G__$(PACKAGE).cxx
95 OBJS_PWG := $(SRCS_PWG:.cxx=.o)
96
97 PARFILE       = $(PACKAGE).par
98
99 lib$(PACKAGE).so: $(OBJS_PWG)
100         @echo "Linking" $@ ...
101         @/bin/rm -f $@
102         $(LD) $(SOFLAGS) $(LDFLAGS) $^ $(OutPutOpt) $@ $(PACKLDFLAGS) $(EXPLLINKLIBS)
103         @chmod a+x $@
104         @echo "done"
105
106 ifeq ($(PLATFORM),macosx)
107 ROOTLIBDIR     := $(shell $(RC) --libdir)
108 ifeq ($(PACKAGE),PWGmuon)
109    PACKLDFLAGS = $(STEERBase_LIBS) $(ESD_LIBS) $(AOD_LIBS) $(ANALYSIS_LIBS) $(OADB_LIBS) $(CORRFW_LIBS) $(ANALYSISalice_LIBS) -L$(ROOTLIBDIR) -lXMLIO -lEG -lTreePlayer
110 endif
111 endif
112
113 %.o:    %.cxx %.h
114         $(CXX) $(PACKCXXFLAGS) -c $< -o $@
115
116 clean:
117         @rm -f $(OBJS_PWG) *.so G__$(PACKAGE).*
118
119 G__$(PACKAGE).cxx G__$(PACKAGE).h: $(HDRS) $(DHDR)
120         @echo "Generating dictionaries ..." $(ALICEINC)
121         rootcint -f $@ -c $(CINTFLAGS) $(ALICEINC) $^