]> git.uio.no Git - u/mrichter/AliRoot.git/blob - HLT/misc/Makefile
4e31ed4749e9599611954b868388ccef2736681d
[u/mrichter/AliRoot.git] / HLT / misc / 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
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
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    = AliTransBit.cxx AliL3AltroMemHandler.cxx AliL3DataHandler.cxx
56
57 DICT = AliL3MiscCint.cxx
58 DICTH = AliL3MiscCint.h
59 DICTO = $(OBJDIR)/AliL3MiscCint.o
60
61 HDRS = $(SRCS:.cxx=.h) AliL3MiscLinkDef.h
62 OBJS = $(patsubst %.cxx,$(OBJDIR)/%.o,$(SRCS)) $(DICTO)
63
64 LEVELSO = $(LIBDIR)/libAliL3Misc.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 clean :
85         rm -f $(OBJDIR)/*.o
86         rm -f $(LIBDIR)/libAliL3Misc.so
87         rm -f $(DICT) $(DICTH) 
88
89 so :
90         rm -f $(LIBDIR)/libAliL3Misc.so
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119