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