Changed definition of TOPDIR
[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
8847a8dd 10TOPDIR = $(shell 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
4720ab10 19ifneq ($(USEPACKAGE),STANDALONE)
585caa43 20ROOTCFLAGS := $(shell root-config --cflags)
21ROOTLIBS := $(shell root-config --libs)
22ROOTGLIBS := $(shell root-config --glibs)
4720ab10 23endif
585caa43 24
25ifeq ($(USEPACKAGE),ROOT)
26DEFSTR = -Duse_root
9246a93f 27INCLUDES += -I$(ROOTSYS)/include
585caa43 28RLIBS = $(ROOTLIBS) -lMinuit -lEG
9246a93f 29LIBS += $(RLIBS)
585caa43 30endif
31
32ifeq ($(USEPACKAGE),ALIROOT)
2f3824aa 33DEFSTR = -Duse_aliroot -Duse_root
ebbe3342 34ALICELIBS = -L$(ALICE_ROOT)/lib/tgt_Linux -lTPC -lCONTAINERS -lSTEER
585caa43 35#ALICELIBS := $(shell aliroot-config --libs)
9246a93f 36INCLUDES += -I$(ROOTSYS)/include -I$(ALICE_ROOT)/include/ -I$(ALICE_ROOT)/TPC -I$(ALICE_ROOT)/CONTAINERS -I$(ALICE_ROOT)/STEER
585caa43 37RLIBS = $(ROOTLIBS) -lMinuit -lEG
ebbe3342 38LIBS += $(ALICELIBS) $(RLIBS)
585caa43 39endif
40
4720ab10 41ifeq ($(USEPACKAGE),STANDALONE)
42DEFSTR = -Dno_root
43RLIBS = -lpthread -lm -ldl -rdynamic
44LIBS += $(RLIBS)
45endif
46
9246a93f 47ifdef DO_MC
48DEFSTR += -Ddo_mc
49endif
585caa43 50
51#Use logging classes
5e207cef 52ifndef NOLOGGING
53DEFSTR += -Duse_logging
585caa43 54
55ifdef MLUCDIR
56INCLUDES += -I$(MLUCDIR)/include
57MLUCLIBS = -L$(MLUCDIR)/lib/linux-i386 -lMLUC
58else
59INCLUDES += -I/prog/alice/level3/kip/MLUC/include
60MLUCLIBS += -L/prog/alice/level3/kip/MLUC/lib/linux-i386 -lMLUC
61endif
9246a93f 62LIBS += $(MLUCLIBS)
5e207cef 63endif
585caa43 64
9246a93f 65DEFSTR += $(EXTRADEF)
585caa43 66
9246a93f 67CXXFLAGS = -O2 -Wall -ggdb $(EXTRACXXFLAGS) $(INCLUDES)
68LDFLAGS = -O2 $(EXTRALDFLAGS) $(LIBS)
585caa43 69
4720ab10 70PRGS = runit read runvhdlcf runhough runvhdlhough runtracker
10cc9fe7 71UTILS = convbin speedtest gettransform
585caa43 72
73
74all : $(PRGS)
75
7437431c 76#run hough transform on l3 data.
77runhough : runhough.o
78 $(LD) $< $(LDFLAGS) -o $@
79
f353cbd1 80#run hough transform on l3 data.
81runvhdlhough : runvhdlhough.o
82 $(LD) $< $(LDFLAGS) -o $@
83
7437431c 84#run conventional clusterfinder on altro data
85runvhdlcf : runvhdlcf.o
86 $(LD) $< $(LDFLAGS) -o $@
87
88#run conventional clusterfinder
6fe738a9 89runit : runit.o
ba471b4c 90 $(LD) $< $(LDFLAGS) -o $@
91
7437431c 92#read l3 raw data, print it and convert to altro data
6fe738a9 93read : read.o
ba471b4c 94 $(LD) $< $(LDFLAGS) -o $@
5e207cef 95
f353cbd1 96#convert to binary
ebbe3342 97convbin : ali2raw.o
98 $(LD) $< $(LDFLAGS) -o $@
99
f353cbd1 100#get transform values
ba471b4c 101gettransform : gettransform.o
102 $(LD) $< $(LDFLAGS) -o $@
103
4720ab10 104runtracker : runtracker.o
105 $(LD) $< $(LDFLAGS) -o $@
106
ba471b4c 107speedtest : speedtest.cxx
108 g++ -O -Wall -fPIC -ffast-math $(CXXFLAGS) speedtest.cxx -o speedtest
109 # g++ -O -Wall -fPIC -mcpu=ev6 $(CXXFLAGS) speedtest.cxx -o speedtest
110 # cxx -O -Wall -fPIC -lm $(CXXFLAGS) speedtest.cxx -o speedtest
585caa43 111
112%.o : %.cxx
ebbe3342 113 $(CXX) $(CXXFLAGS) $(CXXGCC3FLAGS) $(DEFSTR) -c $(INCLUDES) -o $@ $<
585caa43 114
585caa43 115clean :
10cc9fe7 116 rm -f *.o $(PRGS) $(UTILS)
117
118