X-Git-Url: http://git.uio.no/git/?a=blobdiff_plain;f=HLT%2Fcomp%2FMakefile;h=88c43d7071245801ca32e7a9d10a2f86627e4fce;hb=9010b535962d0a65af3407e2f968e9ce9e653d32;hp=41a5384caa85401af0fd58b4659c59e5d1d2cd7f;hpb=735e167ee7ee111c9bdd25224403f4dddf6b33b5;p=u%2Fmrichter%2FAliRoot.git diff --git a/HLT/comp/Makefile b/HLT/comp/Makefile index 41a5384caa8..88c43d70712 100644 --- a/HLT/comp/Makefile +++ b/HLT/comp/Makefile @@ -1,50 +1,103 @@ -# -# Makefile for ROOT version of HLT code. -# -# Author: Anders Vestbo -# +#$Id$ +########################### +# Makefile for HLT code. # +# # +# Author: Anders Vestbo # +# changes by C. Loizides # +########################### -CXX = g++ -LD = g++ -CXXFLAGS = -O2 -Wall -fPIC -Woverloaded-virtual -LDFLAGS = -O2 -SOFLAGS = -shared -TOPDIR = $(HOME)/level3code -OBJDIR = tgt_Linux +ifndef TOPDIR +TOPDIR = `pwd`/.. +endif -SRCS = AliL3Modeller.cxx AliL3ModelTrack.cxx +include $(TOPDIR)/Makefile.conf -DICT = AliL3CompCint.cxx -DICTH = AliL3CompCint.h -DICTO = $(OBJDIR)/AliL3CompCint.o +DEFSTR = -Dno_root +OBJDIR = lib_alone +INCLUDES = -I$(TOPDIR)/hough -I$(TOPDIR)/src -I$(TOPDIR)/comp -I$(TOPDIR)/misc -HDRS = $(SRCS:.cxx=.h) AliL3CompLinkDef.h +ifeq ($(USEPACKAGE),ROOT) +INCLUDES = -I$(ROOTSYS)/include -I$(TOPDIR)/hough -I$(TOPDIR)/src -I$(TOPDIR)/comp +DEFSTR = -Duse_root +OBJDIR = lib_ROOT +endif -OBJS = $(patsubst %.cxx,$(OBJDIR)/%.o,$(SRCS)) $(DICTO) +ifeq ($(USEPACKAGE),ALIROOT) +INCLUDES = -I$(ROOTSYS)/include -I$(TOPDIR)/hough -I$(TOPDIR)/src -I$(TOPDIR)/comp -I$(ALICE_ROOT)/include/ -I$(ALICE_ROOT)/TPC -I$(ALICE_ROOT)/CONTAINERS -I$(ALICE_ROOT)/STEER +DEFSTR = -Duse_aliroot -Duse_root +OBJDIR = lib +endif -LEVELSO = $(LEVEL3)/lib_$(USERNAME)/libAliL3Comp.so +ifdef DO_MC +DEFSTR += -Ddo_mc +endif -all : $(OBJDIR) $(LEVELSO) +ifndef NOLOGGING +DEFSTR += -Duse_logging +endif +DEFSTR += $(EXTRADEF) + +ifdef MLUCDIR +INCLUDES += -I$(MLUCDIR)/include +else +INCLUDES += -I/prog/alice/level3/kip/MLUC/include +endif + +SRCS = AliL3Modeller.cxx AliL3ModelTrack.cxx + +DICT = AliL3CompCint-$(USEPACKAGE).cxx +DICTH = AliL3CompCint-$(USEPACKAGE).h +DICTO = $(OBJDIR)/AliL3CompCint-$(USEPACKAGE).o + +ifeq ($(USEPACKAGE),ROOT) +SRCS += AliL3Compress.cxx +HDRS = $(SRCS:.cxx=.h) bitio.h errhand.h AliL3CompLinkDef.h +OBJS = $(patsubst %.cxx,$(OBJDIR)/%.o,$(SRCS)) $(OBJDIR)/bitio.o $(OBJDIR)/errhand.o $(DICTO) +endif + +ifeq ($(USEPACKAGE),ALIROOT) +SRCS += AliL3Compress.cxx +HDRS = $(SRCS:.cxx=.h) bitio.h errhand.h AliL3CompLinkDef.h +OBJS = $(patsubst %.cxx,$(OBJDIR)/%.o,$(SRCS)) $(OBJDIR)/bitio.o $(OBJDIR)/errhand.o $(DICTO) +endif + +ifeq ($(OBJDIR),lib_alone) +HDRS = $(SRCS:.cxx=.h) bitio.h errhand.h +OBJS = $(patsubst %.cxx,$(OBJDIR)/%.o,$(SRCS)) $(OBJDIR)/bitio.o $(OBJDIR)/errhand.o +endif + + +LEVELSO = $(LIBDIR)/libAliL3Comp.so + +all : $(OBJDIR) $(LIBDIR) $(LEVELSO) $(LEVELSO) : $(OBJS) $(LD) $(SOFLAGS) $(LDFLAGS) $^ -o $@ $(DICT) : $(HDRS) @echo "Generating dictionary..." - @rootcint -f $(DICT) -c -I$(ROOTSYS) -I$(TOPDIR)/src/ $(HDRS) - + @rootcint -f $(DICT) -c $(INCLUDES) -DGCCVERSION=$(GCCVERSION) -include AliL3StandardIncludes.h $(HDRS) $(OBJDIR)/%.o : %.cxx - $(CXX) $(CXXFLAGS) -c -I$(ROOTSYS)/include -I$(TOPDIR)/src -I$(TOPDIR)/hough -o $@ $< + $(CXX) $(CXXFLAGS) $(DEFSTR) -c $(INCLUDES) -o $@ $< $(OBJDIR) : test ! -e $(OBJDIR) && mkdir -p $(OBJDIR) +$(LIBDIR) : + test ! -e $(LIBDIR) && mkdir -p $(LIBDIR) + +$(OBJDIR)/bitio.o : bitio.c + $(CXX) -c -o $(OBJDIR)/bitio.o bitio.c + +$(OBJDIR)/errhand.o : errhand.c + $(CXX) -c -o $(OBJDIR)/errhand.o errhand.c + clean : rm -f $(OBJDIR)/*.o - rm -f $(LEVEL3)/lib_$(USERNAME)/libAliL3Comp.so - rm $(DICT) $(DICTH) + rm -f $(LIBDIR)/libAliL3Comp.so + rm -f $(DICT) $(DICTH) so : - rm -f $(LEVEL3)/lib_$(USERNAME)/libAliL3Comp.so \ No newline at end of file + rm -f $(LIBDIR)/libAliL3Comp.so