Changes for independant library of standalone l3 code.
[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
c1123a44 48SRCS = AliL3Modeller.cxx AliL3ModelTrack.cxx
735e167e 49
6fd65d1d 50DICT = AliL3CompCint-$(USEPACKAGE).cxx
51DICTH = AliL3CompCint-$(USEPACKAGE).h
52DICTO = $(OBJDIR)/AliL3CompCint-$(USEPACKAGE).o
735e167e 53
c1123a44 54ifeq ($(USEPACKAGE),ROOT)
55SRCS += AliL3Compress.cxx
6fd65d1d 56HDRS = $(SRCS:.cxx=.h) bitio.h errhand.h AliL3CompLinkDef.h
6820fe90 57OBJS = $(patsubst %.cxx,$(OBJDIR)/%.o,$(SRCS)) $(OBJDIR)/bitio.o $(OBJDIR)/errhand.o $(DICTO)
c1123a44 58endif
59
60ifeq ($(USEPACKAGE),ALIROOT)
61SRCS += AliL3Compress.cxx
62HDRS = $(SRCS:.cxx=.h) bitio.h errhand.h AliL3CompLinkDef.h
63OBJS = $(patsubst %.cxx,$(OBJDIR)/%.o,$(SRCS)) $(OBJDIR)/bitio.o $(OBJDIR)/errhand.o $(DICTO)
64endif
735e167e 65
6fd65d1d 66ifeq ($(OBJDIR),lib_alone)
67HDRS = $(SRCS:.cxx=.h) bitio.h errhand.h
68OBJS = $(patsubst %.cxx,$(OBJDIR)/%.o,$(SRCS)) $(OBJDIR)/bitio.o $(OBJDIR)/errhand.o
69endif
70
71
6820fe90 72LEVELSO = $(LIBDIR)/libAliL3Comp.so
735e167e 73
cc4d912a 74all : $(OBJDIR) $(LIBDIR) $(LEVELSO)
735e167e 75
735e167e 76$(LEVELSO) : $(OBJS)
77 $(LD) $(SOFLAGS) $(LDFLAGS) $^ -o $@
78
79$(DICT) : $(HDRS)
80 @echo "Generating dictionary..."
dfc8670c 81 @rootcint -f $(DICT) -c $(INCLUDES) $(HDRS)
735e167e 82
735e167e 83$(OBJDIR)/%.o : %.cxx
e2e0cb81 84 $(CXX) $(CXXFLAGS) $(DEFSTR) -c $(INCLUDES) -o $@ $<
735e167e 85
86$(OBJDIR) :
87 test ! -e $(OBJDIR) && mkdir -p $(OBJDIR)
6820fe90 88
cc4d912a 89$(LIBDIR) :
90 test ! -e $(LIBDIR) && mkdir -p $(LIBDIR)
91
6820fe90 92$(OBJDIR)/bitio.o : bitio.c
93 $(CXX) -c -o $(OBJDIR)/bitio.o bitio.c
6fd65d1d 94
6820fe90 95$(OBJDIR)/errhand.o : errhand.c
96 $(CXX) -c -o $(OBJDIR)/errhand.o errhand.c
735e167e 97
98clean :
99 rm -f $(OBJDIR)/*.o
6820fe90 100 rm -f $(LIBDIR)/libAliL3Comp.so
6fd65d1d 101 rm -f $(DICT) $(DICTH)
735e167e 102so :
6fd65d1d 103 rm -f $(LIBDIR)/libAliL3Comp.so