Restored PAR file functionallity: make test-par-all works
[u/mrichter/AliRoot.git] / PWGHF / Makefile
1 # $Id$
2
3 PACKAGE = PWGHF
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 ($(CDB_INCLUDE),)
16                 ALICEINC += -I../$(CDB_INCLUDE)
17         endif                           
18         ifneq ($(AOD_INCLUDE),)
19                 ALICEINC += -I../$(AOD_INCLUDE)
20         endif
21         ifneq ($(ANALYSIS_INCLUDE),)
22                 ALICEINC += -I../$(ANALYSIS_INCLUDE)
23         endif
24         ifneq ($(ANALYSISalice_INCLUDE),)
25                 ALICEINC += -I../$(ANALYSISalice_INCLUDE)
26         endif
27         ifneq ($(CORRFW_INCLUDE),)
28                 ALICEINC += -I../$(CORRFW_INCLUDE)
29         endif
30         ifneq ($(PWGHFbase_INCLUDE),)
31                 ALICEINC += -I../$(PWGHFbase_INCLUDE)
32         endif
33 else
34   ifneq ($(ALICE_ROOT),)
35     ALICEINC += -I$(ALICE_ROOT)/include -I$(ALICE_ROOT)/PWGHF/base
36 else
37   endif
38 endif
39
40 SRCS     = $(wildcard $(subst PWGHF,,$(PACKAGE))/*.cxx)
41 HDRS     = $(SRCS:.cxx=.h)
42 DHDR     = $(PACKAGE)LinkDef.h
43 CXXFLAGS     += $(ALICEINC) -g
44
45 DHDR_PWGHF := $(DHDR)
46 HDRS_PWGHF := $(HDRS)
47 SRCS_PWGHF := $(SRCS) G__$(PACKAGE).cxx
48 OBJS_PWGHF := $(SRCS_PWGHF:.cxx=.o)
49
50 PARFILE       = $(PACKAGE).par
51
52 lib$(PACKAGE).so: $(OBJS_PWGHF)
53         @echo "Linking" $@ ...
54         @/bin/rm -f $@
55         $(LD) $(SOFLAGS) $(LDFLAGS) $^ $(OutPutOpt) $@ $(EXPLLINKLIBS)
56         @chmod a+x $@
57         @echo "done"
58
59 %.o:    %.cxx %.h
60         $(CXX) $(CXXFLAGS) -c $< -o $@
61
62 G__$(PACKAGE).cxx G__$(PACKAGE).h: $(HDRS) $(DHDR)
63         @echo "Generating dictionary ..."
64         rootcint -f $@ -c $(ALICEINC) $^
65
66 clean:
67         @rm -f $(OBJS)  *.so G__$(PACKAGE).*  $(PARFILE)