Coverity 10698
[u/mrichter/AliRoot.git] / PWG3 / Makefile
CommitLineData
c40ad03f 1# $Id$
2
a0765419 3PACKAGE = PWG3
c40ad03f 4
a0765419 5include Makefile.arch
c40ad03f 6
7ALICEINC = -I.
8
9### define include dir for local case and par case
10ifneq ($(ESD_INCLUDE),)
11 ALICEINC += -I../$(ESD_INCLUDE)
12 ifneq ($(STEERBase_INCLUDE),)
13 ALICEINC += -I../$(STEERBase_INCLUDE)
14 endif
3d270be0 15 ifneq ($(CDB_INCLUDE),)
16 ALICEINC += -I../$(CDB_INCLUDE)
17 endif
c40ad03f 18 ifneq ($(AOD_INCLUDE),)
19 ALICEINC += -I../$(AOD_INCLUDE)
20 endif
21 ifneq ($(ANALYSIS_INCLUDE),)
22 ALICEINC += -I../$(ANALYSIS_INCLUDE)
23 endif
57b8dffb 24 ifneq ($(ANALYSISalice_INCLUDE),)
25 ALICEINC += -I../$(ANALYSISalice_INCLUDE)
26 endif
b0c9efdb 27 ifneq ($(CORRFW_INCLUDE),)
28 ALICEINC += -I../$(CORRFW_INCLUDE)
29 endif
ab9bbfe5 30 ifneq ($(PWG3base_INCLUDE),)
31 ALICEINC += -I../$(PWG3base_INCLUDE)
32 endif
c40ad03f 33else
34 ifneq ($(ALICE_ROOT),)
7f57715e 35 ALICEINC += -I$(ALICE_ROOT)/include -I$(ALICE_ROOT)/PWG3/base -I$(ALICE_ROOT)/MUON -I$(ALICE_ROOT)/MUON/mapping
c40ad03f 36else
37 endif
38endif
39
958d9d26 40SRCS = $(wildcard $(subst PWG3,,$(PACKAGE))/*.cxx)
41HDRS = $(SRCS:.cxx=.h)
42DHDR = $(PACKAGE)LinkDef.h
c40ad03f 43CXXFLAGS += $(ALICEINC) -g
44
e8fd9be7 45DHDR_PWG3 := $(DHDR)
46HDRS_PWG3 := $(HDRS)
47SRCS_PWG3 := $(SRCS) G__$(PACKAGE).cxx
48OBJS_PWG3 := $(SRCS_PWG3:.cxx=.o)
c40ad03f 49
50PARFILE = $(PACKAGE).par
51
e8fd9be7 52lib$(PACKAGE).so: $(OBJS_PWG3)
c40ad03f 53 @echo "Linking" $@ ...
54 @/bin/rm -f $@
d86acb69 55ifeq ($(PLATFORM),macosx)
56# We need to make both the .dylib and the .so
57 $(LD) $(SOFLAGS)$@ $(LDFLAGS) $^ $(OutPutOpt) $@
58ifneq ($(subst $(MACOSX_MINOR),,1234),1234)
59ifeq ($(MACOSX_MINOR),4)
60 ln -sf $@ $(subst .$(DllSuf),.so,$@)
c40ad03f 61else
d86acb69 62 $(LD) -bundle -undefined $(UNDEFOPT) $(LDFLAGS) $^ \
63 $(OutPutOpt) $(subst .$(DllSuf),.so,$@)
64endif
65endif
66else
67ifeq ($(PLATFORM),win32)
68 bindexplib $* $^ > $*.def
69 lib -nologo -MACHINE:IX86 $^ -def:$*.def \
70 $(OutPutOpt)$(EVENTLIB)
71 $(LD) $(SOFLAGS) $(LDFLAGS) $^ $*.exp $(LIBS) \
72 $(OutPutOpt)$@
73else
74 $(LD) $(SOFLAGS) $(LDFLAGS) $^ $(OutPutOpt) $@ $(EXPLLINKLIBS)
75endif
c40ad03f 76endif
77 @chmod a+x $@
78 @echo "done"
79
80%.o: %.cxx %.h
81 $(CXX) $(CXXFLAGS) -c $< -o $@
82
a0765419 83G__$(PACKAGE).cxx G__$(PACKAGE).h: $(HDRS) $(DHDR)
c40ad03f 84 @echo "Generating dictionary ..."
85 rootcint -f $@ -c $(ALICEINC) $^
86
87clean:
a0765419 88 @rm -f $(OBJS) *.so G__$(PACKAGE).* $(PARFILE)