More improved Makefile, setting logging paths, TOPDIR and LIBDIR.
[u/mrichter/AliRoot.git] / HLT / hough / Makefile
CommitLineData
e998e586 1#$Id$
2###########################
3# Makefile for HLT code. #
4# #
5# Author: Anders Vestbo #
6###########################
4de874d1 7
b5a207b4 8#USEPACKAGE = ROOT
9USEPACKAGE = ALIROOT
10
e2e0cb81 11DEFSTR = -Dno_root
12
c05bc6c5 13CXX = g++
14LD = g++
15CXXFLAGS = -O2 -Wall -fPIC
16LDFLAGS = -O2
17SOFLAGS = -shared
4de874d1 18
c05bc6c5 19TOPDIR = $(HOME)/level3code
e998e586 20OBJDIR = lib
21LIBDIR = $(LEVEL3)/lib_$(USERNAME)
4de874d1 22
b5a207b4 23ifeq ($(USEPACKAGE),ROOT)
24INCLUDES = -I$(ROOTSYS)/include -I$(TOPDIR)/hough -I$(TOPDIR)/src -I$(TOPDIR)/comp
e2e0cb81 25DEFSTR = -Duse_root
b5a207b4 26endif
27
28ifeq ($(USEPACKAGE),ALIROOT)
29INCLUDES = -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
e2e0cb81 30DEFSTR = -Duse_aliroot -Duse_root
b5a207b4 31endif
32
e2e0cb81 33#Save the particle id's
34#DEFSTR += -Ddo_mc
35
c05bc6c5 36SRCS = AliL3HoughTransformer.cxx AliL3Hough.cxx AliL3HoughTrack.cxx\
37 AliL3HoughMaxFinder.cxx AliL3HoughEval.cxx AliL3HoughMerger.cxx \
38 AliL3Histogram.cxx AliL3Histogram1D.cxx \
e2e0cb81 39 AliL3HoughIntMerger.cxx AliL3HoughGlobalMerger.cxx GetGoodParticles.cxx
4de874d1 40
c05bc6c5 41DICT = AliL3HoughCint.cxx
42DICTH = AliL3HoughCint.h
43DICTO = $(OBJDIR)/AliL3HoughCint.o
4de874d1 44
c05bc6c5 45HDRS = $(SRCS:.cxx=.h) AliL3HoughLinkDef.h
4de874d1 46
c05bc6c5 47OBJS = $(patsubst %.cxx,$(OBJDIR)/%.o,$(SRCS)) $(DICTO)
9f33a1db 48
e998e586 49LEVELSO = $(LIBDIR)/libAliL3Hough.so
4de874d1 50
cc4d912a 51all : $(OBJDIR) $(LIBDIR) $(LEVELSO)
4de874d1 52
c05bc6c5 53$(LEVELSO) : $(OBJS)
54 $(LD) $(SOFLAGS) $(LDFLAGS) $^ -o $@
4de874d1 55
c05bc6c5 56$(DICT) : $(HDRS)
57 @echo "Generating dictionary..."
b5a207b4 58 @rootcint -f $(DICT) -c $(INCLUDES) $(HDRS)
4de874d1 59
4de874d1 60
c05bc6c5 61$(OBJDIR)/%.o : %.cxx
e2e0cb81 62 $(CXX) $(CXXFLAGS) $(DEFSTR) -c $(INCLUDES) -o $@ $<
4de874d1 63
c05bc6c5 64$(OBJDIR) :
65 test ! -e $(OBJDIR) && mkdir -p $(OBJDIR)
cc4d912a 66$(LIBDIR) :
67 test ! -e $(LIBDIR) && mkdir -p $(LIBDIR)
4de874d1 68
c05bc6c5 69clean :
70 rm -f $(OBJDIR)/*.o
e998e586 71 rm -f $(LIBDIR)/libAliL3Hough.so
72 rm $(DICT) $(DICTH)
73
74so:
75 rm -f $(LIBDIR)/libAliL3Hough.so