cluster information
[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
16INCLUDES = -I$(ALIHLT_TOPDIR)/hough -I$(ALIHLT_TOPDIR)/src -I$(ALIHLT_TOPDIR)/comp -I$(ALIHLT_TOPDIR)/misc -I$(ALIHLT_TOPDIR)/trigger
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
29OBJDIR = lib
30ROOTSTR := $(shell $(ROOTSYS)/bin/root -n -b -q | grep Version | cut -b 17-25 | cut -d" " -f1)
31DEFSTR += -DROOTVERSION=\"$(ROOTSTR)\"
32ifeq ($(USECVS),1)
33ALIROOTSTR := $(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)
34DEFSTR += -Duse_cvs
35else
36ALIROOTSTR = "Unknown"
37endif
38DEFSTR += -DALIROOTVERSION=\"$(ALIROOTSTR)\"
39endif
40
41ifeq ($(DOMC),1)
42DEFSTR += -Ddo_mc
43endif
44
45ifneq ($(NOLOGGING),1)
46DEFSTR += -Duse_logging
47ifdef ALIHLT_MLUCDIR
48INCLUDES += -I$(ALIHLT_MLUCDIR)/include
49else
50INCLUDES += -I/prog/alice/level3/kip/MLUC/include
51endif
52endif
53
3e87ef69 54
55DEFSTR += $(EXTRADEF)
56
57DICT = $(MODNAME)Cint-$(ALIHLT_USEPACKAGE).cxx
58DICTH = $(MODNAME)Cint-$(ALIHLT_USEPACKAGE).h
59DICTO = $(OBJDIR)/$(MODNAME)Cint-$(ALIHLT_USEPACKAGE).o
60
61
62ifndef OBJS
63ifeq ($(OBJDIR),lib_alone)
64HDRS = $(SRCS:.cxx=.h)
65OBJS = $(patsubst %.cxx,$(OBJDIR)/%.o,$(SRCS))
66else
67HDRS = $(SRCS:.cxx=.h) $(MODNAME)LinkDef.h
68OBJS = $(patsubst %.cxx,$(OBJDIR)/%.o,$(SRCS)) $(DICTO)
69endif
70endif
71
72ALIHLT_LIBSO = $(ALIHLT_LIBDIR)/lib$(MODNAME).so
73
74#Default Targets
75#
76
77all: $(OBJDIR) $(ALIHLT_LIBDIR) $(ALIHLT_LIBSO)
78
79$(ALIHLT_LIBSO): $(OBJS)
80 $(LD) $(SOFLAGS) $(LDFLAGS) $^ -o $@
81
82$(DICT): $(HDRS)
83 @echo "Generating dictionary..."
84 rootcint -f $(DICT) -c $(INCLUDES) -DGCCVERSION=$(GCCVERSION) $(DEFSTR) -include AliL3StandardIncludes.h $(HDRS)
85
86$(OBJDIR)/%.o: %.cxx
87 $(CXX) $(CXXFLAGS) $(DEFSTR) -c $(INCLUDES) -o $@ $<
88
89$(OBJDIR):
90 test ! -e $(OBJDIR) && mkdir -p $(OBJDIR)
91
92$(ALIHLT_LIBDIR):
93 test ! -e $(ALIHLT_LIBDIR) && mkdir -p $(ALIHLT_LIBDIR)
94
95help:
96 cat $(ALIHLT_TOPDIR)/doc/README
97
98print:
99 @echo "MODNAME = $(MODNAME)"
100 @echo "ALIHLT_BASEDIR = $(ALIHLT_BASEDIR)"
101 @echo "ALIHLT_TOPDIR = $(ALIHLT_TOPDIR)"
102 @echo "ALIHLT_MLUCDIR = $(ALIHLT_MLUCDIR)"
103 @echo "ALIHLT_USEPACKAGE = $(ALIHLT_USEPACKAGE)"
104 @echo "ALIHLT_NOLOGGING = $(ALIHLT_NOLOGGING)"
105 @echo "ALIHLT_DOMC = $(ALIHLT_DOMC)"
3e87ef69 106 @echo "ALIHLT_ALIDETECT = $(ALIHLT_ALIDETECT)"
107 @echo "ROOTSTR = $(ROOTSTR)"
108 @echo "ALIROOTSTR = $(ALIROOTSTR)"
109
110printall: print
111 @echo "ALIHLT_LIBSO = $(ALIHLT_LIBSO)"
112 @echo "DEFSTR = $(DEFSTR)"
113 @echo "OBJDIR = $(OBJDIR)"
114 @echo "INCLUDES = $(INCLUDES)"
115 @echo "SRCS = $(SRCS)"
116 @echo "HRDS = $(HDRS)"
117 @echo "OBJS = $(OBJS)"
118
119clean:
120 rm -f $(OBJDIR)/*.o
3e87ef69 121 rm -f $(DICT) $(DICTH)
122 rm -rf $(OBJDIR)
123
124so:
125 rm -f $(ALIHLT_LIBSO)
126
02f030e3 127realclean: clean so
128
129
130.phony: help print printall clean so realclean
3e87ef69 131