New makefile. Written by me, hence better
authorvestbo <vestbo@f7af4fe6-9843-0410-8265-dc069ae4e863>
Wed, 23 Jan 2002 17:27:00 +0000 (17:27 +0000)
committervestbo <vestbo@f7af4fe6-9843-0410-8265-dc069ae4e863>
Wed, 23 Jan 2002 17:27:00 +0000 (17:27 +0000)
HLT/hough/Makefile

index 349b779..31269dd 100644 (file)
@@ -1,81 +1,50 @@
-############################### TPC Makefile ##################################
+#
+# Makefile for ROOT (no aliroot) version of HLT code.
+#
+# Author: Anders Vestbo                       
+#
 
-# Include machine specific definitions
+CXX         = g++
+LD          = g++
+CXXFLAGS    = -O2 -Wall -fPIC
+LDFLAGS     = -O2
+SOFLAGS     = -shared
 
-include $(ALICE_ROOT)/conf/GeneralDef
-include $(ALICE_ROOT)/conf/MachineDef.$(ALICE_TARGET)
+TOPDIR = $(HOME)/level3code
+OBJDIR = tgt_Linux
 
-PACKAGE = AliL3Hough
+SRCS   = AliL3HoughTransformer.cxx AliL3Hough.cxx AliL3HoughTrack.cxx\
+         AliL3HoughMaxFinder.cxx AliL3HoughEval.cxx AliL3HoughMerger.cxx \
+         AliL3Histogram.cxx AliL3Histogram1D.cxx \
+         AliL3HoughIntMerger.cxx AliL3HoughGlobalMerger.cxx 
 
-# C++ sources
+DICT = AliL3HoughCint.cxx
+DICTH = AliL3HoughCint.h
+DICTO = $(OBJDIR)/AliL3HoughCint.o
 
+HDRS = $(SRCS:.cxx=.h) AliL3HoughLinkDef.h
 
-SRCS          = AliL3HoughTransformer.cxx AliL3Hough.cxx AliL3HoughTrack.cxx\
-                AliL3HoughMaxFinder.cxx AliL3HoughEval.cxx AliL3HoughMerger.cxx \
-                AliL3Histogram.cxx AliL3Histogram1D.cxx GetGoodParticles.cxx AliL3ClusterFinder.cxx \
-                AliL3HoughIntMerger.cxx AliL3HoughGlobalMerger.cxx AliL3HoughDisplay.cxx
+OBJS = $(patsubst %.cxx,$(OBJDIR)/%.o,$(SRCS)) $(DICTO)
 
+LEVELSO = $(LEVEL3)/lib_$(USERNAME)/libAliL3Hough.so
 
-# C++ Headers
+all : $(OBJDIR) $(LEVELSO)
 
-HDRS          = $(SRCS:.cxx=.h) AliL3Defs.h GetGoodParticles.h AliL3HoughLinkDef.h
-# Library dictionary
+$(LEVELSO) : $(OBJS)
+       $(LD) $(SOFLAGS) $(LDFLAGS) $^ -o $@
 
-DICT          = AliL3HoughCint.cxx
-DICTH         = $(DICT:.cxx=.h)
-DICTO         = $(patsubst %.cxx,tgt_$(ALICE_TARGET)/%.o,$(DICT))
+$(DICT) : $(HDRS)
+       @echo "Generating dictionary..."
+       @rootcint -f $(DICT) -c -I$(ROOTSYS) -I$(TOPDIR)/src $(HDRS)
 
-# FORTRAN Objectrs
 
-FOBJS         = $(FSRCS:.f=.o)
+$(OBJDIR)/%.o : %.cxx 
+       $(CXX) $(CXXFLAGS) -c -I$(ROOTSYS)/include -I$(TOPDIR)/src -I$(TOPDIR)/hough -o $@ $<
 
-# C Objects
+$(OBJDIR) : 
+       test ! -e $(OBJDIR) && mkdir -p $(OBJDIR)
 
-COBJS         = $(CSRCS:.c=.o)
-
-# C++ Objects
-
-OBJS          = $(patsubst %.cxx,tgt_$(ALICE_TARGET)/%.o,$(SRCS)) $(DICTO)
-
-# C++ compilation flags
-
-CXXFLAGS      = $(CXXOPTS) -g -Wall -I$(ROOTSYS)/include -I. -I$(ALICE_ROOT)/include/ -I$(ALICE_ROOT)/TPC \
-               -I$(ALICE_ROOT)/CONTAINERS -I$(HOME)/level3code/src     
-
-#CXXFLAGS      = $(CXXOPTS) -g -Wall -I$(ROOTSYS)/include -I. -I $(ALICE_ROOT)/TPC -I$(ALICE_ROOT)/include/ -DCOMPILING
-# FORTRAN compilation flags
-
-FFLAGS      = $(FOPT)
-##### TARGETS #####
-# Target
-
-SLIBRARY       = $(LEVEL3)/lib_$(USERNAME)/libAliL3Hough.$(SL)
-
-default:       $(SLIBRARY)
-
-$(LEVEL3)/lib_$(USERNAME)/libAliL3Hough.$(SL):  $(OBJS)
-
-$(DICT):               $(HDRS)
-
-depend:                        $(SRCS)
-
-TOCLEAN                        = $(OBJS) *Cint.h *Cint.cxx
-
-############################### General Macros ################################
-
-include $(ALICE_ROOT)/conf/GeneralMacros
-
-############################ Dependencies #####################################
-
-include tgt_$(ALICE_TARGET)/Make-depend 
-
-###########
-so:
-       rm -fr $(LEVEL3)/lib_$(USERNAME)/libAliL3Hough.so
-clean:
-       rm -fr tgt_Linux/*.o
-       rm -fr $(LEVEL3)/lib_$(USERNAME)/libAliL3Hough.so
-       rm -fr $(DICT) $(DICTH) $(DICTO)
+clean :
+       rm -f $(OBJDIR)/*.o
+       rm -f $(LEVEL3)/lib_$(USERNAME)/libAliL3Hough.so
+       rm $(DICT) $(DICTH) 
\ No newline at end of file