Correction for bug #77355: Generation of PARs
[u/mrichter/AliRoot.git] / PWG3 / Makefile
1 # $Id$
2
3 PACKAGE = PWG3
4
5 include Makefile.arch
6
7 ALICEINC      = -I.
8
9 ### define include dir for local case and par case
10 ifneq ($(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
21         ifneq ($(ANALYSISalice_INCLUDE),)
22                 ALICEINC += -I../$(ANALYSISalice_INCLUDE)
23         endif
24         ifneq ($(CORRFW_INCLUDE),)
25                 ALICEINC += -I../$(CORRFW_INCLUDE)
26         endif
27         ifneq ($(PWG3base_INCLUDE),)
28                 ALICEINC += -I../$(PWG3base_INCLUDE)
29         endif
30 else
31   ifneq ($(ALICE_ROOT),)
32     ALICEINC += -I$(ALICE_ROOT)/include -I$(ALICE_ROOT)/PWG3/base -I$(ALICE_ROOT)/MUON -I$(ALICE_ROOT)/MUON/mapping
33 else
34   endif
35 endif
36
37 SRCS     = $(wildcard $(subst PWG3,,$(PACKAGE))/*.cxx)
38 HDRS     = $(SRCS:.cxx=.h)
39 DHDR     = $(PACKAGE)LinkDef.h
40 CXXFLAGS     += $(ALICEINC) -g
41
42 DHDR_PWG3 := $(DHDR)
43 HDRS_PWG3 := $(HDRS)
44 SRCS_PWG3 := $(SRCS) G__$(PACKAGE).cxx
45 OBJS_PWG3 := $(SRCS_PWG3:.cxx=.o)
46
47 PARFILE       = $(PACKAGE).par
48
49 lib$(PACKAGE).so: $(OBJS_PWG3)
50         @echo "Linking" $@ ...
51         @/bin/rm -f $@
52 ifeq ($(ARCH),macosx)
53         @$(LD) -bundle -undefined $(UNDEFOPT) $(LDFLAGS) $^ -o $@
54 else
55         @$(LD) $(SOFLAGS) $(LDFLAGS) $^ -o $@
56 endif
57         @chmod a+x $@
58         @echo "done"
59
60 %.o:    %.cxx %.h
61         $(CXX) $(CXXFLAGS) -c $< -o $@
62
63 G__$(PACKAGE).cxx G__$(PACKAGE).h: $(HDRS) $(DHDR)
64         @echo "Generating dictionary ..."
65         rootcint -f $@ -c $(ALICEINC) $^
66
67 clean:
68         @rm -f $(OBJS)  *.so G__$(PACKAGE).*  $(PARFILE)