Makefile for small HLT programs created.
[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 -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 #DEFSTR += -Duse_logging
51
52 ifdef MLUCDIR
53 INCLUDES += -I$(MLUCDIR)/include
54 MLUCLIBS = -L$(MLUCDIR)/lib/linux-i386 -lMLUC 
55 else
56 INCLUDES += -I/prog/alice/level3/kip/MLUC/include
57 MLUCLIBS += -L/prog/alice/level3/kip/MLUC/lib/linux-i386 -lMLUC
58 endif
59
60 INCLUDES += -I$(TOPDIR)/hough -I$(TOPDIR)/src -I$(TOPDIR)/comp -I$(TOPDIR)/misc
61 LIBS = -L$(LIBDIR) -lAliL3 -lAliL3Hough -lAliL3Comp -lAliL3Misc $(MLUCLIBS) $(ALICELIBS) $(RLIBS)
62
63 CXXFLAGS = -O2 -Wall -ggdb $(INCLUDES)
64 LDFLAGS  = -O2 $(LIBS)
65
66
67 PRGS    = runit
68
69
70
71 all : $(PRGS)
72
73 runit : runit.o $(OBJS)
74         $(LD) runit.o $(LDFLAGS) $(OBJS) -o runit
75
76
77 all : $(OBJDIR) $(PRGS)
78
79 %.o : %.cxx 
80         $(CXX) $(CXXFLAGS) $(DEFSTR) -c $(INCLUDES) -o $@ $<
81
82
83 clean :
84         rm -f *.o $(PRGS)
85
86
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