-Added protected copy constructors and assignment operators. -Public data members...
[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
1f1942b8 16INCLUDES = -I$(ALIHLT_TOPDIR)/src -I$(ALIHLT_TOPDIR)/hough -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
0bd0c1ef 48ifeq ($(USEROWHOUGH),1)
49DEFSTR += -DROWHOUGH
50endif
51
3e87ef69 52ifneq ($(NOLOGGING),1)
53DEFSTR += -Duse_logging
54ifdef ALIHLT_MLUCDIR
55INCLUDES += -I$(ALIHLT_MLUCDIR)/include
56else
57INCLUDES += -I/prog/alice/level3/kip/MLUC/include
58endif
59endif
60
1f1942b8 61DEFSTR += -D$(ARCH) $(EXTRADEF)
3e87ef69 62
63DICT = $(MODNAME)Cint-$(ALIHLT_USEPACKAGE).cxx
64DICTH = $(MODNAME)Cint-$(ALIHLT_USEPACKAGE).h
65DICTO = $(OBJDIR)/$(MODNAME)Cint-$(ALIHLT_USEPACKAGE).o
66
3e87ef69 67ifndef OBJS
68ifeq ($(OBJDIR),lib_alone)
69HDRS = $(SRCS:.cxx=.h)
70OBJS = $(patsubst %.cxx,$(OBJDIR)/%.o,$(SRCS))
71else
72HDRS = $(SRCS:.cxx=.h) $(MODNAME)LinkDef.h
73OBJS = $(patsubst %.cxx,$(OBJDIR)/%.o,$(SRCS)) $(DICTO)
74endif
75endif
76
5a31e9df 77STATICOBJS = $(patsubst %.o,%.sto,$(OBJS))
3e87ef69 78
5a31e9df 79ALIHLT_LIBSO = $(ALIHLT_LIBDIR)/lib$(MODNAME).so
80ALIHLT_DYLIB = $(ALIHLT_LIBDIR)/lib$(MODNAME).dylib
81ALIHLT_STATIC = $(ALIHLT_LIBDIR)/lib$(MODNAME).a
3e87ef69 82
5a31e9df 83#Default Target
84default: so
85
86libs: so static
87
88so: $(OBJDIR) $(ALIHLT_LIBDIR) $(ALIHLT_LIBSO)
89
90static: $(OBJDIR) $(ALIHLT_LIBDIR) $(ALIHLT_STATIC)
3e87ef69 91
92$(ALIHLT_LIBSO): $(OBJS)
1f1942b8 93ifeq ($(ARCH),Darwin)
94 $(LD) $(DYFLAGS) $^ $(LDFLAGS) -o $(ALIHLT_DYLIB)
95endif
96 $(LD) $(SOFLAGS) $^ $(LDFLAGS) -o $@
97
5a31e9df 98$(ALIHLT_STATIC): $(STATICOBJS)
99 $(LDSTATIC) $(STATICFLAGS) $@ $^
3e87ef69 100
101$(DICT): $(HDRS)
102 @echo "Generating dictionary..."
0bd0c1ef 103 rootcint -f $(DICT) -c $(CINTCXXFLAGS) $(INCLUDES) \
1f1942b8 104 $(DEFSTR) -include AliL3StandardIncludes.h $(HDRS)
3e87ef69 105
106$(OBJDIR)/%.o: %.cxx
107 $(CXX) $(CXXFLAGS) $(DEFSTR) -c $(INCLUDES) -o $@ $<
108
5a31e9df 109$(OBJDIR)/%.sto: %.cxx
110 $(CXX) $(PROFILEFLAGS) $(CXXFLAGS) $(DEFSTR) -c $(INCLUDES) -o $@ $<
111
3e87ef69 112$(OBJDIR):
113 test ! -e $(OBJDIR) && mkdir -p $(OBJDIR)
114
115$(ALIHLT_LIBDIR):
116 test ! -e $(ALIHLT_LIBDIR) && mkdir -p $(ALIHLT_LIBDIR)
117
118help:
119 cat $(ALIHLT_TOPDIR)/doc/README
120
121print:
122 @echo "MODNAME = $(MODNAME)"
123 @echo "ALIHLT_BASEDIR = $(ALIHLT_BASEDIR)"
124 @echo "ALIHLT_TOPDIR = $(ALIHLT_TOPDIR)"
125 @echo "ALIHLT_MLUCDIR = $(ALIHLT_MLUCDIR)"
126 @echo "ALIHLT_USEPACKAGE = $(ALIHLT_USEPACKAGE)"
b2a02bce 127 @echo "ALIHLT_USENEWIO = $(ALIHLT_USENEWIO)"
3e87ef69 128 @echo "ALIHLT_NOLOGGING = $(ALIHLT_NOLOGGING)"
129 @echo "ALIHLT_DOMC = $(ALIHLT_DOMC)"
3e87ef69 130 @echo "ALIHLT_ALIDETECT = $(ALIHLT_ALIDETECT)"
0bd0c1ef 131 @echo "ALIHLT_ROWHOUGH = $(ALIHLT_ROWHOUGH)"
3e87ef69 132 @echo "ROOTSTR = $(ROOTSTR)"
133 @echo "ALIROOTSTR = $(ALIROOTSTR)"
134
135printall: print
136 @echo "ALIHLT_LIBSO = $(ALIHLT_LIBSO)"
137 @echo "DEFSTR = $(DEFSTR)"
138 @echo "OBJDIR = $(OBJDIR)"
139 @echo "INCLUDES = $(INCLUDES)"
140 @echo "SRCS = $(SRCS)"
141 @echo "HRDS = $(HDRS)"
142 @echo "OBJS = $(OBJS)"
143
144clean:
5a31e9df 145 rm -f $(OBJDIR)/*.o $(OBJDIR)/*.sto
3e87ef69 146 rm -f $(DICT) $(DICTH)
147 rm -rf $(OBJDIR)
148
5a31e9df 149cleanlib:
150 rm -f $(ALIHLT_LIBSO) $(ALIHLT_DYLIB) $(ALIHLT_STATIC)
3e87ef69 151
5a31e9df 152realclean: clean cleanlib
02f030e3 153
154
155.phony: help print printall clean so realclean
3e87ef69 156