Added Thomas Kuhr changes for datachallenge/aliroot tag v4-01-00.
[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
3e87ef69 9ifndef ALIHLT_TOPDIR
10ALIHLT_TOPDIR = $(shell pwd)/..
585caa43 11endif
12
3e87ef69 13include $(ALIHLT_TOPDIR)/Makefile.conf
585caa43 14
17d8d094 15DEFSTR = -Dno_root
3e87ef69 16INCLUDES = -I$(ALIHLT_TOPDIR)/hough -I$(ALIHLT_TOPDIR)/src -I$(ALIHLT_TOPDIR)/comp -I$(ALIHLT_TOPDIR)/misc
17LIBS = -L$(ALIHLT_LIBDIR) -lAliL3Src -lAliL3Hough -lAliL3Comp -lAliL3Misc
585caa43 18
3e87ef69 19ifneq ($(ALIHLT_USEPACKAGE),STANDALONE)
585caa43 20ROOTCFLAGS := $(shell root-config --cflags)
21ROOTLIBS := $(shell root-config --libs)
22ROOTGLIBS := $(shell root-config --glibs)
4720ab10 23endif
585caa43 24
3e87ef69 25ifeq ($(ALIHLT_USEPACKAGE),ROOT)
585caa43 26DEFSTR = -Duse_root
9246a93f 27INCLUDES += -I$(ROOTSYS)/include
585caa43 28RLIBS = $(ROOTLIBS) -lMinuit -lEG
9246a93f 29LIBS += $(RLIBS)
585caa43 30endif
31
3e87ef69 32ifeq ($(ALIHLT_USEPACKAGE),ALIROOT)
2f3824aa 33DEFSTR = -Duse_aliroot -Duse_root
a27af97b 34ALICELIBS = -L$(ALICE_ROOT)/lib/tgt_Linux -lTPC -lITS -lCONTAINERS -lSTEER -lRAW -lVMC -lGeom
9246a93f 35INCLUDES += -I$(ROOTSYS)/include -I$(ALICE_ROOT)/include/ -I$(ALICE_ROOT)/TPC -I$(ALICE_ROOT)/CONTAINERS -I$(ALICE_ROOT)/STEER
585caa43 36RLIBS = $(ROOTLIBS) -lMinuit -lEG
ebbe3342 37LIBS += $(ALICELIBS) $(RLIBS)
585caa43 38endif
39
3e87ef69 40ifeq ($(ALIHLT_USEPACKAGE),STANDALONE)
4720ab10 41DEFSTR = -Dno_root
42RLIBS = -lpthread -lm -ldl -rdynamic
43LIBS += $(RLIBS)
44endif
45
9246a93f 46ifdef DO_MC
47DEFSTR += -Ddo_mc
48endif
585caa43 49
50#Use logging classes
5e207cef 51ifndef NOLOGGING
52DEFSTR += -Duse_logging
3e87ef69 53ifdef ALIHLT_MLUCDIR
54INCLUDES += -I$(ALIHLT_MLUCDIR)/include
55MLUCLIBS = -L$(ALIHLT_MLUCDIR)/lib/ -lMLUC
585caa43 56else
57INCLUDES += -I/prog/alice/level3/kip/MLUC/include
58MLUCLIBS += -L/prog/alice/level3/kip/MLUC/lib/linux-i386 -lMLUC
59endif
9246a93f 60LIBS += $(MLUCLIBS)
5e207cef 61endif
585caa43 62
9246a93f 63DEFSTR += $(EXTRADEF)
585caa43 64
3e87ef69 65CXX = g++
66LD = $(CXX)
67GCCVERSION = $(shell $(CXX) --version | head -n 1 | cut -d" " -f 3 | cut -d. -f 1 | cut -d" " -f1)
68
69CXXGCC3FLAGS = -DGCCVERSION=$(GCCVERSION)
70#CXXGCC3FLAGS += -pedantic
71#CXXGCC3FLAGS += -Wno-deprecated
72#CXXGCC3FLAGS += -Woverloaded-virtual
73
74CXXFLAGS = -O2 -Wall -ggdb $(CXXGCC3FLAGS) $(EXTRACXXFLAGS)
9246a93f 75LDFLAGS = -O2 $(EXTRALDFLAGS) $(LIBS)
585caa43 76
3e87ef69 77PRGS = runit read runvhdlcf runhough runvhdlhough runtracker
78UTILS = ccfile gettransform
79UTILS_not_working = convbin speedtest
585caa43 80
3e87ef69 81all: $(PRGS) $(UTILS)
585caa43 82
3e87ef69 83programs: $(PRGS)
84
85utils: $(UTILS)
585caa43 86
7437431c 87#run hough transform on l3 data.
3e87ef69 88runhough: runhough.o
7437431c 89 $(LD) $< $(LDFLAGS) -o $@
90
f353cbd1 91#run hough transform on l3 data.
3e87ef69 92runvhdlhough: runvhdlhough.o
f353cbd1 93 $(LD) $< $(LDFLAGS) -o $@
94
7437431c 95#run conventional clusterfinder on altro data
3e87ef69 96runvhdlcf: runvhdlcf.o
7437431c 97 $(LD) $< $(LDFLAGS) -o $@
98
99#run conventional clusterfinder
3e87ef69 100runit: runit.o
101 $(LD) $< $(LDFLAGS) -o $@
102
103#run conventional tracker
104runtracker: runtracker.o
ba471b4c 105 $(LD) $< $(LDFLAGS) -o $@
106
7437431c 107#read l3 raw data, print it and convert to altro data
3e87ef69 108read: read.o
ba471b4c 109 $(LD) $< $(LDFLAGS) -o $@
5e207cef 110
3e87ef69 111#convert big <-> little endian cosmics data file
112ccfile: convcosmicsfile.o
ebbe3342 113 $(LD) $< $(LDFLAGS) -o $@
114
3e87ef69 115#convert to binary
116convbin: ali2raw.o
ba471b4c 117 $(LD) $< $(LDFLAGS) -o $@
118
3e87ef69 119#get transform values
120gettransform: gettransform.o
4720ab10 121 $(LD) $< $(LDFLAGS) -o $@
122
3e87ef69 123speedtest: speedtest.cxx
ba471b4c 124 g++ -O -Wall -fPIC -ffast-math $(CXXFLAGS) speedtest.cxx -o speedtest
3e87ef69 125# g++ -O -Wall -fPIC -mcpu=ev6 $(CXXFLAGS) speedtest.cxx -o speedtest
126# cxx -O -Wall -fPIC -lm $(CXXFLAGS) speedtest.cxx -o speedtest
585caa43 127
3e87ef69 128%.o:%.cxx
129 $(CXX) $(CXXFLAGS) $(DEFSTR) -c $(INCLUDES) -o $@ $<
585caa43 130
585caa43 131clean :
3e87ef69 132 rm -f *.o $(PRGS) $(UTILS) $(UTILS_not_working)
10cc9fe7 133
134