Changed definition of TOPDIR
[u/mrichter/AliRoot.git] / HLT / misc / Makefile
CommitLineData
1a3c8f6e 1#$Id$
2###########################
3# Makefile for HLT code. #
4# #
5# Author: Anders Vestbo #
6fd65d1d 6# changes by C. Loizides #
1a3c8f6e 7###########################
8
17d8d094 9ifndef TOPDIR
8847a8dd 10TOPDIR = $(shell pwd)/..
1a3c8f6e 11endif
12
17d8d094 13include $(TOPDIR)/Makefile.conf
1a3c8f6e 14
17d8d094 15DEFSTR = -Dno_root
6fd65d1d 16OBJDIR = lib_alone
17INCLUDES = -I$(TOPDIR)/hough -I$(TOPDIR)/src -I$(TOPDIR)/comp -I$(TOPDIR)/misc
1a3c8f6e 18
19ifeq ($(USEPACKAGE),ROOT)
20INCLUDES = -I$(ROOTSYS)/include -I$(TOPDIR)/hough -I$(TOPDIR)/src -I$(TOPDIR)/comp
21DEFSTR = -Duse_root
74eabe5f 22OBJDIR = lib_ROOT
1a3c8f6e 23endif
24
25ifeq ($(USEPACKAGE),ALIROOT)
26INCLUDES = -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
27835353 27DEFSTR = -Duse_aliroot -Duse_root
6fd65d1d 28OBJDIR = lib
1a3c8f6e 29endif
30
17d8d094 31ifdef DO_MC
32DEFSTR += -Ddo_mc
33endif
1a3c8f6e 34
b419a833 35ifndef NOLOGGING
1a3c8f6e 36DEFSTR += -Duse_logging
b419a833 37endif
1a3c8f6e 38
6fd65d1d 39DEFSTR += $(EXTRADEF)
40
1a3c8f6e 41ifdef MLUCDIR
42INCLUDES += -I$(MLUCDIR)/include
43else
44INCLUDES += -I/prog/alice/level3/kip/MLUC/include
45endif
46
ce4f47b0 47SRCS = AliL3TransBit.cxx AliL3AltroMemHandler.cxx AliL3DataHandler.cxx AliL3VHDLClusterFinder.cxx \
e5bcc7b1 48 AliL3FFloat.cxx AliL3Stopwatch.cxx
1a3c8f6e 49
6fd65d1d 50DICT = AliL3MiscCint-$(USEPACKAGE).cxx
51DICTH = AliL3MiscCint-$(USEPACKAGE).h
52DICTO = $(OBJDIR)/AliL3MiscCint-$(USEPACKAGE).o
1a3c8f6e 53
54HDRS = $(SRCS:.cxx=.h) AliL3MiscLinkDef.h
55OBJS = $(patsubst %.cxx,$(OBJDIR)/%.o,$(SRCS)) $(DICTO)
56
6fd65d1d 57ifeq ($(OBJDIR),lib_alone)
58HDRS = $(SRCS:.cxx=.h)
59OBJS = $(patsubst %.cxx,$(OBJDIR)/%.o,$(SRCS))
60endif
61
62
1a3c8f6e 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..."
24dbb695 72 @rootcint -f $(DICT) -c $(INCLUDES) -DGCCVERSION=$(GCCVERSION) -include AliL3StandardIncludes.h $(HDRS)
1a3c8f6e 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
74eabe5f 86 rm -f $(DICT) $(DICTH)
1a3c8f6e 87
88so :
89 rm -f $(LIBDIR)/libAliL3Misc.so