Minor changes to make it work with new Top Makefile. Also have generated code separat...
[u/mrichter/AliRoot.git] / HLT / src / Makefile
CommitLineData
95a00d93 1#$Id$
2###########################
3# Makefile for HLT code. #
4# #
5# Author: Anders Vestbo #
475d367a 6# changes by C. Loizides #
95a00d93 7###########################
8
475d367a 9
17d8d094 10ifndef TOPDIR
11TOPDIR = `pwd`/..
05d3c0f8 12endif
152be1b5 13
17d8d094 14include $(TOPDIR)/Makefile.conf
108615fc 15
17d8d094 16DEFSTR = -Dno_root
475d367a 17OBJDIR = lib_alone
18INCLUDES = -I$(TOPDIR)/hough -I$(TOPDIR)/src -I$(TOPDIR)/comp -I$(TOPDIR)/misc
152be1b5 19
95a00d93 20ifeq ($(USEPACKAGE),ROOT)
21INCLUDES = -I$(ROOTSYS)/include -I$(TOPDIR)/hough -I$(TOPDIR)/src -I$(TOPDIR)/comp
152be1b5 22DEFSTR = -Duse_root
74eabe5f 23OBJDIR = lib_ROOT
95a00d93 24endif
25
26ifeq ($(USEPACKAGE),ALIROOT)
27INCLUDES = -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
05d3c0f8 28DEFSTR = -Duse_aliroot
475d367a 29OBJDIR = lib
95a00d93 30endif
108615fc 31
17d8d094 32ifdef DO_MC
33DEFSTR += -Ddo_mc
34endif
152be1b5 35
b419a833 36ifndef NOLOGGING
05d3c0f8 37DEFSTR += -Duse_logging
b419a833 38endif
05d3c0f8 39
475d367a 40DEFSTR += $(EXTRADEF)
41
05d3c0f8 42ifdef MLUCDIR
43INCLUDES += -I$(MLUCDIR)/include
44else
45INCLUDES += -I/prog/alice/level3/kip/MLUC/include
46endif
47
352eb143 48SRCS = AliL3ConfMapper.cxx AliL3ConfMapPoint.cxx AliLevel3.cxx\
49 AliL3ConfMapTrack.cxx AliL3ConfMapFit.cxx AliL3Track.cxx\
50 AliL3Transform.cxx AliL3TrackMerger.cxx AliL3VertexArray.cxx \
51 AliL3Vertex.cxx AliL3VertexFinder.cxx \
52 AliL3Merger.cxx AliL3GlobalMerger.cxx AliL3ClustFinderNew.cxx \
53 AliL3TrackArray.cxx AliL3InterMerger.cxx AliL3Logger.cxx \
c3dd27a3 54 AliL3MemHandler.cxx AliL3Benchmark.cxx AliL3Display.cxx
55
108615fc 56
475d367a 57DICT = AliL3Cint-$(USEPACKAGE).cxx
58DICTH = AliL3Cint-$(USEPACKAGE).h
59DICTO = $(OBJDIR)/AliL3Cint-$(USEPACKAGE).o
108615fc 60
95a00d93 61ifeq ($(USEPACKAGE),ROOT)
352eb143 62HDRS = $(SRCS:.cxx=.h) AliL3LinkDef.h
352eb143 63OBJS = $(patsubst %.cxx,$(OBJDIR)/%.o,$(SRCS)) $(DICTO)
95a00d93 64endif
65
66ifeq ($(USEPACKAGE),ALIROOT)
84122e15 67HDRS = $(SRCS:.cxx=.h) AliL3FileHandler.h AliL3Evaluate.h AliL3LinkDef.h
68OBJS = $(patsubst %.cxx,$(OBJDIR)/%.o,$(SRCS)) $(OBJDIR)/AliL3Evaluate.o $(OBJDIR)/AliL3FileHandler.o $(DICTO)
95a00d93 69endif
108615fc 70
475d367a 71ifeq ($(OBJDIR),lib_alone)
72HDRS = $(SRCS:.cxx=.h)
73OBJS = $(patsubst %.cxx,$(OBJDIR)/%.o,$(SRCS))
74endif
75
76
95a00d93 77LEVELSO = $(LIBDIR)/libAliL3.so
108615fc 78
cc4d912a 79all : $(OBJDIR) $(LIBDIR) $(LEVELSO)
108615fc 80
352eb143 81$(LEVELSO) : $(OBJS)
82 $(LD) $(SOFLAGS) $(LDFLAGS) $^ -o $@
108615fc 83
352eb143 84$(DICT) : $(HDRS)
85 @echo "Generating dictionary..."
95a00d93 86 @rootcint -f $(DICT) -c $(INCLUDES) $(HDRS)
108615fc 87
352eb143 88$(OBJDIR)/%.o : %.cxx
152be1b5 89 $(CXX) $(CXXFLAGS) $(DEFSTR) -c $(INCLUDES) -o $@ $<
108615fc 90
352eb143 91$(OBJDIR) :
92 test ! -e $(OBJDIR) && mkdir -p $(OBJDIR)
108615fc 93
cc4d912a 94$(LIBDIR) :
95 test ! -e $(LIBDIR) && mkdir -p $(LIBDIR)
96
352eb143 97clean :
98 rm -f $(OBJDIR)/*.o
95a00d93 99 rm -f $(LIBDIR)/libAliL3.so
475d367a 100 rm -f $(DICT) $(DICTH)
95a00d93 101
102so :
05d3c0f8 103 rm -f $(LIBDIR)/libAliL3.so