3 include lib$(Module).pkg
7 OutputDir :=$(KIR_DIR)/$(Module)
8 SoLib :=$(KIR_DIR)/lib$(Module).so
10 ifeq ($(shell root-config --arch),linuxicc)
12 CompilerOptions:=-O0 -fpstkchk -I$(shell root-config --incdir) -I$(ALICE_ROOT)/include
13 SoOptions := -Wl,-soname,lib$(Module).so -shared -O -g
16 CompilerOptions:=-O -g -W -Wall -fPIC -pipe -fmessage-length=0 -I$(shell root-config --incdir) -I$(ALICE_ROOT)/include
17 SoOptions := -Wl,-soname,lib$(Module).so -shared -O -g
26 Headers := $(Sources:.cxx=.h) $(Module)LinkDef.h
28 DictSource := $(OutputDir)/G__$(Module).cxx
29 DictHeader := $(DictSource:.cxx=.h)
30 DictObject := $(DictSource:.cxx=.o)
33 Objects := $(patsubst %.cxx,$(OutputDir)/%.o,$(Sources)) $(DictObject)
36 DepFile := $(OutputDir)/$(Module).d
42 $(Mute)$(Compiler) $(SoOptions) $^ -o $@
44 $(DepFile): $(Headers)
45 @[ -d $(OutputDir) ] || mkdir -p $(OutputDir)
47 @echo "Generating dependency $@"
48 $(Mute)rmkdepend -f$(DepFile) -p$(OutputDir)/ -- $(CxxFlags) -- $(Sources) 2>/dev/null
50 $(DictSource): $(Headers)
52 $(Mute)rootcint -f $@ -c $(filter -I%,$(CompilerOptions)) $^
54 $(DictObject) : $(DictSource)
56 $(Mute)$(Compiler) $(CompilerOptions) -I. -c $^ -o $@
59 @echo "Headers: $(Headers)"
60 @echo "Sources: $(Sources)"
61 @echo "Depend : $(DepFile)"
62 @echo "Objects: $(Objects)"
63 @echo "Library: $(SoLib)"
71 $(Mute)rm -rf $(Objects) $(DictSource) $(DictHeader) $(SoLib) $(DepFile)
73 ############################ cxx rule #########################################
74 $(OutputDir)/%.o : %.cxx
76 $(Mute)$(Compiler) $(CompilerOptions) -c $*.cxx -o $(OutputDir)/$*.o
77 ############################ Dependencies #####################################