New topdir Makefile
[u/mrichter/AliRoot.git] / HLT / src / Makefile
CommitLineData
95a00d93 1#$Id$
2###########################
3# Makefile for HLT code. #
4# #
5# Author: Anders Vestbo #
6###########################
7
05d3c0f8 8ifndef USEPACKAGE
152be1b5 9#USEPACKAGE = ROOT
10USEPACKAGE = ALIROOT
05d3c0f8 11endif
152be1b5 12
05d3c0f8 13#used if USEPACKAGE=anything else
152be1b5 14DEFSTR = -Dno_root
108615fc 15
352eb143 16CXX = g++
17LD = g++
fb360510 18CXXFLAGS = -O2 -Wall -fPIC -Woverloaded-virtual
352eb143 19LDFLAGS = -O2
20SOFLAGS = -shared
108615fc 21
05d3c0f8 22ifndef TOPDIR
352eb143 23TOPDIR = $(HOME)/level3code
05d3c0f8 24endif
25ifndef LIBDIR
95a00d93 26LIBDIR = $(LEVEL3)/lib_$(USERNAME)
05d3c0f8 27endif
28OBJDIR = lib
152be1b5 29
95a00d93 30ifeq ($(USEPACKAGE),ROOT)
31INCLUDES = -I$(ROOTSYS)/include -I$(TOPDIR)/hough -I$(TOPDIR)/src -I$(TOPDIR)/comp
152be1b5 32DEFSTR = -Duse_root
74eabe5f 33OBJDIR = lib_ROOT
95a00d93 34endif
35
36ifeq ($(USEPACKAGE),ALIROOT)
37INCLUDES = -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 38DEFSTR = -Duse_aliroot
95a00d93 39endif
108615fc 40
152be1b5 41#Save the particle id's
42#DEFSTR += -Ddo_mc
c3dd27a3 43DEFSTR += $(EXTRADEF)
152be1b5 44
05d3c0f8 45#Use logging classes
b419a833 46ifndef NOLOGGING
05d3c0f8 47DEFSTR += -Duse_logging
b419a833 48endif
05d3c0f8 49
50ifdef MLUCDIR
51INCLUDES += -I$(MLUCDIR)/include
52else
53INCLUDES += -I/prog/alice/level3/kip/MLUC/include
54endif
55
352eb143 56SRCS = AliL3ConfMapper.cxx AliL3ConfMapPoint.cxx AliLevel3.cxx\
57 AliL3ConfMapTrack.cxx AliL3ConfMapFit.cxx AliL3Track.cxx\
58 AliL3Transform.cxx AliL3TrackMerger.cxx AliL3VertexArray.cxx \
59 AliL3Vertex.cxx AliL3VertexFinder.cxx \
60 AliL3Merger.cxx AliL3GlobalMerger.cxx AliL3ClustFinderNew.cxx \
61 AliL3TrackArray.cxx AliL3InterMerger.cxx AliL3Logger.cxx \
c3dd27a3 62 AliL3MemHandler.cxx AliL3Benchmark.cxx AliL3Display.cxx
63
108615fc 64
352eb143 65DICT = AliL3Cint.cxx
66DICTH = AliL3Cint.h
67DICTO = $(OBJDIR)/AliL3Cint.o
108615fc 68
95a00d93 69ifeq ($(USEPACKAGE),ROOT)
352eb143 70HDRS = $(SRCS:.cxx=.h) AliL3LinkDef.h
352eb143 71OBJS = $(patsubst %.cxx,$(OBJDIR)/%.o,$(SRCS)) $(DICTO)
95a00d93 72endif
73
74ifeq ($(USEPACKAGE),ALIROOT)
84122e15 75HDRS = $(SRCS:.cxx=.h) AliL3FileHandler.h AliL3Evaluate.h AliL3LinkDef.h
76OBJS = $(patsubst %.cxx,$(OBJDIR)/%.o,$(SRCS)) $(OBJDIR)/AliL3Evaluate.o $(OBJDIR)/AliL3FileHandler.o $(DICTO)
95a00d93 77endif
108615fc 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
74eabe5f 102 rm -f $(DICT) $(DICTH)
95a00d93 103
104so :
05d3c0f8 105 rm -f $(LIBDIR)/libAliL3.so
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
05d3c0f8 128
129
130
131