Fixes for the creation of PAR files on Mac (Chiara, Gerri)
[u/mrichter/AliRoot.git] / JETAN / Makefile
1 PACKAGE = invalid-only-for-proof
2
3 include $(ROOTSYS)/test/Makefile.arch
4
5 SRCS     = $(wildcard *.cxx)
6 HDRS     = $(SRCS:.cxx=.h)
7 DHDR     = $(PACKAGE)LinkDef.h
8
9
10 ALICEINC      = -I.
11
12 ### define include dir for local case and par case
13 ifneq ($(OADB_INCLUDE),)
14    ALICEINC += -I../$(OADB_INCLUDE)
15 endif
16 ifneq ($(EMCALUtils_INCLUDE),)
17    ALICEINC += -I../$(EMCALUtils_INCLUDE)
18 endif
19 ifneq ($(JETAN_INCLUDE),)
20   ifneq ($(FASTJET_ROOT),)
21    ALICEINC += -I$(FASTJET_ROOT)/include
22   else
23    ALICEINC += -I$(ALICE_ROOT)/JETAN/fastjet
24   endif
25 endif
26 ifneq ($(ESD_INCLUDE),)
27    ALICEINC += -I../$(ESD_INCLUDE)
28    ALICEINC += -I../$(AOD_INCLUDE)
29    ALICEINC += -I../$(STEERBase_INCLUDE)
30    ALICEINC += -I../$(ANALYSIS_INCLUDE)
31    ALICEINC += -I../$(ANALYSISalice_INCLUDE)
32    ifneq ($(JETAN_INCLUDE),)    
33      ALICEINC += -I../$(JETAN_INCLUDE)
34    endif
35  else
36     ifneq ($(ALICE_ROOT),)
37        ALICEINC += -I$(ALICE_ROOT)/include -I$(ALICE_ROOT)/JETAN -I$(ALICE_ROOT)/ANALYSIS
38      endif
39 endif
40
41 CXXFLAGS     += $(ALICEINC) -g
42
43
44 SRCS         += G__$(PACKAGE).cxx
45 OBJS          = $(SRCS:.cxx=.o)
46
47 lib$(PACKAGE).so: $(OBJS)
48         @echo "Linking" $@ ...
49         @/bin/rm -f $@
50 ifeq ($(PLATFORM),macosx)
51 # We need to make both the .dylib and the .so
52                 $(LD) $(SOFLAGS)$@ $(LDFLAGS) $^ $(OutPutOpt) $@
53 ifneq ($(subst $(MACOSX_MINOR),,1234),1234)
54 ifeq ($(MACOSX_MINOR),4)
55                 ln -sf $@ $(subst .$(DllSuf),.so,$@)
56 else
57                 $(LD) -bundle -undefined $(UNDEFOPT) $(LDFLAGS) $^ \
58                    $(OutPutOpt) $(subst .$(DllSuf),.so,$@)
59 endif
60 endif
61 else
62 ifeq ($(PLATFORM),win32)
63                 bindexplib $* $^ > $*.def
64                 lib -nologo -MACHINE:IX86 $^ -def:$*.def \
65                    $(OutPutOpt)$(EVENTLIB)
66                 $(LD) $(SOFLAGS) $(LDFLAGS) $^ $*.exp $(LIBS) \
67                    $(OutPutOpt)$@
68 else
69                 $(LD) $(SOFLAGS) $(LDFLAGS) $^ $(OutPutOpt) $@ $(EXPLLINKLIBS)
70 endif
71 endif
72         @chmod a+x $@
73         @echo "done"
74
75 %.o:    %.cxx %.h
76         $(CXX) $(CXXFLAGS) -c $< -o $@
77
78 clean:
79         @rm -f $(OBJS) *.so G__$(PACKAGE).*
80
81 G__$(PACKAGE).cxx G__$(PACKAGE).h: $(HDRS) $(DHDR)
82         @echo "Generating dictionary ..."
83         rootcint -f $@ -c $(CINTFLAGS) $(ALICEINC) $^
84