]> git.uio.no Git - u/mrichter/AliRoot.git/blob - HLT/src/Makefile
BField is now also read from configuration.
[u/mrichter/AliRoot.git] / HLT / src / Makefile
1 #$Id$
2 ###########################
3 # Makefile for HLT code.  #
4 #                         #
5 # Author: Anders Vestbo   #                    
6 ###########################
7
8 ifndef USEPACKAGE
9 #USEPACKAGE = ROOT
10 USEPACKAGE = ALIROOT
11 endif
12
13 #used if USEPACKAGE=anything else
14 DEFSTR = -Dno_root
15
16 CXX         = g++
17 LD          = g++
18 CXXFLAGS    = -O2 -Wall -fPIC
19 LDFLAGS     = -O2
20 SOFLAGS     = -shared
21
22 ifndef TOPDIR
23 TOPDIR = $(HOME)/level3code
24 endif
25 ifndef LIBDIR
26 LIBDIR = $(LEVEL3)/lib_$(USERNAME)
27 endif
28 OBJDIR = lib
29
30 ifeq ($(USEPACKAGE),ROOT) 
31 INCLUDES = -I$(ROOTSYS)/include -I$(TOPDIR)/hough -I$(TOPDIR)/src -I$(TOPDIR)/comp
32 DEFSTR = -Duse_root
33 OBJDIR = lib_ROOT
34 endif
35
36 ifeq ($(USEPACKAGE),ALIROOT)
37 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
38 DEFSTR = -Duse_aliroot
39 endif
40
41 #Save the particle id's
42 #DEFSTR += -Ddo_mc
43
44 #Use logging classes
45 ifndef NOLOGGING
46 DEFSTR += -Duse_logging
47 endif
48
49 ifdef MLUCDIR
50 INCLUDES += -I$(MLUCDIR)/include
51 else
52 INCLUDES += -I/prog/alice/level3/kip/MLUC/include
53 endif
54
55 SRCS    = AliL3ConfMapper.cxx AliL3ConfMapPoint.cxx AliLevel3.cxx\
56           AliL3ConfMapTrack.cxx AliL3ConfMapFit.cxx AliL3Track.cxx\
57           AliL3Transform.cxx AliL3TrackMerger.cxx AliL3VertexArray.cxx \
58           AliL3Vertex.cxx AliL3VertexFinder.cxx \
59           AliL3Merger.cxx AliL3GlobalMerger.cxx AliL3ClustFinderNew.cxx \
60           AliL3TrackArray.cxx AliL3InterMerger.cxx AliL3Logger.cxx \
61           AliL3MemHandler.cxx  AliL3Benchmark.cxx AliL3Display.cxx\
62
63 DICT = AliL3Cint.cxx
64 DICTH = AliL3Cint.h
65 DICTO = $(OBJDIR)/AliL3Cint.o
66
67 ifeq ($(USEPACKAGE),ROOT)
68 HDRS = $(SRCS:.cxx=.h) AliL3LinkDef.h
69 OBJS = $(patsubst %.cxx,$(OBJDIR)/%.o,$(SRCS)) $(DICTO)
70 endif
71
72 ifeq ($(USEPACKAGE),ALIROOT)
73 HDRS = $(SRCS:.cxx=.h) AliL3FileHandler.h AliL3LinkDef.h
74 OBJS = $(patsubst %.cxx,$(OBJDIR)/%.o,$(SRCS)) $(OBJDIR)/AliL3FileHandler.o $(DICTO)
75 endif
76
77 LEVELSO = $(LIBDIR)/libAliL3.so
78
79 all : $(OBJDIR) $(LIBDIR) $(LEVELSO) 
80
81 $(LEVELSO) : $(OBJS)
82         $(LD) $(SOFLAGS) $(LDFLAGS) $^ -o $@
83
84 $(DICT) : $(HDRS)
85         @echo "Generating dictionary..."
86         @rootcint -f $(DICT) -c $(INCLUDES) $(HDRS)
87
88 $(OBJDIR)/%.o : %.cxx 
89         $(CXX) $(CXXFLAGS) $(DEFSTR) -c $(INCLUDES) -o $@ $<
90
91 $(OBJDIR) : 
92         test ! -e $(OBJDIR) && mkdir -p $(OBJDIR)
93
94 $(LIBDIR) :
95         test ! -e $(LIBDIR) && mkdir -p $(LIBDIR)
96
97 clean :
98         rm -f $(OBJDIR)/*.o
99         rm -f $(LIBDIR)/libAliL3.so
100         rm -f $(DICT) $(DICTH) 
101
102 so :
103         rm -f $(LIBDIR)/libAliL3.so
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129