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