]> git.uio.no Git - u/mrichter/AliRoot.git/blame - RICH/Makefile
full chain AliSim-AliRec is now active
[u/mrichter/AliRoot.git] / RICH / Makefile
CommitLineData
d48cca74 1Module :=RICH
2
3include lib$(Module).pkg
4
5Sources :=$(SRCS)
6
7OutputDir :=$(KIR_DIR)/$(Module)
8SoLib :=$(KIR_DIR)/lib$(Module).so
9
89a9de97 10ifeq ($(shell root-config --arch),linuxicc)
11 Compiler :=icc
12 CompilerOptions:=-O0 -fpstkchk -I$(shell root-config --incdir) -I$(ALICE_ROOT)/include
13 SoOptions := -Wl,-soname,lib$(Module).so -shared -O -g
14else
15 Compiler :=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
18endif
d48cca74 19
20ifdef ALIVERBOSE
21 Mute :=
22else
23 Mute :=@
24endif
25
26Headers := $(Sources:.cxx=.h) $(Module)LinkDef.h
27
28DictSource := $(OutputDir)/G__$(Module).cxx
29DictHeader := $(DictSource:.cxx=.h)
30DictObject := $(DictSource:.cxx=.o)
31
32
33Objects := $(patsubst %.cxx,$(OutputDir)/%.o,$(Sources)) $(DictObject)
34
35
36DepFile := $(OutputDir)/$(Module).d
37
38##### TARGETS #####
39
40$(SoLib): $(Objects)
41 @echo "Creating $@"
89a9de97 42 $(Mute)$(Compiler) $(SoOptions) $^ -o $@
d48cca74 43
44$(DepFile): $(Headers)
45 @[ -d $(OutputDir) ] || mkdir -p $(OutputDir)
46 @touch $(DepFile)
47 @echo "Generating dependency $@"
48 $(Mute)rmkdepend -f$(DepFile) -p$(OutputDir)/ -- $(CxxFlags) -- $(Sources) 2>/dev/null
49
50$(DictSource): $(Headers)
51 @echo "Generating $@"
89a9de97 52 $(Mute)rootcint -f $@ -c $(filter -I%,$(CompilerOptions)) $^
d48cca74 53
54$(DictObject) : $(DictSource)
55 @echo "Compiling $^"
89a9de97 56 $(Mute)$(Compiler) $(CompilerOptions) -I. -c $^ -o $@
d48cca74 57
58show:
59 @echo "Headers: $(Headers)"
60 @echo "Sources: $(Sources)"
61 @echo "Depend : $(DepFile)"
62 @echo "Objects: $(Objects)"
63 @echo "Library: $(SoLib)"
64
65spec: $(Sources)
66 @echo $^
67 @echo $@
68
69clean:
70 @echo "Cleaning..."
71 $(Mute)rm -rf $(Objects) $(DictSource) $(DictHeader) $(SoLib) $(DepFile)
72
73############################ cxx rule #########################################
74$(OutputDir)/%.o : %.cxx
75 @echo $*.cxx
89a9de97 76 $(Mute)$(Compiler) $(CompilerOptions) -c $*.cxx -o $(OutputDir)/$*.o
d48cca74 77############################ Dependencies #####################################
78
79-include $(DepFile)