Update to the current version in the Bergen CVS. Most important
[u/mrichter/AliRoot.git] / HLT / Makefile.rules
CommitLineData
3e87ef69 1#$Id$
2################################
3# Makefile.rules for HLT code. #
4# #
5# Author: Anders Vestbo, #
02f030e3 6# Constantin Loizides #
3e87ef69 7################################
8
9#----------------------------------------------------
02f030e3 10# !!! Dont change anything here !!!
11# !!! and if you have to send a mail to authors !!!
3e87ef69 12#----------------------------------------------------
13
14DEFSTR = -Dno_root
15OBJDIR = lib_alone
0a86fbb7 16INCLUDES = -I$(ALIHLT_TOPDIR)/hough -I$(ALIHLT_TOPDIR)/src -I$(ALIHLT_TOPDIR)/comp -I$(ALIHLT_TOPDIR)/misc -I$(ALIHLT_TOPDIR)/trigger -I$(ALIHLT_TOPDIR)/kalman
3e87ef69 17
18ifeq ($(ALIHLT_USEPACKAGE),ROOT)
19INCLUDES += -I$(ROOTSYS)/include
20DEFSTR = -Duse_root
21OBJDIR = lib_ROOT
22ROOTSTR := $(shell $(ROOTSYS)/bin/root -n -b -q | grep Version | cut -b 17-25 | cut -d" " -f1)
23DEFSTR += -DROOTVERSION=\"$(ROOTSTR)\"
24endif
25
26ifeq ($(ALIHLT_USEPACKAGE),ALIROOT)
27INCLUDES += -I$(ROOTSYS)/include -I$(ALICE_ROOT)/include/ -I$(ALICE_ROOT)/TPC -I$(ALICE_ROOT)/CONTAINERS -I$(ALICE_ROOT)/STEER
28DEFSTR = -Duse_aliroot -Duse_root
b2a02bce 29ifeq ($(USENEWIO),1)
30DEFSTR += -Duse_newio
31endif
3e87ef69 32OBJDIR = lib
33ROOTSTR := $(shell $(ROOTSYS)/bin/root -n -b -q | grep Version | cut -b 17-25 | cut -d" " -f1)
34DEFSTR += -DROOTVERSION=\"$(ROOTSTR)\"
35ifeq ($(USECVS),1)
36ALIROOTSTR := $(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)
37DEFSTR += -Duse_cvs
38else
39ALIROOTSTR = "Unknown"
40endif
41DEFSTR += -DALIROOTVERSION=\"$(ALIROOTSTR)\"
42endif
43
44ifeq ($(DOMC),1)
45DEFSTR += -Ddo_mc
46endif
47
48ifneq ($(NOLOGGING),1)
49DEFSTR += -Duse_logging
50ifdef ALIHLT_MLUCDIR
51INCLUDES += -I$(ALIHLT_MLUCDIR)/include
52else
53INCLUDES += -I/prog/alice/level3/kip/MLUC/include
54endif
55endif
56
3e87ef69 57DEFSTR += $(EXTRADEF)
58
59DICT = $(MODNAME)Cint-$(ALIHLT_USEPACKAGE).cxx
60DICTH = $(MODNAME)Cint-$(ALIHLT_USEPACKAGE).h
61DICTO = $(OBJDIR)/$(MODNAME)Cint-$(ALIHLT_USEPACKAGE).o
62
3e87ef69 63ifndef OBJS
64ifeq ($(OBJDIR),lib_alone)
65HDRS = $(SRCS:.cxx=.h)
66OBJS = $(patsubst %.cxx,$(OBJDIR)/%.o,$(SRCS))
67else
68HDRS = $(SRCS:.cxx=.h) $(MODNAME)LinkDef.h
69OBJS = $(patsubst %.cxx,$(OBJDIR)/%.o,$(SRCS)) $(DICTO)
70endif
71endif
72
73ALIHLT_LIBSO = $(ALIHLT_LIBDIR)/lib$(MODNAME).so
74
75#Default Targets
76#
77
78all: $(OBJDIR) $(ALIHLT_LIBDIR) $(ALIHLT_LIBSO)
79
80$(ALIHLT_LIBSO): $(OBJS)
81 $(LD) $(SOFLAGS) $(LDFLAGS) $^ -o $@
82
83$(DICT): $(HDRS)
84 @echo "Generating dictionary..."
85 rootcint -f $(DICT) -c $(INCLUDES) -DGCCVERSION=$(GCCVERSION) $(DEFSTR) -include AliL3StandardIncludes.h $(HDRS)
86
87$(OBJDIR)/%.o: %.cxx
88 $(CXX) $(CXXFLAGS) $(DEFSTR) -c $(INCLUDES) -o $@ $<
89
90$(OBJDIR):
91 test ! -e $(OBJDIR) && mkdir -p $(OBJDIR)
92
93$(ALIHLT_LIBDIR):
94 test ! -e $(ALIHLT_LIBDIR) && mkdir -p $(ALIHLT_LIBDIR)
95
96help:
97 cat $(ALIHLT_TOPDIR)/doc/README
98
99print:
100 @echo "MODNAME = $(MODNAME)"
101 @echo "ALIHLT_BASEDIR = $(ALIHLT_BASEDIR)"
102 @echo "ALIHLT_TOPDIR = $(ALIHLT_TOPDIR)"
103 @echo "ALIHLT_MLUCDIR = $(ALIHLT_MLUCDIR)"
104 @echo "ALIHLT_USEPACKAGE = $(ALIHLT_USEPACKAGE)"
b2a02bce 105 @echo "ALIHLT_USENEWIO = $(ALIHLT_USENEWIO)"
3e87ef69 106 @echo "ALIHLT_NOLOGGING = $(ALIHLT_NOLOGGING)"
107 @echo "ALIHLT_DOMC = $(ALIHLT_DOMC)"
3e87ef69 108 @echo "ALIHLT_ALIDETECT = $(ALIHLT_ALIDETECT)"
109 @echo "ROOTSTR = $(ROOTSTR)"
110 @echo "ALIROOTSTR = $(ALIROOTSTR)"
111
112printall: print
113 @echo "ALIHLT_LIBSO = $(ALIHLT_LIBSO)"
114 @echo "DEFSTR = $(DEFSTR)"
115 @echo "OBJDIR = $(OBJDIR)"
116 @echo "INCLUDES = $(INCLUDES)"
117 @echo "SRCS = $(SRCS)"
118 @echo "HRDS = $(HDRS)"
119 @echo "OBJS = $(OBJS)"
120
121clean:
122 rm -f $(OBJDIR)/*.o
3e87ef69 123 rm -f $(DICT) $(DICTH)
124 rm -rf $(OBJDIR)
125
126so:
127 rm -f $(ALIHLT_LIBSO)
128
02f030e3 129realclean: clean so
130
131
132.phony: help print printall clean so realclean
3e87ef69 133