Moved to Makefile.
[u/mrichter/AliRoot.git] / HLT / programs / Makefile
CommitLineData
585caa43 1#$Id$
2###############################
3# Makefile for HLT programs. #
4# #
5# Author: Constantin Loizides #
6###############################
7
8ifndef USEPACKAGE
9#USEPACKAGE = ROOT
10USEPACKAGE = ALIROOT
11endif
12
13#used if USEPACKAGE=anything else
14DEFSTR = -Dno_root
15
16CXX = g++
17LD = g++
18CXXFLAGS = -O2 -Wall
19LDFLAGS = -O2
20
21ifndef TOPDIR
22TOPDIR = $(HOME)/level3code
23endif
24ifndef LIBDIR
25LIBDIR = $(LEVEL3)/lib_$(USERNAME)
26endif
27
28ROOTCFLAGS := $(shell root-config --cflags)
29ROOTLIBS := $(shell root-config --libs)
30ROOTGLIBS := $(shell root-config --glibs)
31
32ifeq ($(USEPACKAGE),ROOT)
33DEFSTR = -Duse_root
34INCLUDES = -I$(ROOTSYS)/include
35RLIBS = $(ROOTLIBS) -lMinuit -lEG
36endif
37
38ifeq ($(USEPACKAGE),ALIROOT)
39DEFSTR = -Duse_aliroot
5e207cef 40ALICELIBS = -L$(ALICE_ROOT)/lib/tgt_Linux -lCONTAINERS -lTPC -lSTEER
585caa43 41#ALICELIBS := $(shell aliroot-config --libs)
42INCLUDES = -I$(ROOTSYS)/include -I$(ALICE_ROOT)/include/ -I$(ALICE_ROOT)/TPC -I$(ALICE_ROOT)/CONTAINERS -I$(ALICE_ROOT)/STEER
43RLIBS = $(ROOTLIBS) -lMinuit -lEG
44endif
45
46#Save the particle id's
47#DEFSTR += -Ddo_mc
48
49#Use logging classes
5e207cef 50ifndef NOLOGGING
51DEFSTR += -Duse_logging
585caa43 52
53ifdef MLUCDIR
54INCLUDES += -I$(MLUCDIR)/include
55MLUCLIBS = -L$(MLUCDIR)/lib/linux-i386 -lMLUC
56else
57INCLUDES += -I/prog/alice/level3/kip/MLUC/include
58MLUCLIBS += -L/prog/alice/level3/kip/MLUC/lib/linux-i386 -lMLUC
59endif
5e207cef 60endif
585caa43 61
62INCLUDES += -I$(TOPDIR)/hough -I$(TOPDIR)/src -I$(TOPDIR)/comp -I$(TOPDIR)/misc
63LIBS = -L$(LIBDIR) -lAliL3 -lAliL3Hough -lAliL3Comp -lAliL3Misc $(MLUCLIBS) $(ALICELIBS) $(RLIBS)
64
65CXXFLAGS = -O2 -Wall -ggdb $(INCLUDES)
66LDFLAGS = -O2 $(LIBS)
67
68
6fe738a9 69PRGS = runit read
585caa43 70
71
72
73all : $(PRGS)
74
6fe738a9 75runit : runit.o
76 $(LD) $< $(LDFLAGS) $(OBJS) -o $@
585caa43 77
6fe738a9 78read : read.o
79 $(LD) read.o $(LDFLAGS) $(OBJS) -o read
5e207cef 80
585caa43 81
82%.o : %.cxx
83 $(CXX) $(CXXFLAGS) $(DEFSTR) -c $(INCLUDES) -o $@ $<
84
85
86clean :
87 rm -f *.o $(PRGS)
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118