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