Using TGeo to retrieve the mean material budget between two points (M.Ivanov)
[u/mrichter/AliRoot.git] / HLT / Makefile.rules
CommitLineData
ead9cc3e 1# -*- Mode: Makefile -*-
3e87ef69 2#$Id$
3################################
4# Makefile.rules for HLT code. #
5# #
6# Author: Anders Vestbo, #
02f030e3 7# Constantin Loizides #
3e87ef69 8################################
9
10#----------------------------------------------------
02f030e3 11# !!! Dont change anything here !!!
12# !!! and if you have to send a mail to authors !!!
3e87ef69 13#----------------------------------------------------
14
15DEFSTR = -Dno_root
16OBJDIR = lib_alone
a1e6544c 17INCLUDES = -I$(ALIHLT_TOPDIR)/src -I$(ALIHLT_TOPDIR)/hough -I$(ALIHLT_TOPDIR)/comp -I$(ALIHLT_TOPDIR)/misc -I$(ALIHLT_TOPDIR)/trigger -I$(ALIHLT_TOPDIR)/kalman -I$(ALIHLT_TOPDIR)/BASE
3e87ef69 18
19ifeq ($(ALIHLT_USEPACKAGE),ROOT)
20INCLUDES += -I$(ROOTSYS)/include
21DEFSTR = -Duse_root
22OBJDIR = lib_ROOT
23ROOTSTR := $(shell $(ROOTSYS)/bin/root -n -b -q | grep Version | cut -b 17-25 | cut -d" " -f1)
24DEFSTR += -DROOTVERSION=\"$(ROOTSTR)\"
25endif
26
27ifeq ($(ALIHLT_USEPACKAGE),ALIROOT)
28INCLUDES += -I$(ROOTSYS)/include -I$(ALICE_ROOT)/include/ -I$(ALICE_ROOT)/TPC -I$(ALICE_ROOT)/CONTAINERS -I$(ALICE_ROOT)/STEER
29DEFSTR = -Duse_aliroot -Duse_root
b2a02bce 30ifeq ($(USENEWIO),1)
31DEFSTR += -Duse_newio
a1e6544c 32INCLUDES += -I$(ALICE_ROOT)/RAW
b2a02bce 33endif
3e87ef69 34OBJDIR = lib
35ROOTSTR := $(shell $(ROOTSYS)/bin/root -n -b -q | grep Version | cut -b 17-25 | cut -d" " -f1)
36DEFSTR += -DROOTVERSION=\"$(ROOTSTR)\"
37ifeq ($(USECVS),1)
38ALIROOTSTR := $(shell if test -n "`cd $(ALICE_ROOT)/STEER/ && cvs stat AliRun.cxx | grep "Sticky Tag" | grep none`"; then echo HEAD; else cd $(ALICE_ROOT)/STEER/ && cvs stat AliRun.cxx | grep "Sticky Tag" | cut -b 18- | cut -d" " -f1; fi)
39DEFSTR += -Duse_cvs
40else
41ALIROOTSTR = "Unknown"
42endif
43DEFSTR += -DALIROOTVERSION=\"$(ALIROOTSTR)\"
de3c3890 44ifeq ($(ALIROOTST),HEAD)
45DEFSTR += -Duse_reconstruction
46endif
3e87ef69 47endif
48
49ifeq ($(DOMC),1)
50DEFSTR += -Ddo_mc
51endif
52
0bd0c1ef 53ifeq ($(USEROWHOUGH),1)
de3c3890 54DEFSTR += -DROWHOUGHPARAMS
0bd0c1ef 55endif
56
3e87ef69 57ifneq ($(NOLOGGING),1)
58DEFSTR += -Duse_logging
59ifdef ALIHLT_MLUCDIR
60INCLUDES += -I$(ALIHLT_MLUCDIR)/include
61else
62INCLUDES += -I/prog/alice/level3/kip/MLUC/include
63endif
64endif
65
1f1942b8 66DEFSTR += -D$(ARCH) $(EXTRADEF)
3e87ef69 67
68DICT = $(MODNAME)Cint-$(ALIHLT_USEPACKAGE).cxx
69DICTH = $(MODNAME)Cint-$(ALIHLT_USEPACKAGE).h
70DICTO = $(OBJDIR)/$(MODNAME)Cint-$(ALIHLT_USEPACKAGE).o
71
3e87ef69 72ifndef OBJS
73ifeq ($(OBJDIR),lib_alone)
74HDRS = $(SRCS:.cxx=.h)
75OBJS = $(patsubst %.cxx,$(OBJDIR)/%.o,$(SRCS))
76else
77HDRS = $(SRCS:.cxx=.h) $(MODNAME)LinkDef.h
78OBJS = $(patsubst %.cxx,$(OBJDIR)/%.o,$(SRCS)) $(DICTO)
79endif
80endif
81
5a31e9df 82STATICOBJS = $(patsubst %.o,%.sto,$(OBJS))
3e87ef69 83
5a31e9df 84ALIHLT_LIBSO = $(ALIHLT_LIBDIR)/lib$(MODNAME).so
85ALIHLT_DYLIB = $(ALIHLT_LIBDIR)/lib$(MODNAME).dylib
86ALIHLT_STATIC = $(ALIHLT_LIBDIR)/lib$(MODNAME).a
3e87ef69 87
5a31e9df 88#Default Target
89default: so
90
91libs: so static
92
93so: $(OBJDIR) $(ALIHLT_LIBDIR) $(ALIHLT_LIBSO)
94
95static: $(OBJDIR) $(ALIHLT_LIBDIR) $(ALIHLT_STATIC)
3e87ef69 96
97$(ALIHLT_LIBSO): $(OBJS)
86b74d5e 98ifeq ($(ARCH),macosx)
1f1942b8 99 $(LD) $(DYFLAGS) $^ $(LDFLAGS) -o $(ALIHLT_DYLIB)
100endif
101 $(LD) $(SOFLAGS) $^ $(LDFLAGS) -o $@
102
5a31e9df 103$(ALIHLT_STATIC): $(STATICOBJS)
104 $(LDSTATIC) $(STATICFLAGS) $@ $^
3e87ef69 105
106$(DICT): $(HDRS)
107 @echo "Generating dictionary..."
0bd0c1ef 108 rootcint -f $(DICT) -c $(CINTCXXFLAGS) $(INCLUDES) \
1f1942b8 109 $(DEFSTR) -include AliL3StandardIncludes.h $(HDRS)
3e87ef69 110
111$(OBJDIR)/%.o: %.cxx
112 $(CXX) $(CXXFLAGS) $(DEFSTR) -c $(INCLUDES) -o $@ $<
113
5a31e9df 114$(OBJDIR)/%.sto: %.cxx
115 $(CXX) $(PROFILEFLAGS) $(CXXFLAGS) $(DEFSTR) -c $(INCLUDES) -o $@ $<
116
3e87ef69 117$(OBJDIR):
118 test ! -e $(OBJDIR) && mkdir -p $(OBJDIR)
119
120$(ALIHLT_LIBDIR):
121 test ! -e $(ALIHLT_LIBDIR) && mkdir -p $(ALIHLT_LIBDIR)
122
123help:
124 cat $(ALIHLT_TOPDIR)/doc/README
125
126print:
127 @echo "MODNAME = $(MODNAME)"
128 @echo "ALIHLT_BASEDIR = $(ALIHLT_BASEDIR)"
129 @echo "ALIHLT_TOPDIR = $(ALIHLT_TOPDIR)"
130 @echo "ALIHLT_MLUCDIR = $(ALIHLT_MLUCDIR)"
131 @echo "ALIHLT_USEPACKAGE = $(ALIHLT_USEPACKAGE)"
b2a02bce 132 @echo "ALIHLT_USENEWIO = $(ALIHLT_USENEWIO)"
3e87ef69 133 @echo "ALIHLT_NOLOGGING = $(ALIHLT_NOLOGGING)"
134 @echo "ALIHLT_DOMC = $(ALIHLT_DOMC)"
3e87ef69 135 @echo "ALIHLT_ALIDETECT = $(ALIHLT_ALIDETECT)"
0bd0c1ef 136 @echo "ALIHLT_ROWHOUGH = $(ALIHLT_ROWHOUGH)"
3e87ef69 137 @echo "ROOTSTR = $(ROOTSTR)"
138 @echo "ALIROOTSTR = $(ALIROOTSTR)"
139
140printall: print
141 @echo "ALIHLT_LIBSO = $(ALIHLT_LIBSO)"
142 @echo "DEFSTR = $(DEFSTR)"
143 @echo "OBJDIR = $(OBJDIR)"
144 @echo "INCLUDES = $(INCLUDES)"
145 @echo "SRCS = $(SRCS)"
146 @echo "HRDS = $(HDRS)"
147 @echo "OBJS = $(OBJS)"
148
149clean:
5a31e9df 150 rm -f $(OBJDIR)/*.o $(OBJDIR)/*.sto
3e87ef69 151 rm -f $(DICT) $(DICTH)
152 rm -rf $(OBJDIR)
153
5a31e9df 154cleanlib:
155 rm -f $(ALIHLT_LIBSO) $(ALIHLT_DYLIB) $(ALIHLT_STATIC)
3e87ef69 156
5a31e9df 157realclean: clean cleanlib
02f030e3 158
159
160.phony: help print printall clean so realclean
3e87ef69 161