]> git.uio.no Git - u/mrichter/AliRoot.git/blame - HMPID/Hmake
AliHMPIDRecoParam is updated with RunTypes:
[u/mrichter/AliRoot.git] / HMPID / Hmake
CommitLineData
fe88cf1b 1Module :=HMPID
2
3include lib$(Module)base.pkg
4SrcBase :=$(SRCS)
5
6include lib$(Module)sim.pkg
7SrcSim :=$(SRCS)
8
9include lib$(Module)rec.pkg
10SrcRec :=$(SRCS)
11
025aa9c7 12RootTarget :=$(shell $(ROOTSYS)/bin/root-config --arch)
fe88cf1b 13DirOut :=/tmp/$(USER)_$(Module)_obj
92017a47 14DirInc := -I$(shell $(ROOTSYS)/bin/root-config --incdir) -I$(ALICE_ROOT)/include
15
fe88cf1b 16LibBase :=$(LIB_MY)/lib$(Module)base.so
17LibSim :=$(LIB_MY)/lib$(Module)sim.so
18LibRec :=$(LIB_MY)/lib$(Module)rec.so
19
20
21HdrBase := $(SrcBase:.cxx=.h) $(Module)baseLinkDef.h
22HdrSim := $(SrcSim:.cxx=.h) $(Module)simLinkDef.h
23HdrRec := $(SrcRec:.cxx=.h) $(Module)recLinkDef.h
24
25DictSrcBase := $(DirOut)/Dict$(Module)base.cxx
26DictObjBase := $(DictSrcBase:.cxx=.o)
27
28DictSrcSim := $(DirOut)/Dict$(Module)sim.cxx
29DictObjSim := $(DictSrcSim:.cxx=.o)
30
31DictSrcRec := $(DirOut)/Dict$(Module)rec.cxx
32DictObjRec := $(DictSrcRec:.cxx=.o)
33
34
35
36ObjBase := $(patsubst %.cxx,$(DirOut)/%.o,$(SrcBase)) $(DictObjBase)
37ObjSim := $(patsubst %.cxx,$(DirOut)/%.o,$(SrcSim)) $(DictObjSim)
38ObjRec := $(patsubst %.cxx,$(DirOut)/%.o,$(SrcRec)) $(DictObjRec)
39
92017a47 40CodeRules := $(patsubst %.cxx,$(DirOut)/%.viol,$(SrcBase) $(SrcSim) $(SrcRec))
41
08801509 42export IRST_INSTALLDIR=$(HOME)/IRST
92017a47 43export IRST_CONFIG_DIR=$(IRST_INSTALLDIR)/userConfig/ALICE
44export CLASSPATH=$(IRST_INSTALLDIR)
45
46
47#-------------------------------------------------------------------------------
fe88cf1b 48
49DepFile := $(DirOut)/$(Module).depend
50
92017a47 51
52
fe88cf1b 53ifeq ($(RootTarget),linuxicc)
54 Compiler :=icc
025aa9c7 55 CompilerOpt :=-fpstkchk -I$(shell $(ROOTSYS)/bin/root-config --incdir) -I$(ALICE_ROOT)/include
fe88cf1b 56 LibOpt :=-g -shared -Wl
57else
58 Compiler :=g++
92017a47 59 CompilerOpt :=-g -W -Wall -Werror -Woverloaded-virtual -fPIC -pipe -fmessage-length=0 -Wno-long-long -pedantic-errors -ansi -Dlinux -D`uname` $(DirInc)
fe88cf1b 60 LibOpt :=-g -shared -Wl
61endif
62
63ifdef ALIVERBOSE
64 Mute :=
65else
66 Mute :=@
67endif
68
69##### TARGETS #####
70
71all: $(LibBase) $(LibSim) $(LibRec)
72$(LibBase): $(ObjBase)
73 @echo "Creating $@"
74 $(Mute)$(Compiler) $(LibOpt) $^ -o $@
75
76$(LibSim): $(ObjSim)
77 @echo "Creating $@"
78 $(Mute)$(Compiler) $(LibOpt) $^ -o $@
79
80$(LibRec): $(ObjRec)
81 @echo "Creating $@"
82 $(Mute)$(Compiler) $(LibOpt) $^ -o $@
83
84$(DepFile): $(HdrBase) $(HdrSim) $(HdrRec)
85 @[ -d $(DirOut) ] || mkdir -p $(DirOut)
86 @[ -d $(LIB_MY) ] || mkdir -p $(LIB_MY)
87 @touch $(DepFile)
88 @echo "Generating dependency $@"
025aa9c7 89 $(Mute)$(ROOTSYS)/bin/rmkdepend -f$(DepFile) -p$(DirOut)/ -- $(CompilerOpt) -- $(SrcBase) $(SrcSim) $(SrcRec) 2>/dev/null
fe88cf1b 90
91$(DictSrcBase): $(HdrBase)
92 @echo "Generating $@"
025aa9c7 93 $(Mute)$(ROOTSYS)/bin/rootcint -f $@ -c $(filter -I%,$(CompilerOpt)) $^
fe88cf1b 94
95$(DictSrcSim): $(HdrSim)
96 @echo "Generating $@"
025aa9c7 97 $(Mute)$(ROOTSYS)/bin/rootcint -f $@ -c $(filter -I%,$(CompilerOpt)) $^
fe88cf1b 98
99$(DictSrcRec): $(HdrRec)
100 @echo "Generating $@"
025aa9c7 101 $(Mute)$(ROOTSYS)/bin/rootcint -f $@ -c $(filter -I%,$(CompilerOpt)) $^
fe88cf1b 102
103$(DictObjBase) : $(DictSrcBase)
104 @echo "Compiling $^"
105 $(Mute)$(Compiler) $(CompilerOpt) -I. -c $^ -o $@
106
107$(DictObjSim) : $(DictSrcSim)
108 @echo "Compiling $^"
109 $(Mute)$(Compiler) $(CompilerOpt) -I. -c $^ -o $@
110
111$(DictObjRec) : $(DictSrcRec)
112 @echo "Compiling $^"
113 $(Mute)$(Compiler) $(CompilerOpt) -I. -c $^ -o $@
114
92017a47 115
116rules: $(CodeRules)
117
fe88cf1b 118show:
119 @echo "Base Headers: $(HdrBase)"
120 @echo "Base Sources: $(SrcBase)"
121 @echo "Base Objects: $(ObjBase)"
122 @echo "Base Dict: $(DictSrcBase)"
123 @echo -e "Base Library: $(LibBase)\n"
124
125 @echo "Sim Headers: $(HdrSim)"
126 @echo "Sim Sources: $(SrcSim)"
127 @echo "Sim Objects: $(ObjSim)"
128 @echo -e "Sim Library: $(LibSim)\n"
129
130 @echo "Rec Headers: $(HdrRec)"
131 @echo "Rec Sources: $(SrcRec)"
132 @echo "Rec Objects: $(ObjRec)"
133 @echo -e "Rec Library: $(LibRec)\n"
92017a47 134 @echo "Rules check: $(CodeRules)"
135 @echo "CompilerOpt: $(CompilerOpt)"
136
fe88cf1b 137spec: $(SrcBase)
138 @echo "^ $^"
139 @echo "@ $@"
140 @echo "< $<"
141
142clean:
143 @echo "Cleaning..."
144 $(Mute)rm -rf $(DirOut) $(LibBase) $(LibSim) $(LibRec)
145
146############################ cxx rule #########################################
147$(DirOut)/%.o : %.cxx
148 @echo $*.cxx
149 $(Mute)$(Compiler) $(CompilerOpt) -c $*.cxx -o $(DirOut)/$*.o
92017a47 150
151$(DirOut)/%.i : %.cxx $(DepFile)
152 $(Mute)$(Compiler) -E -g -pipe -fPIC -Wall $(DirInc) $< > $@
153 @cd $(dir $@) ; $(IRST_INSTALLDIR)/patch/patch4alice.prl $(notdir $@)
154
155$(DirOut)/%.viol : $(DirOut)/%.i
156 @echo $@ ; java rules.ALICE.ALICERuleChecker $< ./ > $@
fe88cf1b 157############################ Dependencies #####################################
158
159-include $(DepFile)
92017a47 160