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 |
10 | ifndef TOPDIR |
11 | TOPDIR = `pwd`/.. |
05d3c0f8 |
12 | endif |
152be1b5 |
13 | |
17d8d094 |
14 | include $(TOPDIR)/Makefile.conf |
108615fc |
15 | |
17d8d094 |
16 | DEFSTR = -Dno_root |
475d367a |
17 | OBJDIR = lib_alone |
18 | INCLUDES = -I$(TOPDIR)/hough -I$(TOPDIR)/src -I$(TOPDIR)/comp -I$(TOPDIR)/misc |
152be1b5 |
19 | |
95a00d93 |
20 | ifeq ($(USEPACKAGE),ROOT) |
21 | INCLUDES = -I$(ROOTSYS)/include -I$(TOPDIR)/hough -I$(TOPDIR)/src -I$(TOPDIR)/comp |
152be1b5 |
22 | DEFSTR = -Duse_root |
74eabe5f |
23 | OBJDIR = lib_ROOT |
95a00d93 |
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 |
a33d7f86 |
28 | DEFSTR = -Duse_aliroot -Duse_root |
475d367a |
29 | OBJDIR = lib |
95a00d93 |
30 | endif |
108615fc |
31 | |
17d8d094 |
32 | ifdef DO_MC |
33 | DEFSTR += -Ddo_mc |
34 | endif |
152be1b5 |
35 | |
b419a833 |
36 | ifndef NOLOGGING |
05d3c0f8 |
37 | DEFSTR += -Duse_logging |
b419a833 |
38 | endif |
05d3c0f8 |
39 | |
475d367a |
40 | DEFSTR += $(EXTRADEF) |
41 | |
05d3c0f8 |
42 | ifdef MLUCDIR |
43 | INCLUDES += -I$(MLUCDIR)/include |
44 | else |
45 | INCLUDES += -I/prog/alice/level3/kip/MLUC/include |
46 | endif |
47 | |
61ec2ed0 |
48 | SRCS = 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 |
57 | DICT = AliL3Cint-$(USEPACKAGE).cxx |
58 | DICTH = AliL3Cint-$(USEPACKAGE).h |
59 | DICTO = $(OBJDIR)/AliL3Cint-$(USEPACKAGE).o |
108615fc |
60 | |
95a00d93 |
61 | ifeq ($(USEPACKAGE),ROOT) |
61ec2ed0 |
62 | SRCS += AliL3Display.cxx |
352eb143 |
63 | HDRS = $(SRCS:.cxx=.h) AliL3LinkDef.h |
352eb143 |
64 | OBJS = $(patsubst %.cxx,$(OBJDIR)/%.o,$(SRCS)) $(DICTO) |
95a00d93 |
65 | endif |
66 | |
67 | ifeq ($(USEPACKAGE),ALIROOT) |
61ec2ed0 |
68 | SRCS += AliL3Display.cxx |
84122e15 |
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) |
95a00d93 |
71 | endif |
108615fc |
72 | |
475d367a |
73 | ifeq ($(OBJDIR),lib_alone) |
74 | HDRS = $(SRCS:.cxx=.h) |
75 | OBJS = $(patsubst %.cxx,$(OBJDIR)/%.o,$(SRCS)) |
76 | endif |
77 | |
78 | |
95a00d93 |
79 | LEVELSO = $(LIBDIR)/libAliL3.so |
108615fc |
80 | |
cc4d912a |
81 | all : $(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 |
99 | clean : |
100 | rm -f $(OBJDIR)/*.o |
95a00d93 |
101 | rm -f $(LIBDIR)/libAliL3.so |
475d367a |
102 | rm -f $(DICT) $(DICTH) |
95a00d93 |
103 | |
104 | so : |
05d3c0f8 |
105 | rm -f $(LIBDIR)/libAliL3.so |