Newline added at the end of file.
[u/mrichter/AliRoot.git] / HLT / comp / Makefile
CommitLineData
e998e586 1#$Id$
2###########################
3# Makefile for HLT code. #
4# #
5# Author: Anders Vestbo #
6fd65d1d 6# changes by C. Loizides #
e998e586 7###########################
735e167e 8
6fd65d1d 9
69581543 10ifndef TOPDIR
11TOPDIR = `pwd`/..
71e6af6c 12endif
e2e0cb81 13
69581543 14include $(TOPDIR)/Makefile.conf
735e167e 15
69581543 16DEFSTR = -Dno_root
6fd65d1d 17OBJDIR = lib_alone
18INCLUDES = -I$(TOPDIR)/hough -I$(TOPDIR)/src -I$(TOPDIR)/comp -I$(TOPDIR)/misc
dfc8670c 19
20ifeq ($(USEPACKAGE),ROOT)
21INCLUDES = -I$(ROOTSYS)/include -I$(TOPDIR)/hough -I$(TOPDIR)/src -I$(TOPDIR)/comp
e2e0cb81 22DEFSTR = -Duse_root
74eabe5f 23OBJDIR = lib_ROOT
dfc8670c 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
e2e0cb81 28DEFSTR = -Duse_aliroot -Duse_root
6fd65d1d 29OBJDIR = lib
dfc8670c 30endif
31
69581543 32ifdef DO_MC
33DEFSTR += -Ddo_mc
34endif
e2e0cb81 35
b419a833 36ifndef NOLOGGING
71e6af6c 37DEFSTR += -Duse_logging
b419a833 38endif
71e6af6c 39
6fd65d1d 40DEFSTR += $(EXTRADEF)
41
71e6af6c 42ifdef MLUCDIR
43INCLUDES += -I$(MLUCDIR)/include
44else
45INCLUDES += -I/prog/alice/level3/kip/MLUC/include
46endif
47
6820fe90 48SRCS = AliL3Modeller.cxx AliL3ModelTrack.cxx AliL3Compress.cxx
735e167e 49
735e167e 50
6fd65d1d 51DICT = AliL3CompCint-$(USEPACKAGE).cxx
52DICTH = AliL3CompCint-$(USEPACKAGE).h
53DICTO = $(OBJDIR)/AliL3CompCint-$(USEPACKAGE).o
735e167e 54
6fd65d1d 55HDRS = $(SRCS:.cxx=.h) bitio.h errhand.h AliL3CompLinkDef.h
6820fe90 56OBJS = $(patsubst %.cxx,$(OBJDIR)/%.o,$(SRCS)) $(OBJDIR)/bitio.o $(OBJDIR)/errhand.o $(DICTO)
735e167e 57
6fd65d1d 58ifeq ($(OBJDIR),lib_alone)
59HDRS = $(SRCS:.cxx=.h) bitio.h errhand.h
60OBJS = $(patsubst %.cxx,$(OBJDIR)/%.o,$(SRCS)) $(OBJDIR)/bitio.o $(OBJDIR)/errhand.o
61endif
62
63
6820fe90 64LEVELSO = $(LIBDIR)/libAliL3Comp.so
735e167e 65
cc4d912a 66all : $(OBJDIR) $(LIBDIR) $(LEVELSO)
735e167e 67
735e167e 68$(LEVELSO) : $(OBJS)
69 $(LD) $(SOFLAGS) $(LDFLAGS) $^ -o $@
70
71$(DICT) : $(HDRS)
72 @echo "Generating dictionary..."
dfc8670c 73 @rootcint -f $(DICT) -c $(INCLUDES) $(HDRS)
735e167e 74
735e167e 75$(OBJDIR)/%.o : %.cxx
e2e0cb81 76 $(CXX) $(CXXFLAGS) $(DEFSTR) -c $(INCLUDES) -o $@ $<
735e167e 77
78$(OBJDIR) :
79 test ! -e $(OBJDIR) && mkdir -p $(OBJDIR)
6820fe90 80
cc4d912a 81$(LIBDIR) :
82 test ! -e $(LIBDIR) && mkdir -p $(LIBDIR)
83
6820fe90 84$(OBJDIR)/bitio.o : bitio.c
85 $(CXX) -c -o $(OBJDIR)/bitio.o bitio.c
6fd65d1d 86
6820fe90 87$(OBJDIR)/errhand.o : errhand.c
88 $(CXX) -c -o $(OBJDIR)/errhand.o errhand.c
735e167e 89
90clean :
91 rm -f $(OBJDIR)/*.o
6820fe90 92 rm -f $(LIBDIR)/libAliL3Comp.so
6fd65d1d 93 rm -f $(DICT) $(DICTH)
735e167e 94so :
6fd65d1d 95 rm -f $(LIBDIR)/libAliL3Comp.so