From f0a268260f4734a5c56882e7832aca7aa1c4161c Mon Sep 17 00:00:00 2001 From: hristov Date: Tue, 9 Oct 2001 13:50:07 +0000 Subject: [PATCH] Conficuration files for the nonrecursive makefiles --- build/Makefile.HP-UX | 64 +++++++++++++++ build/Makefile.Linux | 54 +++++++++++++ build/Makefile.OSF1 | 77 ++++++++++++++++++ build/Makefile.SunOS | 53 +++++++++++++ build/Makefile.config | 8 ++ build/Makefile.solaris | 53 +++++++++++++ build/header.tpl | 26 ++++++ build/module.dep | 32 ++++++++ build/module.tpl | 176 +++++++++++++++++++++++++++++++++++++++++ 9 files changed, 543 insertions(+) create mode 100644 build/Makefile.HP-UX create mode 100644 build/Makefile.Linux create mode 100644 build/Makefile.OSF1 create mode 100644 build/Makefile.SunOS create mode 100644 build/Makefile.config create mode 100644 build/Makefile.solaris create mode 100644 build/header.tpl create mode 100644 build/module.dep create mode 100644 build/module.tpl diff --git a/build/Makefile.HP-UX b/build/Makefile.HP-UX new file mode 100644 index 00000000000..4187c555a4b --- /dev/null +++ b/build/Makefile.HP-UX @@ -0,0 +1,64 @@ +PLATFORM:= hpux + +# The compilers + +# The compilers +CXX = aCC +F77 = f77 +CC = aCC + +# Global optimisation +OPT = -O + +CXXOPTS = $(OPT) +Z -z +W70,495,740,749,823,829 +COPT = $(OPT) +FOPT = $(OPT) +ppu +Z + + + +CXXFLAGS = $(CXXOPTS) +CFLAGS = #-Wall -fPIC -pipe + +# rootcint flags +CINTFLAGS = #$(CXXFLAGS) + +# CERNLIB defines + +CLIBDEFS = -DCERNLIB_HPUX -DCERNLIB_BLDLIB -DCERNLIB_CZ +CLIBCXXOPTS = +CLIBCOPT = +z -Ae +CLIBFOPT = -WF,-P + +# Common Fortran compilation flags +FFLAGS = $(CLIBFOPT) $(CLIBDEFS) $(FOPT) + +LD = aCC +LDFLAGS = $(OPT) -z -Wl,+s -Wl,-E + +SHLD = $(LD) +SOFLAGS = -b /usr/lib/libm.sl + +LIBS = $(ROOTLIBS) +GLIBS = $(ROOTLIBS) -L/usr/lib/X11R6 -lX11 + +SOEXT = sl + +# additional ROOT libraries +ROOTLIBS += -lEGPythia6 -lcrypt + +# rmkdepend flags for building dependencies of FORTRAN files +DEPENDFFLAGS = $(FFLAGS) + + +LIBS = $(ROOTLIBS) +GLIBS = $(ROOTLIBS) -L/usr/lib/X11R6 -lX11 + +#System libraries +#SYSLIBS = -ldl -lbsd + +#EXEFLAGS+= -lg2c + + + + + diff --git a/build/Makefile.Linux b/build/Makefile.Linux new file mode 100644 index 00000000000..f32694ccbe9 --- /dev/null +++ b/build/Makefile.Linux @@ -0,0 +1,54 @@ +PLATFORM:=linux + +# The compilers +CXX = g++ +F77 = g77 +CC = gcc + +# Global optimisation +OPT = -O -g + +CXXOPTS = $(OPT) -Wall -fPIC -pipe +COPT = $(OPT) +FOPT = $(OPT) -fno-second-underscore +CXXFLAGS = $(CXXOPTS) +CFLAGS = -Wall -fPIC -pipe + +# rootcint flags +CINTFLAGS = #$(CXXFLAGS) + +# CERNLIB defines + +CLIBDEFS = -DCERNLIB_LINUX -DCERNLIB_BLDLIB -DCERNLIB_CZ +CLIBCXXOPTS = +CLIBCOPT = +CLIBFOPT = + +# Common Fortran compilation flags +FFLAGS = $(CLIBFOPT) $(CLIBDEFS) $(FOPT) + +LD = g++ +LDFLAGS = $(OPT) + +SHLD = $(LD) +SOFLAGS = -O2 -shared -Wl +SHLIB = +SOEXT = so + +# additional ROOT libraries +ROOTLIBS += -lEGPythia6 -lcrypt + +# rmkdepend flags for building dependencies of FORTRAN files +DEPENDFFLAGS = $(FFLAGS) + +LIBNOVER = `find /lib -name 'libNoVersion*.so' | xargs --replace basename {} .so | sed -e 's/lib/ -l/'` +GLIBS = -L/usr/X11R6/lib -lX11 $(LIBNOVER) + +#System libraries +SYSLIBS = -ldl -lbsd + +EXEFLAGS+= -lg2c + + + + diff --git a/build/Makefile.OSF1 b/build/Makefile.OSF1 new file mode 100644 index 00000000000..65523261c5b --- /dev/null +++ b/build/Makefile.OSF1 @@ -0,0 +1,77 @@ +# Makefile to build ALIROOT for OSF1 + +# Which Machine +PLATFORM = alpha + +# The compilers +CXX = cxx +F77 = f77 + +# Global optimisation +OPT = -O2 + +CXXOPTS = $(OPT) -nostdnew -rtti +COPT = $(OPT) +FOPT = $(OPT) -nofor_main -warn noinformational +CXXFLAGS = $(CXXOPTS) +CFLAGS = -fPIC -pipe -mcpu=ev5 -D__osf__ -D__alpha + +# rootcint flags +CINTFLAGS = $(filter-out -O2 -g -nostdnew -rtti,$(CXXFLAGS)) + +# rmkdepend flags for building dependencies of FORTRAN files +DEPENDFFLAGS = $(filter-out -warn noinformational,$(FFLAGS)) + +# CERNLIB defines + +CLIBDEFS = -DCERNLIB_DECS -DCERNLIB_BLDLIB -DCERNLIB_CZ +CLIBCXXOPTS = +CLIBCOPT = +CLIBFOPT = -I. -warn noinformational + +# Common Fortran compilation flags +FFLAGS = $(FOPT) $(CLIBFOPT) $(CLIBDEFS) + +LD = cxx +LDFLAGS = + +SHLD = ld +SOFLAGS = -L/usr/lib/cmplrs/cxx -rpath /usr/lib/cmplrs/cxx \ + -expect_unresolved "*" -msym -shared \ + /usr/lib/cmplrs/cc/crt0.o /usr/lib/cmplrs/cxx/_main.o +SOFLAGS += -lUfor -lfor -lFutil +SOFLAGS += -taso + +SHLIB = -lUfor -lfor -lFutil +SOEXT = so + +ROOTLIBS += + +#System libraries +SYSLIBS = -lbsd + +# Flags for static libraries +AFLAGS = $(filter-out -rpath /usr/lib/cmplrs/cxx -msym -shared /usr/lib/cmplrs/cc/crt0.o,$(SOFLAGS)) + +# Additional flags and libraries for building aliroot executable +EXEFLAGS += -lXm -lXt -lX11 -lPW -lUfor -lfor -lFutil -lots -lEGPythia6 +EXEFLAGS += -taso + +# Cure funny problem +# sometimes in dependencies system include files of the sort +# /usr/.../filename AND /usr/.../filename.cc are present +# DEC believes that /usr/.../filename is the executable to be +# built from /usr/.../filename.cc +# Just avoid this to happen + +% : %.cc + @; + + + + + + + + + diff --git a/build/Makefile.SunOS b/build/Makefile.SunOS new file mode 100644 index 00000000000..8a5b1fc53f6 --- /dev/null +++ b/build/Makefile.SunOS @@ -0,0 +1,53 @@ +# Makefile to build ALIROOT for SunOS + +# Which Machine +PLATFORM = solaris + +# The compilers +CXX = /opt/SUNWspro/bin/CC +CC = /opt/SUNWspro/bin/cc +F77 = f77 + +# Global optimisation +OPT = -O + +CXXOPTS = $(OPT) +w -KPIC -features=rtti +COPT = $(OPT) -KPIC -erroff=%none -DCERNLIB_SUN -DCERNLIB_BLDLIB -DCERNLIB_CZ +FOPT = $(OPT) -KPIC +CXXFLAGS = $(CXXOPTS) +CFLAGS = + +# rootcint flags +CINTFLAGS = $(filter-out -O +w -KPIC -features=rtti,$(CXXFLAGS)) + +# CERNLIB defines + +CLIBDEFS = -DCERNLIB_SUN -DCERNLIB_BLDLIB -DCERNLIB_CZ +CLIBCXXOPTS = +CLIBCOPT = +CLIBFOPT = -xpp=cpp + +SHLIB = -L/opt/SUNWspro/lib -lF77 -lM77 /opt/SUNWspro/lib/libsunmath.so.1 +SOEXT = so + +LD = /opt/SUNWspro/bin/CC +LDFLAGS = $(OPT) -Qoption ld -t + +SHLD = $(LD) +SOFLAGS = -G $(LDFLAGS) $(SHLIB) + +# Common Fortran compilation flags +FFLAGS = $(FOPT) $(CLIBFOPT) $(CLIBDEFS) + +# rmkdepend flags for building dependencies of FORTRAN files +DEPENDFFLAGS = $(FFLAGS) + +ROOTLIBS += -lm -ldl -lnsl -lsocket -lEG -lEGPythia6 + +# Additional flags and libraries for building aliroot executable +EXEFLAGS += -O -Qoption ld -t -L/usr/dt/lib -L/usr/openwin/lib -L/usr/ccs/lib -lXm -lXt -lX11 -lm -lgen -ldl -lsocket -lsunmath + + + + + diff --git a/build/Makefile.config b/build/Makefile.config new file mode 100644 index 00000000000..961e3644bff --- /dev/null +++ b/build/Makefile.config @@ -0,0 +1,8 @@ +# ROOT libraries +ROOTLIBS = $(shell $(ROOTSYS)/bin/root-config --glibs) -lMinuit -lHtml -lEG +ROOTLIBS := $(filter-out -lNew,$(ROOTLIBS)) +ROOTLIBS += -L/usr/X11R6/lib -lX11 + +# Additional flags for building aliroot executable +EXEFLAGS = + diff --git a/build/Makefile.solaris b/build/Makefile.solaris new file mode 100644 index 00000000000..849d953d143 --- /dev/null +++ b/build/Makefile.solaris @@ -0,0 +1,53 @@ +# Makefile to build ALIROOT for SunOS + +# Which Machine +PLATFORM = solaris + +# The compilers +CXX = /opt/SUNWspro/bin/CC +CC = /opt/SUNWspro/bin/cc +F77 = f77 + +# Global optimisation +OPT = -O + +CXXOPTS = $(OPT) +w -KPIC -features=rtti +COPT = $(OPT) -KPIC -erroff=%none +FOPT = $(OPT) -KPIC +CXXFLAGS = $(CXXOPTS) +CFLAGS = + +# rootcint flags +CINTFLAGS = $(filter-out -O +w -KPIC -features=rtti,$(CXXFLAGS)) + +# CERNLIB defines + +CLIBDEFS = -DCERNLIB_SUN -DCERNLIB_BLDLIB -DCERNLIB_CZ +CLIBCXXOPTS = +CLIBCOPT = +CLIBFOPT = -xpp=cpp + +SHLIB = -L/opt/SUNWspro/lib -lF77 -lM77 /opt/SUNWspro/lib/libsunmath.so.1 +SOEXT = so + +LD = /opt/SUNWspro/bin/CC +LDFLAGS = $(OPT) -Qoption ld -t + +SHLD = $(LD) +SOFLAGS = -G $(LDFLAGS) $(SHLIB) + +# Common Fortran compilation flags +FFLAGS = $(FOPT) $(CLIBFOPT) $(CLIBDEFS) + +# rmkdepend flags for building dependencies of FORTRAN files +DEPENDFFLAGS = $(FFLAGS) + +ROOTLIBS += -lm -ldl -lnsl -lsocket -lEG -lEGPythia6 + +# Additional flags and libraries for building aliroot executable +EXEFLAGS += -O -Qoption ld -t -L/usr/dt/lib -L/usr/openwin/lib -L/usr/ccs/lib -lXm -lXt -lX11 -lm -lgen -ldl -lsocket -lsunmath + + + + + diff --git a/build/header.tpl b/build/header.tpl new file mode 100644 index 00000000000..ba49911e5cf --- /dev/null +++ b/build/header.tpl @@ -0,0 +1,26 @@ + + +#********** This part is for package @PACKAGE@ *********** + +#Determine if it's a library or a executable +TYPE=@TYPE@ + +# Package head directory, source and include directories +MODDIR:=@MODULE@ +MODDIRS:=$(MODDIR) +MODDIRI:=$(MODDIR) +MODDIRO:=$(MODDIR)/tgt_$(ALICE_TARGET) + +# Reseting variables before importing pkg-file +SRCS:= +HDRS:= +FSRCS:= +DHDR:= +CSRCS:= +CHDRS:= +EINCLUDE:= +ELIBS:= +ELIBSDIR:= +PACKFFLAGS:= +PACKCXXFLAGS:= +PACKCFLAGS:= diff --git a/build/module.dep b/build/module.dep new file mode 100644 index 00000000000..a4bf0a3548b --- /dev/null +++ b/build/module.dep @@ -0,0 +1,32 @@ + +ALIFAST/module.mk: ALIFAST/libALIFAST.pkg +ALIROOT/module.mk: ALIROOT/binaliroot.pkg +CASTOR/module.mk: CASTOR/libCASTOR.pkg +CONTATINERS/module.mk: CONTAINERS/libCONTAINERS.pkg +EMCAL/module.mk: EMCAL/libEMCAL.pkg +EVGEN/module.mk: EVGEN/libEVGEN.pkg +FMD/module.mk: FMD/libFMD.pkg +GEANT321/module.mk: GEANT321/libgeant321.pkg +HIJING/module.mk: HIJING/libhijing.pkg +ITS/module.mk: ITS/libITS.pkg +MEVSIM/module.mk: MEVSIM/libmevsim.pkg +MINICERN/module.mk: MINICERN/libminicern.pkg +MUON/module.mk: MUON/libMUON.pkg +PDF/moudle.mk: PDF/libpdf.pkg +PHOS/module.mk: PHOS/libPHOS.pkg +PMD/module.mk: PMD/libPMD.pkg +PYTHIA/module.mk: PYTHIA/libpythia.pkg +PYTHIA6/module.mk: PYTHIA6/libpythia6.pkg PYTHIA6/libdummypythia6.pkg +RALICE/module.mk: RALICE/libRALICE.pkg +RICH/module.mk: RICH/libRICH.pkg +START/module.mk: START/libSTART.pkg +STEER/module.mk: STEER/libSTEER.pkg +STRUCT/module.mk: STRUCT/libSTRUCT.pkg +TGeant3/module.mk: TGeant3/libTGeant3.pkg +THijing/module.mk: THijing/libTHijing.pkg +TMEVSIM/module.mk: TMEVSIM/libTMevSim.pkg +TOF/module.mk: TOF/libTOF.pkg +TPC/module.mk: TPC/libTPC.pkg +TRD/module.mk: TRD/libTRD.pkg +ZDC/module.mk: ZDC/libZDC.pkg +LHC/module.mk: LHC/libLHC.pkg diff --git a/build/module.tpl b/build/module.tpl new file mode 100644 index 00000000000..5aebb6b01e9 --- /dev/null +++ b/build/module.tpl @@ -0,0 +1,176 @@ + +ifndef PACKFFLAGS +@PACKAGE@FFLAGS:=$(FFLAGS) +else +@PACKAGE@FFLAGS:=$(PACKFFLAGS) +endif + +ifndef PACKCFLAGS +@PACKAGE@CFLAGS:=$(CFLAGS) +else +@PACKAGE@CFLAGS:=$(PACKCFLAGS) +endif + +ifndef PACKCXXFLAGS +@PACKAGE@CXXFLAGS:=$(CXXFLAGS) +else +@PACKAGE@CXXFLAGS:=$(PACKCXXFLAGS) +endif + + +ifdef DHDR +WITHDICT=YES +else +WITHDICT= +endif + +#Extra include,libs etc. +@PACKAGE@INC:=$(patsubst %,-I$(MODDIR)/%,$(EINCLUDE)) +@PACKAGE@ELIBS:=$(patsubst %,-l%,$(ELIBS)) +@PACKAGE@ELIBSDIR:=$(patsubst %,-L%,$(ELIBSDIR)) + +#c sources and headers + +@PACKAGE@CS:=$(patsubst %,$(MODDIR)/%,$(CSRCS)) +@PACKAGE@CH:=$(patsubst %,$(MODDIR)/%,$(CHDRS)) + +#Fortran sources +@PACKAGE@FS:=$(patsubst %,$(MODDIR)/%,$(FSRCS)) + +#c++ sources and header +@PACKAGE@S:=$(patsubst %,$(MODDIR)/%,$(SRCS)) +@PACKAGE@H:=$(patsubst %,$(MODDIR)/%,$(HDRS)) + + +# Package Dictionary + +@PACKAGE@DH:=$(MODDIR)/$(DHDR) + + +#All objects +@PACKAGE@CO:=$(patsubst %,$(MODDIRO)/%, $(CSRCS:.c=.o)) +TEMP:=$(FSRCS:.F=.o) +@PACKAGE@FO:=$(patsubst %,$(MODDIRO)/%, $(TEMP:.f=.o)) +@PACKAGE@O:= $(patsubst %,$(MODDIRO)/%, $(SRCS:.cxx=.o)) $(@PACKAGE@FO) $(@PACKAGE@CO) + +ifdef WITHDICT + @PACKAGE@DS:=$(MODDIRO)/G__@PACKAGE@.cxx + @PACKAGE@DO:=$(MODDIRO)/G__@PACKAGE@.o + @PACKAGE@DDEP:=$(@PACKAGE@DO:.o=.d) + @PACKAGE@DEP:=$(@PACKAGE@O:.o=.d) $(@PACKAGE@DDEP) +else + @PACKAGE@DS:= + @PACKAGE@DO:= + @PACKAGE@DDEP:= + @PACKAGE@DEP:=$(@PACKAGE@O:.o=.d) +endif + + +#The actual library file + +@PACKAGE@LIB:=$(LIBPATH)/lib@PACKAGE@.$(SOEXT) + +#The actual binary file + +@PACKAGE@BIN:=$(BINPATH)/@PACKAGE@ + + +# for using in the main Makefile + +ifeq ($(TYPE),lib) +ALLLIBS += $(@PACKAGE@LIB) +BINLIBS += -l@PACKAGE@ +else +ALLEXECS += $(@PACKAGE@BIN) +endif + +# include all dependency files +INCLUDEFILES +=$(@PACKAGE@DEP) + + +#local rules + +$(@PACKAGE@LIB):$(@PACKAGE@O) $(@PACKAGE@DO) @MODULE@/module.mk + @echo "***** Linking library $@ *****" + $(SHLD) $(SOFLAGS) $(@PACKAGE@ELIBSDIR) $(@PACKAGE@ELIBS) $(SHLIB) -o $@ $(@PACKAGE@O) $(@PACKAGE@DO) + +$(@PACKAGE@BIN):$(@PACKAGE@O) $(@PACKAGE@DO) @MODULE@/module.mk + @echo "***** Makeing executable $@ *****" + $(LD) $(LDFLAGS) $(@PACKAGE@O) $(@PACKAGE@DO) $(BINLIBDIRS) $(LIBS) $(@PACKAGE@ELIBS) $(EXEFLAGS) -o $@ + +$(@PACKAGE@DS): $(@PACKAGE@H) $(@PACKAGE@DH) + @echo "***** Creating $@ *****"; + @(if [ ! -d '$(dir $@)' ]; then echo "***** Making directory $(dir $@) *****"; mkdir -p $(dir $@); fi;) + @rootcint -f $@ -c $(CINTFLAGS) $^ + +$(@PACKAGE@DO): $(@PACKAGE@DS) + @echo "***** (Re)compiling $< *****"; + @$(CXX) -c $< -o $@ $(CXXFLAGS) + +#Different targets for the module + +all-@PACKAGE@: $(@PACKAGE@LIB) + + +depend-@PACKAGE@: $(@PACKAGE@DEP) + +# determination of object files +$(MODDIRO)/%.o: $(MODDIR)/%.cxx $(MODDIRO)/%.d + @echo "***** (Re)compiling $< *****"; + @(if [ ! -d '$(dir $@)' ]; then echo "***** Making directory $(dir $@) *****"; mkdir -p $(dir $@); fi;) + $(CXX) -c $(@PACKAGE@INC) $< -o $@ $(@PACKAGE@CXXFLAGS) + +$(MODDIRO)/%.o: $(MODDIR)/%.F $(MODDIRO)/%.d + @echo "***** (Re)compiling $< *****"; + @(if [ ! -d '$(dir $@)' ]; then echo "***** Making directory $(dir $@) *****"; mkdir -p $(dir $@); fi;) + $(F77) -c $(@PACKAGE@INC) $< -o $@ $(@PACKAGE@FFLAGS) + +$(MODDIRO)/%.o: $(MODDIR)/%.f $(MODDIRO)/%.d + @echo "***** (Re)compiling $< *****"; + @(if [ ! -d '$(dir $@)' ]; then echo "***** Making directory $(dir $@) *****"; mkdir -p $(dir $@); fi;) + $(F77) -c $(@PACKAGE@INC) $< -o $@ $(@PACKAGE@FFLAGS) + +$(MODDIRO)/%.o: $(MODDIR)/%.c $(MODDIRO)/%.d + @echo "***** (Re)compiling $< *****"; + @(if [ ! -d '$(dir $@)' ]; then echo "***** Making directory $(dir $@) *****"; mkdir -p $(dir $@); fi;) + $(CC) -c $< -o $@ $(@PACKAGE@INC) $(@PACKAGE@CFLAGS) + +$(@PACKAGE@DDEP): $(@PACKAGE@DS) + @echo "***** Making dependencies for $< *****"; + @(if [ ! -d '$(dir $@)' ]; then echo "***** Making directory $(dir $@) *****"; mkdir -p $(dir $@); fi;) + @share/alibtool depend "$(@PACKAGE@ELIBSDIR) $(@PACKAGE@INC) $(DEPINC) $<" > $@ + +$(MODDIRO)/%.d: $(MODDIRS)/%.cxx + @echo "***** Making dependencies for $< *****"; + @(if [ ! -d '$(dir $@)' ]; then echo "***** Making directory $(dir $@) *****"; mkdir -p $(dir $@); fi;) + @share/alibtool depend "$(@PACKAGE@ELIBSDIR) $(@PACKAGE@INC) $(DEPINC) $<" > $@ +$(MODDIRO)/%.d: $(MODDIRS)/%.f + @echo "***** Making dependencies for $< *****"; + @(if [ ! -d '$(dir $@)' ]; then echo "***** Making directory $(dir $@) *****"; mkdir -p $(dir $@); fi;) + @share/alibtool dependF "$(@PACKAGE@ELIBSDIR) $(@PACKAGE@INC) $(DEPINC) $<" > $@ +$(MODDIRO)/%.d: $(MODDIRS)/%.F + @echo "***** Making dependencies for $< *****"; + @(if [ ! -d '$(dir $@)' ]; then echo "***** Making directory $(dir $@) *****"; mkdir -p $(dir $@); fi;) + @share/alibtool dependF "$(@PACKAGE@ELIBSDIR) $(@PACKAGE@INC) $(DEPINC) $<" > $@ +$(MODDIRO)/%.d: $(MODDIRS)/%.c + @echo "***** Making dependencies for $< *****"; + @(if [ ! -d '$(dir $@)' ]; then echo "***** Making directory $(dir $@) *****"; mkdir -p $(dir $@); fi;) + @share/alibtool depend "$(@PACKAGE@ELIBSDIR) $(@PACKAGE@INC) $(DEPINC) $<" > $@ + + +#Directory creation + +#$(MODDIRO): +# @echo "***** Making $@ *****" +# mkdir -p $@ + + + + + + + + + + + -- 2.39.3