2 ###########################
3 # Makefile for HLT code. #
5 # Author: Anders Vestbo #
6 ###########################
13 #used if USEPACKAGE=anything else
18 CXXFLAGS = -O2 -Wall -fPIC -Woverloaded-virtual
23 TOPDIR = $(HOME)/level3code
26 LIBDIR = $(LEVEL3)/lib_$(USERNAME)
30 ifeq ($(USEPACKAGE),ROOT)
31 INCLUDES = -I$(ROOTSYS)/include -I$(TOPDIR)/hough -I$(TOPDIR)/src -I$(TOPDIR)/comp
36 ifeq ($(USEPACKAGE),ALIROOT)
37 INCLUDES = -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
38 DEFSTR = -Duse_aliroot -Duse_root
41 #Save the particle id's
46 DEFSTR += -Duse_logging
50 INCLUDES += -I$(MLUCDIR)/include
52 INCLUDES += -I/prog/alice/level3/kip/MLUC/include
55 SRCS = AliL3Modeller.cxx AliL3ModelTrack.cxx AliL3Compress.cxx
57 DICT = AliL3CompCint.cxx
58 DICTH = AliL3CompCint.h
59 DICTO = $(OBJDIR)/AliL3CompCint.o
61 HDRS = $(SRCS:.cxx=.h) bitio.h errhand.h AliL3CompLinkDef.h
63 OBJS = $(patsubst %.cxx,$(OBJDIR)/%.o,$(SRCS)) $(OBJDIR)/bitio.o $(OBJDIR)/errhand.o $(DICTO)
65 LEVELSO = $(LIBDIR)/libAliL3Comp.so
67 all : $(OBJDIR) $(LIBDIR) $(LEVELSO)
71 $(LD) $(SOFLAGS) $(LDFLAGS) $^ -o $@
74 @echo "Generating dictionary..."
75 @rootcint -f $(DICT) -c $(INCLUDES) $(HDRS)
79 $(CXX) $(CXXFLAGS) $(DEFSTR) -c $(INCLUDES) -o $@ $<
82 test ! -e $(OBJDIR) && mkdir -p $(OBJDIR)
85 test ! -e $(LIBDIR) && mkdir -p $(LIBDIR)
87 $(OBJDIR)/bitio.o : bitio.c
88 $(CXX) -c -o $(OBJDIR)/bitio.o bitio.c
89 $(OBJDIR)/errhand.o : errhand.c
90 $(CXX) -c -o $(OBJDIR)/errhand.o errhand.c
94 rm -f $(LIBDIR)/libAliL3Comp.so
95 rm -f $(DICT) $(DICTH)
97 rm -f $(LIBDIR)/libAliL3Comp.so