Changes for independant library of standalone l3 code.
[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
a33d7f86 28DEFSTR = -Duse_aliroot -Duse_root
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
61ec2ed0 48SRCS = AliL3ConfMapper.cxx AliL3ConfMapPoint.cxx \
352eb143 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 \
61ec2ed0 54 AliL3MemHandler.cxx AliLevel3.cxx AliL3Benchmark.cxx
c3dd27a3 55
108615fc 56
475d367a 57DICT = AliL3Cint-$(USEPACKAGE).cxx
58DICTH = AliL3Cint-$(USEPACKAGE).h
59DICTO = $(OBJDIR)/AliL3Cint-$(USEPACKAGE).o
108615fc 60
95a00d93 61ifeq ($(USEPACKAGE),ROOT)
61ec2ed0 62SRCS += AliL3Display.cxx
352eb143 63HDRS = $(SRCS:.cxx=.h) AliL3LinkDef.h
352eb143 64OBJS = $(patsubst %.cxx,$(OBJDIR)/%.o,$(SRCS)) $(DICTO)
95a00d93 65endif
66
67ifeq ($(USEPACKAGE),ALIROOT)
61ec2ed0 68SRCS += AliL3Display.cxx
84122e15 69HDRS = $(SRCS:.cxx=.h) AliL3FileHandler.h AliL3Evaluate.h AliL3LinkDef.h
70OBJS = $(patsubst %.cxx,$(OBJDIR)/%.o,$(SRCS)) $(OBJDIR)/AliL3Evaluate.o $(OBJDIR)/AliL3FileHandler.o $(DICTO)
95a00d93 71endif
108615fc 72
475d367a 73ifeq ($(OBJDIR),lib_alone)
74HDRS = $(SRCS:.cxx=.h)
75OBJS = $(patsubst %.cxx,$(OBJDIR)/%.o,$(SRCS))
76endif
77
78
95a00d93 79LEVELSO = $(LIBDIR)/libAliL3.so
108615fc 80
cc4d912a 81all : $(OBJDIR) $(LIBDIR) $(LEVELSO)
108615fc 82
352eb143 83$(LEVELSO) : $(OBJS)
84 $(LD) $(SOFLAGS) $(LDFLAGS) $^ -o $@
108615fc 85
352eb143 86$(DICT) : $(HDRS)
87 @echo "Generating dictionary..."
95a00d93 88 @rootcint -f $(DICT) -c $(INCLUDES) $(HDRS)
108615fc 89
352eb143 90$(OBJDIR)/%.o : %.cxx
152be1b5 91 $(CXX) $(CXXFLAGS) $(DEFSTR) -c $(INCLUDES) -o $@ $<
108615fc 92
352eb143 93$(OBJDIR) :
94 test ! -e $(OBJDIR) && mkdir -p $(OBJDIR)
108615fc 95
cc4d912a 96$(LIBDIR) :
97 test ! -e $(LIBDIR) && mkdir -p $(LIBDIR)
98
352eb143 99clean :
100 rm -f $(OBJDIR)/*.o
95a00d93 101 rm -f $(LIBDIR)/libAliL3.so
475d367a 102 rm -f $(DICT) $(DICTH)
95a00d93 103
104so :
05d3c0f8 105 rm -f $(LIBDIR)/libAliL3.so