Little bugfixes for new alitroot version.
[u/mrichter/AliRoot.git] / HLT / programs / Makefile
CommitLineData
585caa43 1#$Id$
2###############################
3# Makefile for HLT programs. #
4# #
5# Author: Constantin Loizides #
6###############################
7
9246a93f 8
17d8d094 9ifndef TOPDIR
10TOPDIR = `pwd`/..
585caa43 11endif
12
17d8d094 13include $(TOPDIR)/Makefile.conf
585caa43 14
17d8d094 15DEFSTR = -Dno_root
9246a93f 16INCLUDES = -I$(TOPDIR)/hough -I$(TOPDIR)/src -I$(TOPDIR)/comp -I$(TOPDIR)/misc
17LIBS = -L$(LIBDIR) -lAliL3 -lAliL3Hough -lAliL3Comp -lAliL3Misc
585caa43 18
19ROOTCFLAGS := $(shell root-config --cflags)
20ROOTLIBS := $(shell root-config --libs)
21ROOTGLIBS := $(shell root-config --glibs)
22
23ifeq ($(USEPACKAGE),ROOT)
24DEFSTR = -Duse_root
9246a93f 25INCLUDES += -I$(ROOTSYS)/include
585caa43 26RLIBS = $(ROOTLIBS) -lMinuit -lEG
9246a93f 27LIBS += $(RLIBS)
585caa43 28endif
29
30ifeq ($(USEPACKAGE),ALIROOT)
2f3824aa 31DEFSTR = -Duse_aliroot -Duse_root
ebbe3342 32ALICELIBS = -L$(ALICE_ROOT)/lib/tgt_Linux -lTPC -lCONTAINERS -lSTEER
585caa43 33#ALICELIBS := $(shell aliroot-config --libs)
9246a93f 34INCLUDES += -I$(ROOTSYS)/include -I$(ALICE_ROOT)/include/ -I$(ALICE_ROOT)/TPC -I$(ALICE_ROOT)/CONTAINERS -I$(ALICE_ROOT)/STEER
585caa43 35RLIBS = $(ROOTLIBS) -lMinuit -lEG
ebbe3342 36LIBS += $(ALICELIBS) $(RLIBS)
585caa43 37endif
38
9246a93f 39ifdef DO_MC
40DEFSTR += -Ddo_mc
41endif
585caa43 42
43#Use logging classes
5e207cef 44ifndef NOLOGGING
45DEFSTR += -Duse_logging
585caa43 46
47ifdef MLUCDIR
48INCLUDES += -I$(MLUCDIR)/include
49MLUCLIBS = -L$(MLUCDIR)/lib/linux-i386 -lMLUC
50else
51INCLUDES += -I/prog/alice/level3/kip/MLUC/include
52MLUCLIBS += -L/prog/alice/level3/kip/MLUC/lib/linux-i386 -lMLUC
53endif
9246a93f 54LIBS += $(MLUCLIBS)
5e207cef 55endif
585caa43 56
9246a93f 57DEFSTR += $(EXTRADEF)
585caa43 58
9246a93f 59CXXFLAGS = -O2 -Wall -ggdb $(EXTRACXXFLAGS) $(INCLUDES)
60LDFLAGS = -O2 $(EXTRALDFLAGS) $(LIBS)
585caa43 61
ebbe3342 62PRGS = runit read runvhdlcf runhough runvhdlhough
10cc9fe7 63UTILS = convbin speedtest gettransform
585caa43 64
65
66all : $(PRGS)
67
7437431c 68#run hough transform on l3 data.
69runhough : runhough.o
70 $(LD) $< $(LDFLAGS) -o $@
71
f353cbd1 72#run hough transform on l3 data.
73runvhdlhough : runvhdlhough.o
74 $(LD) $< $(LDFLAGS) -o $@
75
7437431c 76#run conventional clusterfinder on altro data
77runvhdlcf : runvhdlcf.o
78 $(LD) $< $(LDFLAGS) -o $@
79
80#run conventional clusterfinder
6fe738a9 81runit : runit.o
ba471b4c 82 $(LD) $< $(LDFLAGS) -o $@
83
7437431c 84#read l3 raw data, print it and convert to altro data
6fe738a9 85read : read.o
ba471b4c 86 $(LD) $< $(LDFLAGS) -o $@
5e207cef 87
f353cbd1 88#convert to binary
ebbe3342 89convbin : ali2raw.o
90 $(LD) $< $(LDFLAGS) -o $@
91
f353cbd1 92#get transform values
ba471b4c 93gettransform : gettransform.o
94 $(LD) $< $(LDFLAGS) -o $@
95
96speedtest : speedtest.cxx
97 g++ -O -Wall -fPIC -ffast-math $(CXXFLAGS) speedtest.cxx -o speedtest
98 # g++ -O -Wall -fPIC -mcpu=ev6 $(CXXFLAGS) speedtest.cxx -o speedtest
99 # cxx -O -Wall -fPIC -lm $(CXXFLAGS) speedtest.cxx -o speedtest
585caa43 100
101%.o : %.cxx
ebbe3342 102 $(CXX) $(CXXFLAGS) $(CXXGCC3FLAGS) $(DEFSTR) -c $(INCLUDES) -o $@ $<
585caa43 103
585caa43 104clean :
10cc9fe7 105 rm -f *.o $(PRGS) $(UTILS)
106
107