14-jun-2006 NvE TWR polarity reversed in IceF2k::PutHits() to be compatible with
[u/mrichter/AliRoot.git] / PWG0 / Makefile
CommitLineData
dc740de4 1# $Id$
2
d4fe2555 3PACKAGE = PWG0base
4
16e24ca3 5default-target: libPWG0base.so
6
99326024 7include $(ROOTSYS)/test/Makefile.arch
d4fe2555 8include lib$(PACKAGE).pkg
99326024 9
d4fe2555 10ALICEINC = -I.
99326024 11
d4fe2555 12### define include dir for local case and par case
13ifneq ($(ALICE_ROOT),)
14 ALICEINC += -I$(ALICE_ROOT)/include
15else
d4fe2555 16 ifneq ($(ESD_INCLUDE),)
17 ALICEINC += -I../$(ESD_INCLUDE)
18 endif
19endif
99326024 20
16e24ca3 21CXXFLAGS += $(ALICEINC) -g
d4fe2555 22SRCS += dict.cxx
23OBJS = $(SRCS:.cxx=.o)
24PARFILE = $(PACKAGE).par
25
26lib$(PACKAGE).so: $(OBJS)
27 @echo "Linking" $@ ...
28 @/bin/rm -f $@
99326024 29ifeq ($(PLATFORM),macosx)
d4fe2555 30 @$(LD) -bundle -undefined $(UNDEFOPT) $(LDFLAGS) $^ -o $@
99326024 31else
d4fe2555 32 @$(LD) $(SOFLAGS) $(LDFLAGS) $(OBJS) -o $@
99326024 33endif
d4fe2555 34 @chmod a+x $@
99326024 35 @echo "done"
36
37%.o: %.cxx %.h
38 $(CXX) $(CXXFLAGS) -c $< -o $@
39
40clean:
d4fe2555 41 @rm -f $(OBJS) core *~ *.so dict.* $(PARFILE)
99326024 42
43dict.cxx dict.h: $(HDRS) $(DHDR)
44 @echo "Generating dictionary ..."
45 @[ -f dict ] || rm -f $@
46 rootcint -f $@ -c $(ALICEINC) $^
d4fe2555 47
48### CREATE PAR FILE
49
50$(PARFILE): $(patsubst %,$(PACKAGE)/%,$(filter-out dict.%, $(HDRS) $(SRCS) $(DHDR) $(PKGFILE) Makefile Makefile.arch lib$(PACKAGE).pkg PROOF-INF))
51 @echo "Creating archive" $@ ...
52 @tar cfzh $@ $(PACKAGE)
53 @rm -rf $(PACKAGE)
54 @echo "done"
55
56$(PACKAGE)/Makefile: Makefile #.$(PACKAGE)
57 @echo Copying $< to $@ with transformations
58 @[ -d $(dir $@) ] || mkdir -p $(dir $@)
59 @sed 's/include \$$(ROOTSYS)\/test\/Makefile.arch/include Makefile.arch/' < $^ > $@
60
61$(PACKAGE)/Makefile.arch: $(ROOTSYS)/test/Makefile.arch
62 @echo Copying $< to $@
63 @[ -d $(dir $@) ] || mkdir -p $(dir $@)
64 @cp $^ $@
65
66$(PACKAGE)/PROOF-INF: PROOF-INF.$(PACKAGE)
67 @echo Copying $< to $@
68 @[ -d $(dir $@) ] || mkdir -p $(dir $@)
69 @cp -r $^ $@
70
71$(PACKAGE)/%: %
72 @echo Copying $< to $@
73 @[ -d $(dir $@) ] || mkdir -p $(dir $@)
74 @cp $< $@
75
76test-%.par: %.par
77 @echo "INFO: The file $< is now tested, in case of an error check in par-tmp."
78 @mkdir -p par-tmp
79 @cd par-tmp; tar xfz ../$<; cd $(subst .par,,$<); PROOF-INF/BUILD.sh
80 @rm -rf par-tmp
81 @echo "INFO: Testing succeeded (already cleaned up)"