3 include lib$(Module).pkg
7 OutputDir :=$(KIR_DIR)/$(Module)
8 SoLib :=$(KIR_DIR)/lib$(Module).so
10 CxxFlags :=-O -g -W -Wall -fPIC -pipe -fmessage-length=0 -I$(ROOTSYS)/include -I$(ALICE_ROOT)/include
18 Headers := $(Sources:.cxx=.h) $(Module)LinkDef.h
20 DictSource := $(OutputDir)/G__$(Module).cxx
21 DictHeader := $(DictSource:.cxx=.h)
22 DictObject := $(DictSource:.cxx=.o)
25 Objects := $(patsubst %.cxx,$(OutputDir)/%.o,$(Sources)) $(DictObject)
28 DepFile := $(OutputDir)/$(Module).d
34 $(Mute)g++ -Wl,-soname,lib$(Module).so -shared -O -g $^ -o $@
36 $(DepFile): $(Headers)
37 @[ -d $(OutputDir) ] || mkdir -p $(OutputDir)
39 @echo "Generating dependency $@"
40 $(Mute)rmkdepend -f$(DepFile) -p$(OutputDir)/ -- $(CxxFlags) -- $(Sources) 2>/dev/null
42 $(DictSource): $(Headers)
44 $(Mute)rootcint -f $@ -c $(filter -I%,$(CxxFlags)) $^
46 $(DictObject) : $(DictSource)
48 $(Mute)g++ $(CxxFlags) -I. -c $^ -o $@
51 @echo "Headers: $(Headers)"
52 @echo "Sources: $(Sources)"
53 @echo "Depend : $(DepFile)"
54 @echo "Objects: $(Objects)"
55 @echo "Library: $(SoLib)"
63 $(Mute)rm -rf $(Objects) $(DictSource) $(DictHeader) $(SoLib) $(DepFile)
65 ############################ cxx rule #########################################
66 $(OutputDir)/%.o : %.cxx
68 $(Mute)g++ $(CxxFlags) -c $*.cxx -o $(OutputDir)/$*.o
69 ############################ Dependencies #####################################