]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
Private make restored
authorkir <kir@f7af4fe6-9843-0410-8265-dc069ae4e863>
Thu, 9 Dec 2004 08:45:32 +0000 (08:45 +0000)
committerkir <kir@f7af4fe6-9843-0410-8265-dc069ae4e863>
Thu, 9 Dec 2004 08:45:32 +0000 (08:45 +0000)
RICH/RichMake [new file with mode: 0644]

diff --git a/RICH/RichMake b/RICH/RichMake
new file mode 100644 (file)
index 0000000..61a9536
--- /dev/null
@@ -0,0 +1,80 @@
+Module                 :=RICH
+
+include        lib$(Module).pkg
+
+Sources        :=$(SRCS)
+
+RootTarget      :=$(shell root-config --arch)
+OutputDir      :=$(MY_LIB)/$(Module)
+SoLib          :=$(MY_LIB)/lib$(Module).so
+
+ifeq ($(RootTarget),linuxicc)
+ Compiler      :=icc
+ CompilerOptions:=-O0 -fpstkchk -I$(shell root-config --incdir) -I$(ALICE_ROOT)/include
+ SoOptions      := -Wl,-soname,lib$(Module).so -shared -O -g   
+else
+ Compiler       :=g++
+ CompilerOptions:=-g -W -Wall -Werror -fPIC -pipe -fmessage-length=0 -Wno-long-long -pedantic-errors -ansi -I$(shell root-config --incdir) -I$(ALICE_ROOT)/include
+ SoOptions      :=-O -g -shared -Wl,-soname,lib$(Module).so  
+endif
+
+ifdef ALIVERBOSE
+       Mute            :=
+else
+       Mute            :=@        
+endif        
+
+Headers          := $(Sources:.cxx=.h)  $(Module)LinkDef.h
+
+DictSource    := $(OutputDir)/G__$(Module).cxx
+DictHeader    := $(DictSource:.cxx=.h)
+DictObject    := $(DictSource:.cxx=.o)
+
+
+Objects         := $(patsubst %.cxx,$(OutputDir)/%.o,$(Sources)) $(DictObject)
+
+
+DepFile                := $(OutputDir)/$(Module).d
+
+##### TARGETS #####
+
+$(SoLib):       $(Objects)
+       @echo "Creating $@"
+       $(Mute)$(Compiler) $(SoOptions) $^ -o $@        
+
+$(DepFile):    $(Headers)
+       @[ -d $(OutputDir) ] || mkdir -p $(OutputDir)
+       @touch $(DepFile)
+       @echo "Generating dependency $@"
+       $(Mute)rmkdepend -f$(DepFile) -p$(OutputDir)/ -- $(CxxFlags) -- $(Sources) 2>/dev/null
+
+$(DictSource):  $(Headers)
+       @echo "Generating $@"
+       $(Mute)rootcint -f $@ -c $(filter -I%,$(CompilerOptions)) $^
+
+$(DictObject) : $(DictSource)
+       @echo "Compiling $^"        
+       $(Mute)$(Compiler) $(CompilerOptions) -I. -c $^ -o $@
+
+show:
+       @echo "Headers: $(Headers)"
+       @echo "Sources: $(Sources)"
+       @echo "Depend : $(DepFile)"
+       @echo "Objects: $(Objects)"
+       @echo "Library: $(SoLib)"
+
+spec:  $(Sources)
+       @echo $^
+       @echo $@
+                
+clean:
+       @echo "Cleaning..."
+       $(Mute)rm -rf $(Objects) $(DictSource) $(DictHeader) $(SoLib) $(DepFile)                  
+
+############################ cxx rule #########################################
+$(OutputDir)/%.o : %.cxx
+       @echo $*.cxx
+       $(Mute)$(Compiler) $(CompilerOptions) -c $*.cxx -o $(OutputDir)/$*.o
+############################ Dependencies #####################################
+
+-include $(DepFile)