init the pid pointer when accessing checking the track-match, in case it was not...
[u/mrichter/AliRoot.git] / PWG / Makefile
1 PACKAGE = invalid-only-for-proof
2
3 include $(ROOTSYS)/test/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 # only if no par file was loaded before
49 #ifeq ($(ALICEINC),-I.)
50   ifneq ($(ALICE_ROOT),)
51     ALICEINC += -I$(ALICE_ROOT)/include
52     ALICEINC += -I$(ALICE_ROOT)/ANALYSIS
53   endif
54 #endif
55
56 CXXFLAGS += $(ALICEINC) -g
57
58 SRCS = $(wildcard *.cxx)
59 HDRS = $(SRCS:.cxx=.h)
60 DHDR = $(PACKAGE)LinkDef.h
61
62 DHDR_PWG := $(DHDR)
63 HDRS_PWG := $(HDRS)
64 SRCS_PWG := $(SRCS) G__$(PACKAGE).cxx
65 OBJS_PWG := $(SRCS_PWG:.cxx=.o)
66
67 PARFILE       = $(PACKAGE).par
68
69 lib$(PACKAGE).so: $(OBJS_PWG)
70         @echo "Linking" $@ ...
71         @/bin/rm -f $@
72 ifeq ($(PLATFORM),macosx)
73 # We need to make both the .dylib and the .so
74                 $(LD) $(SOFLAGS)$@ $(LDFLAGS) $^ $(OutPutOpt) $@
75 ifneq ($(subst $(MACOSX_MINOR),,1234),1234)
76 ifeq ($(MACOSX_MINOR),4)
77                 ln -sf $@ $(subst .$(DllSuf),.so,$@)
78 else
79                 $(LD) -bundle -undefined $(UNDEFOPT) $(LDFLAGS) $^ \
80                    $(OutPutOpt) $(subst .$(DllSuf),.so,$@)
81 endif
82 endif
83 else
84 ifeq ($(PLATFORM),win32)
85                 bindexplib $* $^ > $*.def
86                 lib -nologo -MACHINE:IX86 $^ -def:$*.def \
87                    $(OutPutOpt)$(EVENTLIB)
88                 $(LD) $(SOFLAGS) $(LDFLAGS) $^ $*.exp $(LIBS) \
89                    $(OutPutOpt)$@
90 else
91                 $(LD) $(SOFLAGS) $(LDFLAGS) $^ $(OutPutOpt) $@ $(EXPLLINKLIBS)
92 endif
93 endif
94         @chmod a+x $@
95         @echo "done"
96
97 %.o:    %.cxx %.h
98         $(CXX) $(PACKCXXFLAGS) -c $< -o $@
99
100 clean:
101         @rm -f $(OBJS_PWG) *.so G__$(PACKAGE).*
102
103 G__$(PACKAGE).cxx G__$(PACKAGE).h: $(HDRS) $(DHDR)
104         @echo "Generating dictionaries ..." $(ALICEINC)
105         rootcint -f $@ -c $(CINTFLAGS) $(ALICEINC) $^