Correction for bug #77355: Generation of PARs
[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
15 ifneq ($(AOD_INCLUDE),)
16 ALICEINC += -I../$(AOD_INCLUDE)
17 endif
18 ifneq ($(ANALYSIS_INCLUDE),)
19 ALICEINC += -I../$(ANALYSIS_INCLUDE)
20 endif
57b8dffb 21 ifneq ($(ANALYSISalice_INCLUDE),)
22 ALICEINC += -I../$(ANALYSISalice_INCLUDE)
23 endif
b0c9efdb 24 ifneq ($(CORRFW_INCLUDE),)
25 ALICEINC += -I../$(CORRFW_INCLUDE)
26 endif
ab9bbfe5 27 ifneq ($(PWG3base_INCLUDE),)
28 ALICEINC += -I../$(PWG3base_INCLUDE)
29 endif
c40ad03f 30else
31 ifneq ($(ALICE_ROOT),)
7f57715e 32 ALICEINC += -I$(ALICE_ROOT)/include -I$(ALICE_ROOT)/PWG3/base -I$(ALICE_ROOT)/MUON -I$(ALICE_ROOT)/MUON/mapping
c40ad03f 33else
34 endif
35endif
36
958d9d26 37SRCS = $(wildcard $(subst PWG3,,$(PACKAGE))/*.cxx)
38HDRS = $(SRCS:.cxx=.h)
39DHDR = $(PACKAGE)LinkDef.h
c40ad03f 40CXXFLAGS += $(ALICEINC) -g
41
e8fd9be7 42DHDR_PWG3 := $(DHDR)
43HDRS_PWG3 := $(HDRS)
44SRCS_PWG3 := $(SRCS) G__$(PACKAGE).cxx
45OBJS_PWG3 := $(SRCS_PWG3:.cxx=.o)
c40ad03f 46
47PARFILE = $(PACKAGE).par
48
e8fd9be7 49lib$(PACKAGE).so: $(OBJS_PWG3)
c40ad03f 50 @echo "Linking" $@ ...
51 @/bin/rm -f $@
10dc066e 52ifeq ($(ARCH),macosx)
c40ad03f 53 @$(LD) -bundle -undefined $(UNDEFOPT) $(LDFLAGS) $^ -o $@
54else
55 @$(LD) $(SOFLAGS) $(LDFLAGS) $^ -o $@
56endif
57 @chmod a+x $@
58 @echo "done"
59
60%.o: %.cxx %.h
61 $(CXX) $(CXXFLAGS) -c $< -o $@
62
a0765419 63G__$(PACKAGE).cxx G__$(PACKAGE).h: $(HDRS) $(DHDR)
c40ad03f 64 @echo "Generating dictionary ..."
65 rootcint -f $@ -c $(ALICEINC) $^
66
67clean:
a0765419 68 @rm -f $(OBJS) *.so G__$(PACKAGE).* $(PARFILE)