]> git.uio.no Git - u/mrichter/AliRoot.git/blame - RICH/RichMake
change class name: AliMUONEventReconstructor -> AliMUONTrackReconstructor
[u/mrichter/AliRoot.git] / RICH / RichMake
CommitLineData
113279f5 1Module :=RICH
2
a25b3368 3include lib$(Module)base.pkg
4SrcBase :=$(SRCS)
113279f5 5
a25b3368 6include lib$(Module)sim.pkg
7SrcSim :=$(SRCS)
8
9include lib$(Module)rec.pkg
10SrcRec :=$(SRCS)
113279f5 11
12RootTarget :=$(shell root-config --arch)
d3eb6079 13DirOut :=/tmp/$(Module)
a25b3368 14LibBase :=$(LIB_MY)/lib$(Module)base.so
15LibSim :=$(LIB_MY)/lib$(Module)sim.so
16LibRec :=$(LIB_MY)/lib$(Module)rec.so
17
18
19HdrBase := $(SrcBase:.cxx=.h) $(Module)baseLinkDef.h
20HdrSim := $(SrcSim:.cxx=.h) $(Module)simLinkDef.h
21HdrRec := $(SrcRec:.cxx=.h) $(Module)recLinkDef.h
22
23DictSrcBase := $(DirOut)/Dict$(Module)base.cxx
24DictObjBase := $(DictSrcBase:.cxx=.o)
25
26DictSrcSim := $(DirOut)/Dict$(Module)sim.cxx
27DictObjSim := $(DictSrcSim:.cxx=.o)
28
29DictSrcRec := $(DirOut)/Dict$(Module)rec.cxx
30DictObjRec := $(DictSrcRec:.cxx=.o)
31
32
33
34ObjBase := $(patsubst %.cxx,$(DirOut)/%.o,$(SrcBase)) $(DictObjBase)
35ObjSim := $(patsubst %.cxx,$(DirOut)/%.o,$(SrcSim)) $(DictObjSim)
36ObjRec := $(patsubst %.cxx,$(DirOut)/%.o,$(SrcRec)) $(DictObjRec)
37
38
39DepFile := $(DirOut)/$(Module).depend
113279f5 40
41ifeq ($(RootTarget),linuxicc)
a25b3368 42 Compiler :=icc
43 CompilerOpt :=-O0 -fpstkchk -I$(shell root-config --incdir) -I$(ALICE_ROOT)/include
44 LibOpt :=-O -g -shared -Wl
113279f5 45else
a25b3368 46 Compiler :=g++
d3eb6079 47 CompilerOpt :=-g -W -Wall -Woverloaded-virtual -fPIC -pipe -fmessage-length=0 -Wno-long-long -pedantic-errors -ansi -I$(shell root-config --incdir) -I$(ALICE_ROOT)/include
a25b3368 48 LibOpt :=-O -g -shared -Wl
113279f5 49endif
50
51ifdef ALIVERBOSE
52 Mute :=
53else
54 Mute :=@
55endif
56
113279f5 57##### TARGETS #####
58
a25b3368 59all: $(LibBase) $(LibSim) $(LibRec)
60$(LibBase): $(ObjBase)
113279f5 61 @echo "Creating $@"
a25b3368 62 $(Mute)$(Compiler) $(LibOpt) $^ -o $@
113279f5 63
a25b3368 64$(LibSim): $(ObjSim)
65 @echo "Creating $@"
66 $(Mute)$(Compiler) $(LibOpt) $^ -o $@
67
68$(LibRec): $(ObjRec)
69 @echo "Creating $@"
70 $(Mute)$(Compiler) $(LibOpt) $^ -o $@
71
72$(DepFile): $(HdrBase) $(HdrSim) $(HdrRec)
73 @[ -d $(DirOut) ] || mkdir -p $(DirOut)
d3eb6079 74 @[ -d $(LIB_MY) ] || mkdir -p $(LIB_MY)
113279f5 75 @touch $(DepFile)
76 @echo "Generating dependency $@"
a25b3368 77 $(Mute)rmkdepend -f$(DepFile) -p$(DirOut)/ -- $(CompilerOpt) -- $(SrcBase) $(SrcSim) $(SrcRec) 2>/dev/null
113279f5 78
a25b3368 79$(DictSrcBase): $(HdrBase)
80 @echo "Generating $@"
81 $(Mute)rootcint -f $@ -c $(filter -I%,$(CompilerOpt)) $^
82
83$(DictSrcSim): $(HdrSim)
84 @echo "Generating $@"
85 $(Mute)rootcint -f $@ -c $(filter -I%,$(CompilerOpt)) $^
86
87$(DictSrcRec): $(HdrRec)
113279f5 88 @echo "Generating $@"
a25b3368 89 $(Mute)rootcint -f $@ -c $(filter -I%,$(CompilerOpt)) $^
113279f5 90
a25b3368 91$(DictObjBase) : $(DictSrcBase)
113279f5 92 @echo "Compiling $^"
a25b3368 93 $(Mute)$(Compiler) $(CompilerOpt) -I. -c $^ -o $@
94
95$(DictObjSim) : $(DictSrcSim)
96 @echo "Compiling $^"
97 $(Mute)$(Compiler) $(CompilerOpt) -I. -c $^ -o $@
98
99$(DictObjRec) : $(DictSrcRec)
100 @echo "Compiling $^"
101 $(Mute)$(Compiler) $(CompilerOpt) -I. -c $^ -o $@
113279f5 102
103show:
a25b3368 104 @echo "Base Headers: $(HdrBase)"
105 @echo "Base Sources: $(SrcBase)"
106 @echo "Base Objects: $(ObjBase)"
107 @echo "Base Dict: $(DictSrcBase)"
108 @echo -e "Base Library: $(LibBase)\n"
109
110 @echo "Sim Headers: $(HdrSim)"
111 @echo "Sim Sources: $(SrcSim)"
112 @echo "Sim Objects: $(ObjSim)"
113 @echo -e "Sim Library: $(LibSim)\n"
114
115 @echo "Rec Headers: $(HdrRec)"
116 @echo "Rec Sources: $(SrcRec)"
117 @echo "Rec Objects: $(ObjRec)"
118 @echo -e "Rec Library: $(LibRec)\n"
119
120spec: $(SrcBase)
d3eb6079 121 @echo "^ $^"
122 @echo "@ $@"
123 @echo "< $<"
113279f5 124
125clean:
126 @echo "Cleaning..."
a25b3368 127 $(Mute)rm -rf $(DirOut) $(LibBase) $(LibSim) $(LibRec)
113279f5 128
129############################ cxx rule #########################################
a25b3368 130$(DirOut)/%.o : %.cxx
113279f5 131 @echo $*.cxx
a25b3368 132 $(Mute)$(Compiler) $(CompilerOpt) -c $*.cxx -o $(DirOut)/$*.o
113279f5 133############################ Dependencies #####################################
134
135-include $(DepFile)