]> git.uio.no Git - u/mrichter/AliRoot.git/blame - HLT/comp/Makefile
Minor changes to check for NOLOGGING env str
[u/mrichter/AliRoot.git] / HLT / comp / Makefile
CommitLineData
e998e586 1#$Id$
2###########################
3# Makefile for HLT code. #
4# #
5# Author: Anders Vestbo #
6###########################
735e167e 7
71e6af6c 8ifndef USEPACKAGE
e2e0cb81 9#USEPACKAGE = ROOT
10USEPACKAGE = ALIROOT
71e6af6c 11endif
e2e0cb81 12
71e6af6c 13#used if USEPACKAGE=anything else
e2e0cb81 14DEFSTR = -Dno_root
dfc8670c 15
735e167e 16CXX = g++
17LD = g++
18CXXFLAGS = -O2 -Wall -fPIC -Woverloaded-virtual
19LDFLAGS = -O2
20SOFLAGS = -shared
21
71e6af6c 22ifndef TOPDIR
735e167e 23TOPDIR = $(HOME)/level3code
71e6af6c 24endif
25ifndef LIBDIR
6820fe90 26LIBDIR = $(LEVEL3)/lib_$(USERNAME)
71e6af6c 27endif
28OBJDIR = lib
dfc8670c 29
30ifeq ($(USEPACKAGE),ROOT)
31INCLUDES = -I$(ROOTSYS)/include -I$(TOPDIR)/hough -I$(TOPDIR)/src -I$(TOPDIR)/comp
e2e0cb81 32DEFSTR = -Duse_root
dfc8670c 33endif
34
35ifeq ($(USEPACKAGE),ALIROOT)
36INCLUDES = -I$(ROOTSYS)/include -I$(TOPDIR)/hough -I$(TOPDIR)/src -I$(TOPDIR)/comp -I$(ALICE_ROOT)/include/ -I$(ALICE_ROOT)/TPC -I$(ALICE_ROOT)/CONTAINERS -I$(ALICE_ROOT)/STEER
e2e0cb81 37DEFSTR = -Duse_aliroot -Duse_root
dfc8670c 38endif
39
e2e0cb81 40#Save the particle id's
41#DEFSTR += -Ddo_mc
42
71e6af6c 43#Use logging classes
b419a833 44ifndef NOLOGGING
71e6af6c 45DEFSTR += -Duse_logging
b419a833 46endif
71e6af6c 47
48ifdef MLUCDIR
49INCLUDES += -I$(MLUCDIR)/include
50else
51INCLUDES += -I/prog/alice/level3/kip/MLUC/include
52endif
53
6820fe90 54SRCS = AliL3Modeller.cxx AliL3ModelTrack.cxx AliL3Compress.cxx
735e167e 55
56DICT = AliL3CompCint.cxx
57DICTH = AliL3CompCint.h
58DICTO = $(OBJDIR)/AliL3CompCint.o
59
6820fe90 60HDRS = $(SRCS:.cxx=.h) bitio.h errhand.h AliL3CompLinkDef.h
735e167e 61
6820fe90 62OBJS = $(patsubst %.cxx,$(OBJDIR)/%.o,$(SRCS)) $(OBJDIR)/bitio.o $(OBJDIR)/errhand.o $(DICTO)
735e167e 63
6820fe90 64LEVELSO = $(LIBDIR)/libAliL3Comp.so
735e167e 65
cc4d912a 66all : $(OBJDIR) $(LIBDIR) $(LEVELSO)
735e167e 67
68
69$(LEVELSO) : $(OBJS)
70 $(LD) $(SOFLAGS) $(LDFLAGS) $^ -o $@
71
72$(DICT) : $(HDRS)
73 @echo "Generating dictionary..."
dfc8670c 74 @rootcint -f $(DICT) -c $(INCLUDES) $(HDRS)
735e167e 75
76
77$(OBJDIR)/%.o : %.cxx
e2e0cb81 78 $(CXX) $(CXXFLAGS) $(DEFSTR) -c $(INCLUDES) -o $@ $<
735e167e 79
80$(OBJDIR) :
81 test ! -e $(OBJDIR) && mkdir -p $(OBJDIR)
6820fe90 82
cc4d912a 83$(LIBDIR) :
84 test ! -e $(LIBDIR) && mkdir -p $(LIBDIR)
85
6820fe90 86$(OBJDIR)/bitio.o : bitio.c
87 $(CXX) -c -o $(OBJDIR)/bitio.o bitio.c
88$(OBJDIR)/errhand.o : errhand.c
89 $(CXX) -c -o $(OBJDIR)/errhand.o errhand.c
735e167e 90
91clean :
92 rm -f $(OBJDIR)/*.o
6820fe90 93 rm -f $(LIBDIR)/libAliL3Comp.so
735e167e 94 rm $(DICT) $(DICTH)
95so :
6820fe90 96 rm -f $(LIBDIR)/libAliL3Comp.so