]> git.uio.no Git - u/mrichter/AliRoot.git/blob - HLT/src/Makefile
430f006df0cbf6ac00884069b0b93d6e1754a74c
[u/mrichter/AliRoot.git] / HLT / src / Makefile
1 #$Id$
2 ###########################
3 # Makefile for HLT code.  #
4 #                         #
5 # Author: Anders Vestbo   #                    
6 # changes by C. Loizides  #
7 ###########################
8
9
10 ifndef TOPDIR
11 TOPDIR = `pwd`/..
12 endif
13
14 include $(TOPDIR)/Makefile.conf
15
16 DEFSTR = -Dno_root
17 OBJDIR = lib_alone
18 INCLUDES = -I$(TOPDIR)/hough -I$(TOPDIR)/src -I$(TOPDIR)/comp -I$(TOPDIR)/misc
19
20 ifeq ($(USEPACKAGE),ROOT) 
21 INCLUDES = -I$(ROOTSYS)/include -I$(TOPDIR)/hough -I$(TOPDIR)/src -I$(TOPDIR)/comp
22 DEFSTR = -Duse_root
23 OBJDIR = lib_ROOT
24 endif
25
26 ifeq ($(USEPACKAGE),ALIROOT)
27 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
28 DEFSTR = -Duse_aliroot -Duse_root
29 OBJDIR = lib
30 endif
31
32 ifdef DO_MC
33 DEFSTR += -Ddo_mc
34 endif
35
36 ifndef NOLOGGING
37 DEFSTR += -Duse_logging
38 endif
39
40 DEFSTR += $(EXTRADEF)
41
42 ifdef MLUCDIR
43 INCLUDES += -I$(MLUCDIR)/include
44 else
45 INCLUDES += -I/prog/alice/level3/kip/MLUC/include
46 endif
47
48 SRCS    = AliL3ConfMapper.cxx AliL3ConfMapPoint.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 \
54           AliL3MemHandler.cxx AliLevel3.cxx AliL3Benchmark.cxx 
55
56
57 DICT  = AliL3Cint-$(USEPACKAGE).cxx
58 DICTH = AliL3Cint-$(USEPACKAGE).h
59 DICTO = $(OBJDIR)/AliL3Cint-$(USEPACKAGE).o
60
61 ifeq ($(USEPACKAGE),ROOT)
62 SRCS += AliL3Display.cxx
63 HDRS = $(SRCS:.cxx=.h) AliL3LinkDef.h
64 OBJS = $(patsubst %.cxx,$(OBJDIR)/%.o,$(SRCS)) $(DICTO)
65 endif
66
67 ifeq ($(USEPACKAGE),ALIROOT)
68 SRCS += AliL3Display.cxx
69 HDRS = $(SRCS:.cxx=.h) AliL3FileHandler.h AliL3Evaluate.h AliL3LinkDef.h
70 OBJS = $(patsubst %.cxx,$(OBJDIR)/%.o,$(SRCS)) $(OBJDIR)/AliL3Evaluate.o $(OBJDIR)/AliL3FileHandler.o $(DICTO)
71 endif
72
73 ifeq ($(OBJDIR),lib_alone)
74 HDRS = $(SRCS:.cxx=.h) 
75 OBJS = $(patsubst %.cxx,$(OBJDIR)/%.o,$(SRCS))
76 endif
77
78
79 LEVELSO = $(LIBDIR)/libAliL3.so
80
81 all : $(OBJDIR) $(LIBDIR) $(LEVELSO) 
82
83 $(LEVELSO) : $(OBJS)
84         $(LD) $(SOFLAGS) $(LDFLAGS) $^ -o $@
85
86 $(DICT) : $(HDRS)
87         @echo "Generating dictionary..."
88         @rootcint -f $(DICT) -c $(INCLUDES) -DGCCVERSION=$(GCCVERSION) -include AliL3StandardIncludes.h $(HDRS)
89
90 $(OBJDIR)/%.o : %.cxx 
91         $(CXX) $(CXXFLAGS) $(DEFSTR) -c $(INCLUDES) -o $@ $<
92
93 $(OBJDIR) : 
94         test ! -e $(OBJDIR) && mkdir -p $(OBJDIR)
95
96 $(LIBDIR) :
97         test ! -e $(LIBDIR) && mkdir -p $(LIBDIR)
98
99 clean :
100         rm -f $(OBJDIR)/*.o
101         rm -f $(LIBDIR)/libAliL3.so
102         rm -f $(DICT) $(DICTH)
103
104 so :
105         rm -f $(LIBDIR)/libAliL3.so