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