Changed Makefile and AliL3RootTypes.h in order to define usepackage (ROOT, ALIROOT
[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
dfc8670c 8USEPACKAGE = ROOT
9#USEPACKAGE = ALIROOT
10
735e167e 11CXX = g++
12LD = g++
13CXXFLAGS = -O2 -Wall -fPIC -Woverloaded-virtual
14LDFLAGS = -O2
15SOFLAGS = -shared
16
17TOPDIR = $(HOME)/level3code
e998e586 18OBJDIR = lib
6820fe90 19LIBDIR = $(LEVEL3)/lib_$(USERNAME)
735e167e 20
dfc8670c 21
22ifeq ($(USEPACKAGE),ROOT)
23INCLUDES = -I$(ROOTSYS)/include -I$(TOPDIR)/hough -I$(TOPDIR)/src -I$(TOPDIR)/comp
24endif
25
26ifeq ($(USEPACKAGE),ALIROOT)
27INCLUDES = -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
28endif
29
6820fe90 30SRCS = AliL3Modeller.cxx AliL3ModelTrack.cxx AliL3Compress.cxx
735e167e 31
32DICT = AliL3CompCint.cxx
33DICTH = AliL3CompCint.h
34DICTO = $(OBJDIR)/AliL3CompCint.o
35
6820fe90 36HDRS = $(SRCS:.cxx=.h) bitio.h errhand.h AliL3CompLinkDef.h
735e167e 37
6820fe90 38OBJS = $(patsubst %.cxx,$(OBJDIR)/%.o,$(SRCS)) $(OBJDIR)/bitio.o $(OBJDIR)/errhand.o $(DICTO)
735e167e 39
6820fe90 40LEVELSO = $(LIBDIR)/libAliL3Comp.so
735e167e 41
cc4d912a 42all : $(OBJDIR) $(LIBDIR) $(LEVELSO)
735e167e 43
44
45$(LEVELSO) : $(OBJS)
46 $(LD) $(SOFLAGS) $(LDFLAGS) $^ -o $@
47
48$(DICT) : $(HDRS)
49 @echo "Generating dictionary..."
dfc8670c 50 @rootcint -f $(DICT) -c $(INCLUDES) $(HDRS)
735e167e 51
52
53$(OBJDIR)/%.o : %.cxx
dfc8670c 54 $(CXX) $(CXXFLAGS) -c $(INCLUDES) -o $@ $<
735e167e 55
56$(OBJDIR) :
57 test ! -e $(OBJDIR) && mkdir -p $(OBJDIR)
6820fe90 58
cc4d912a 59$(LIBDIR) :
60 test ! -e $(LIBDIR) && mkdir -p $(LIBDIR)
61
6820fe90 62$(OBJDIR)/bitio.o : bitio.c
63 $(CXX) -c -o $(OBJDIR)/bitio.o bitio.c
64$(OBJDIR)/errhand.o : errhand.c
65 $(CXX) -c -o $(OBJDIR)/errhand.o errhand.c
735e167e 66
67clean :
68 rm -f $(OBJDIR)/*.o
6820fe90 69 rm -f $(LIBDIR)/libAliL3Comp.so
735e167e 70 rm $(DICT) $(DICTH)
71so :
6820fe90 72 rm -f $(LIBDIR)/libAliL3Comp.so