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