e3a9d4caceee8d74b3160f30f8a46fbf6cd050f0
[u/mrichter/AliRoot.git] / PWGUD / Makefile
1 PACKAGE = invalid-only-for-proof
2
3 include Makefile.arch
4
5 SRCS     = $(wildcard *.cxx)
6 HDRS     = $(SRCS:.cxx=.h)
7 DHDR     = $(PACKAGE)LinkDef.h
8
9
10 ifndef PACKCXXFLAGS
11    PACKCXXFLAGS = $(CXXFLAGS)
12 endif
13
14 ALICEINC = -I.
15 ALICEINC += -I./$(PACKAGE)/
16
17 ifneq ($(STEERBase_INCLUDE),)
18    ALICEINC += -I../$(STEERBase_INCLUDE) 
19 endif
20 ifneq ($(ESD_INCLUDE),)
21    ALICEINC += -I../$(ESD_INCLUDE) 
22 endif
23 ifneq ($(AOD_INCLUDE),)
24    ALICEINC += -I../$(AOD_INCLUDE) 
25 endif
26 ifneq ($(ANALYSIS_INCLUDE),)
27    ALICEINC += -I../$(ANALYSIS_INCLUDE) 
28 endif
29 ifneq ($(ANALYSISalice_INCLUDE),)
30    ALICEINC += -I../$(ANALYSISalice_INCLUDE) 
31 endif
32 ifneq ($(PWGUDbase_INCLUDE),)
33    ALICEINC += -I../$(PWGUDbase_INCLUDE) 
34 endif
35 ifneq ($(PWGUDdep_INCLUDE),)
36    ALICEINC += -I../$(PWGUDdep_INCLUDE) 
37 endif
38
39 # only if no par file was loaded before
40 #ifeq ($(ALICEINC),-I.)
41   ifneq ($(ALICE_ROOT),)
42     ALICEINC += -I$(ALICE_ROOT)/include -I$(ALICE_ROOT)/PWGUD/base
43   endif
44 #endif
45
46 ifeq ($(PLATFORM),macosx)
47 ROOTLIBDIR     := $(shell $(RC) --libdir)
48 ifeq ($(PACKAGE),PWGUDbase) 
49    PACKLDFLAGS = $(STEERBase_LIBS) $(ESD_LIBS) $(AOD_LIBS) $(ANALYSIS_LIBS) $(OADB_LIBS) $(ANALYSISalice_LIBS) -L$(ROOTLIBDIR) -lEG
50 endif
51 endif
52
53 CXXFLAGS += $(ALICEINC) -g
54
55 SRCS         += G__$(PACKAGE).cxx
56 OBJS          = $(SRCS:.cxx=.o)
57
58 lib$(PACKAGE).so: $(OBJS)
59         @echo "Linking" $@ ...
60         @/bin/rm -f $@
61 ifeq ($(PLATFORM),macosx)
62         $(LD) $(SOFLAGS)$@ $(LDFLAGS) $^ $(OutPutOpt) $@ $(PACKLDFLAGS) $(EXPLLINKLIBS)
63 else
64         $(LD) $(SOFLAGS) $(LDFLAGS) $^ $(OutPutOpt) $@ $(PACKLDFLAGS) $(EXPLLINKLIBS)
65 endif
66         @chmod a+x $@
67         @echo "done"
68
69 %.o:    %.cxx %.h
70         $(CXX) $(PACKCXXFLAGS) -c $< -o $@
71
72 clean:
73         @rm -f $(OBJS) *.so G__$(PACKAGE).*
74
75 G__$(PACKAGE).cxx G__$(PACKAGE).h: $(HDRS) $(DHDR)
76         @echo "Generating dictionaries ..." $(ALICEINC)
77         rootcint -f $@ -c $(CINTFLAGS) $(ALICEINC) $^
78