Minor changes to make it work with new Top Makefile. Also have generated code separat...
[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
69581543 8ifndef TOPDIR
9TOPDIR = `pwd`/..
71e6af6c 10endif
e2e0cb81 11
69581543 12include $(TOPDIR)/Makefile.conf
735e167e 13
69581543 14DEFSTR = -Dno_root
dfc8670c 15
16ifeq ($(USEPACKAGE),ROOT)
17INCLUDES = -I$(ROOTSYS)/include -I$(TOPDIR)/hough -I$(TOPDIR)/src -I$(TOPDIR)/comp
e2e0cb81 18DEFSTR = -Duse_root
74eabe5f 19OBJDIR = lib_ROOT
dfc8670c 20endif
21
22ifeq ($(USEPACKAGE),ALIROOT)
23INCLUDES = -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 24DEFSTR = -Duse_aliroot -Duse_root
dfc8670c 25endif
26
69581543 27ifdef DO_MC
28DEFSTR += -Ddo_mc
29endif
e2e0cb81 30
b419a833 31ifndef NOLOGGING
71e6af6c 32DEFSTR += -Duse_logging
b419a833 33endif
71e6af6c 34
35ifdef MLUCDIR
36INCLUDES += -I$(MLUCDIR)/include
37else
38INCLUDES += -I/prog/alice/level3/kip/MLUC/include
39endif
40
6820fe90 41SRCS = AliL3Modeller.cxx AliL3ModelTrack.cxx AliL3Compress.cxx
735e167e 42
43DICT = AliL3CompCint.cxx
44DICTH = AliL3CompCint.h
45DICTO = $(OBJDIR)/AliL3CompCint.o
46
6820fe90 47HDRS = $(SRCS:.cxx=.h) bitio.h errhand.h AliL3CompLinkDef.h
735e167e 48
6820fe90 49OBJS = $(patsubst %.cxx,$(OBJDIR)/%.o,$(SRCS)) $(OBJDIR)/bitio.o $(OBJDIR)/errhand.o $(DICTO)
735e167e 50
6820fe90 51LEVELSO = $(LIBDIR)/libAliL3Comp.so
735e167e 52
cc4d912a 53all : $(OBJDIR) $(LIBDIR) $(LEVELSO)
735e167e 54
55
56$(LEVELSO) : $(OBJS)
57 $(LD) $(SOFLAGS) $(LDFLAGS) $^ -o $@
58
59$(DICT) : $(HDRS)
60 @echo "Generating dictionary..."
dfc8670c 61 @rootcint -f $(DICT) -c $(INCLUDES) $(HDRS)
735e167e 62
63
64$(OBJDIR)/%.o : %.cxx
e2e0cb81 65 $(CXX) $(CXXFLAGS) $(DEFSTR) -c $(INCLUDES) -o $@ $<
735e167e 66
67$(OBJDIR) :
68 test ! -e $(OBJDIR) && mkdir -p $(OBJDIR)
6820fe90 69
cc4d912a 70$(LIBDIR) :
71 test ! -e $(LIBDIR) && mkdir -p $(LIBDIR)
72
6820fe90 73$(OBJDIR)/bitio.o : bitio.c
74 $(CXX) -c -o $(OBJDIR)/bitio.o bitio.c
75$(OBJDIR)/errhand.o : errhand.c
76 $(CXX) -c -o $(OBJDIR)/errhand.o errhand.c
735e167e 77
78clean :
79 rm -f $(OBJDIR)/*.o
6820fe90 80 rm -f $(LIBDIR)/libAliL3Comp.so
74eabe5f 81 rm -f $(DICT) $(DICTH)
735e167e 82so :
6820fe90 83 rm -f $(LIBDIR)/libAliL3Comp.so