coverity fixes
[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 ifneq ($(findstring dev,$(PACKAGE)),)
12  ALICEINC     += -I./DEV
13 endif
14
15 ### define include dir for local case and par case
16 ifneq ($(OADB_INCLUDE),)
17    ALICEINC += -I../$(OADB_INCLUDE)
18 endif
19 ifneq ($(EMCALUtils_INCLUDE),)
20    ALICEINC += -I../$(EMCALUtils_INCLUDE)
21 endif
22 ifneq ($(JETANDEV_INCLUDE),)
23   ifneq ($(FASTJET_ROOT),)
24    ALICEINC += -I$(FASTJET_ROOT)/include
25   else
26    ALICEINC += -I$(ALICE_ROOT)/JETAN/fastjet
27   endif
28 endif
29 ifneq ($(JETAN_INCLUDE),)
30  ifeq ($(findstring dev,$(PACKAGE)),)
31   ifneq ($(FASTJET_ROOT),)
32    ALICEINC += -I$(FASTJET_ROOT)/include
33   else
34    ALICEINC += -I$(ALICE_ROOT)/JETAN/fastjet
35   endif
36  endif
37 endif
38
39 ifneq ($(ESD_INCLUDE),)
40    ALICEINC += -I../$(ESD_INCLUDE)
41    ALICEINC += -I../$(AOD_INCLUDE)
42    ALICEINC += -I../$(STEERBase_INCLUDE)
43    ALICEINC += -I../$(ANALYSIS_INCLUDE)
44    ALICEINC += -I../$(ANALYSISalice_INCLUDE)
45    ifneq ($(JETANDEV_INCLUDE),) 
46      ALICEINC += -I../$(JETANDEV_INCLUDE)
47    endif
48    ifneq ($(JETAN_INCLUDE),)
49     ifeq ($(findstring dev,$(PACKAGE)),)
50      ALICEINC += -I../$(JETAN_INCLUDE)
51     endif
52    endif
53  else
54     ifneq ($(ALICE_ROOT),)
55       ifneq ($(findstring dev,$(PACKAGE)),)
56        ALICEINC += -I$(ALICE_ROOT)/include -I$(ALICE_ROOT)/JETAN/DEV -I$(ALICE_ROOT)/ANALYSIS
57       else
58        ALICEINC += -I$(ALICE_ROOT)/include -I$(ALICE_ROOT)/JETAN -I$(ALICE_ROOT)/ANALYSIS
59      endif
60     endif
61 endif
62
63 CXXFLAGS     += $(ALICEINC) -g
64
65
66 SRCS         += G__$(PACKAGE).cxx
67 OBJS          = $(SRCS:.cxx=.o)
68
69 lib$(PACKAGE).so: $(OBJS)
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) $(CXXFLAGS) -c $< -o $@
99
100 clean:
101         @rm -f $(OBJS) *.so G__$(PACKAGE).*
102
103 G__$(PACKAGE).cxx G__$(PACKAGE).h: $(HDRS) $(DHDR)
104         @echo "Generating dictionary ..."
105         rootcint -f $@ -c $(CINTFLAGS) $(ALICEINC) $^
106