]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - HLT/comp/Makefile
Minor changes to make it work with new Top Makefile. Also have generated code separat...
[u/mrichter/AliRoot.git] / HLT / comp / Makefile
index b9268c38a925a6aef18e17f3834ca4265526c352..593e7c4ea0e47ecbfef610fcc8e40380068867be 100644 (file)
@@ -3,45 +3,41 @@
 # Makefile for HLT code.  #
 #                         #
 # Author: Anders Vestbo   #                    
+# changes by C. Loizides  #
 ###########################
 
-ifndef USEPACKAGE
-#USEPACKAGE = ROOT
-USEPACKAGE = ALIROOT
-endif
-
-#used if USEPACKAGE=anything else
-DEFSTR = -Dno_root
-
-CXX         = g++
-LD          = g++
-CXXFLAGS    = -O2 -Wall -fPIC -Woverloaded-virtual
-LDFLAGS     = -O2
-SOFLAGS     = -shared
 
 ifndef TOPDIR
-TOPDIR = $(HOME)/level3code
-endif
-ifndef LIBDIR
-LIBDIR = $(LEVEL3)/lib_$(USERNAME)
+TOPDIR = `pwd`/..
 endif
-OBJDIR = lib
+
+include $(TOPDIR)/Makefile.conf
+
+DEFSTR = -Dno_root
+OBJDIR = lib_alone
+INCLUDES = -I$(TOPDIR)/hough -I$(TOPDIR)/src -I$(TOPDIR)/comp -I$(TOPDIR)/misc
 
 ifeq ($(USEPACKAGE),ROOT) 
 INCLUDES = -I$(ROOTSYS)/include -I$(TOPDIR)/hough -I$(TOPDIR)/src -I$(TOPDIR)/comp
 DEFSTR = -Duse_root
+OBJDIR = lib_ROOT
 endif
 
 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
 
-#Save the particle id's
-#DEFSTR += -Ddo_mc
+ifdef DO_MC
+DEFSTR += -Ddo_mc
+endif
 
-#Use logging classes
+ifndef NOLOGGING
 DEFSTR += -Duse_logging
+endif
+
+DEFSTR += $(EXTRADEF)
 
 ifdef MLUCDIR
 INCLUDES += -I$(MLUCDIR)/include
@@ -51,19 +47,24 @@ endif
 
 SRCS   = AliL3Modeller.cxx AliL3ModelTrack.cxx AliL3Compress.cxx
 
-DICT = AliL3CompCint.cxx
-DICTH = AliL3CompCint.h
-DICTO = $(OBJDIR)/AliL3CompCint.o
 
-HDRS = $(SRCS:.cxx=.h) bitio.h errhand.h AliL3CompLinkDef.h
+DICT  = AliL3CompCint-$(USEPACKAGE).cxx
+DICTH = AliL3CompCint-$(USEPACKAGE).h
+DICTO = $(OBJDIR)/AliL3CompCint-$(USEPACKAGE).o
 
+HDRS = $(SRCS:.cxx=.h) bitio.h errhand.h AliL3CompLinkDef.h
 OBJS = $(patsubst %.cxx,$(OBJDIR)/%.o,$(SRCS)) $(OBJDIR)/bitio.o $(OBJDIR)/errhand.o $(DICTO)
 
+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 $@
 
@@ -71,7 +72,6 @@ $(DICT) : $(HDRS)
        @echo "Generating dictionary..."
        @rootcint -f $(DICT) -c $(INCLUDES) $(HDRS)
 
-
 $(OBJDIR)/%.o : %.cxx 
        $(CXX) $(CXXFLAGS) $(DEFSTR) -c $(INCLUDES) -o $@ $<
 
@@ -83,12 +83,13 @@ $(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 $(LIBDIR)/libAliL3Comp.so
-       rm $(DICT) $(DICTH) 
+       rm -f $(DICT) $(DICTH)
 so :
-       rm -f $(LIBDIR)/libAliL3Comp.so
\ No newline at end of file
+       rm -f $(LIBDIR)/libAliL3Comp.so