Minor changes to check for NOLOGGING env str
[u/mrichter/AliRoot.git] / HLT / misc / Makefile
CommitLineData
1a3c8f6e 1#$Id$
2###########################
3# Makefile for HLT code. #
4# #
5# Author: Anders Vestbo #
6###########################
7
8ifndef USEPACKAGE
9#USEPACKAGE = ROOT
10USEPACKAGE = ALIROOT
11endif
12
13#used if USEPACKAGE=anything else
14DEFSTR = -Dno_root
15
16CXX = g++
17LD = g++
18CXXFLAGS = -O2 -Wall -fPIC
19LDFLAGS = -O2
20SOFLAGS = -shared
21
22ifndef TOPDIR
23TOPDIR = $(HOME)/level3code
24endif
25ifndef LIBDIR
26LIBDIR = $(LEVEL3)/lib_$(USERNAME)
27endif
28OBJDIR = lib
29
30ifeq ($(USEPACKAGE),ROOT)
31INCLUDES = -I$(ROOTSYS)/include -I$(TOPDIR)/hough -I$(TOPDIR)/src -I$(TOPDIR)/comp
32DEFSTR = -Duse_root
33endif
34
35ifeq ($(USEPACKAGE),ALIROOT)
36INCLUDES = -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
37DEFSTR = -Duse_aliroot
38endif
39
40#Save the particle id's
41#DEFSTR += -Ddo_mc
42
43#Use logging classes
b419a833 44ifndef NOLOGGING
1a3c8f6e 45DEFSTR += -Duse_logging
b419a833 46endif
1a3c8f6e 47
48ifdef MLUCDIR
49INCLUDES += -I$(MLUCDIR)/include
50else
51INCLUDES += -I/prog/alice/level3/kip/MLUC/include
52endif
53
54SRCS = AliTransBit.cxx
55
56DICT = AliL3MiscCint.cxx
57DICTH = AliL3MiscCint.h
58DICTO = $(OBJDIR)/AliL3MiscCint.o
59
60HDRS = $(SRCS:.cxx=.h) AliL3MiscLinkDef.h
61OBJS = $(patsubst %.cxx,$(OBJDIR)/%.o,$(SRCS)) $(DICTO)
62
63LEVELSO = $(LIBDIR)/libAliL3Misc.so
64
65all : $(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
83clean :
84 rm -f $(OBJDIR)/*.o
85 rm -f $(LIBDIR)/libAliL3Misc.so
86 rm $(DICT) $(DICTH)
87
88so :
89 rm -f $(LIBDIR)/libAliL3Misc.so
90
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