Changes for independant library of standalone l3 code.
[u/mrichter/AliRoot.git] / HLT / hough / Makefile
CommitLineData
e998e586 1#$Id$
2###########################
3# Makefile for HLT code. #
4# #
5# Author: Anders Vestbo #
6fd65d1d 6# changes by C. Loizides #
e998e586 7###########################
4de874d1 8
6fd65d1d 9
69581543 10ifndef TOPDIR
11TOPDIR = `pwd`/..
71e6af6c 12endif
b5a207b4 13
69581543 14include $(TOPDIR)/Makefile.conf
4de874d1 15
69581543 16DEFSTR = -Dno_root
6fd65d1d 17OBJDIR = lib_alone
18INCLUDES = -I$(TOPDIR)/hough -I$(TOPDIR)/src -I$(TOPDIR)/comp -I$(TOPDIR)/misc
4de874d1 19
b5a207b4 20ifeq ($(USEPACKAGE),ROOT)
d96f6a4a 21INCLUDES = -I$(ROOTSYS)/include -I$(TOPDIR)/hough -I$(TOPDIR)/src -I$(TOPDIR)/comp -I$(TOPDIR)/misc
e2e0cb81 22DEFSTR = -Duse_root
74eabe5f 23OBJDIR = lib_ROOT
b5a207b4 24endif
25
26ifeq ($(USEPACKAGE),ALIROOT)
d96f6a4a 27INCLUDES = -I$(ROOTSYS)/include -I$(TOPDIR)/hough -I$(TOPDIR)/src -I$(TOPDIR)/comp -I$(TOPDIR)/misc -I$(ALICE_ROOT)/include/ -I$(ALICE_ROOT)/TPC -I$(ALICE_ROOT)/CONTAINERS -I$(ALICE_ROOT)/STEER
e2e0cb81 28DEFSTR = -Duse_aliroot -Duse_root
6fd65d1d 29OBJDIR = lib
b5a207b4 30endif
31
e2e0cb81 32#Save the particle id's
69581543 33ifdef DO_MC
34DEFSTR += -Ddo_mc
35endif
e2e0cb81 36
71e6af6c 37#Use logging classes
b419a833 38ifndef NOLOGGING
71e6af6c 39DEFSTR += -Duse_logging
b419a833 40endif
71e6af6c 41
6fd65d1d 42DEFSTR += $(EXTRADEF)
43
71e6af6c 44ifdef MLUCDIR
45INCLUDES += -I$(MLUCDIR)/include
46else
47INCLUDES += -I/prog/alice/level3/kip/MLUC/include
48endif
49
c1123a44 50SRCS = AliL3HoughTransformer.cxx AliL3HoughTrack.cxx \
51 AliL3HoughEval.cxx AliL3HoughMerger.cxx AliL3HoughBaseTransformer.cxx \
52 AliL3HoughIntMerger.cxx AliL3HoughGlobalMerger.cxx AliL3HoughTransformerVhdl.cxx \
53 AliL3Histogram.cxx AliL3Histogram1D.cxx AliL3HoughMaxFinder.cxx AliL3Hough.cxx
4de874d1 54
6fd65d1d 55DICT = AliL3HoughCint-$(USEPACKAGE).cxx
56DICTH = AliL3HoughCint-$(USEPACKAGE).h
57DICTO = $(OBJDIR)/AliL3HoughCint-$(USEPACKAGE).o
4de874d1 58
c1123a44 59ifeq ($(USEPACKAGE),ROOT)
60SRCS += AliL3HoughDisplay.cxx
c05bc6c5 61HDRS = $(SRCS:.cxx=.h) AliL3HoughLinkDef.h
c05bc6c5 62OBJS = $(patsubst %.cxx,$(OBJDIR)/%.o,$(SRCS)) $(DICTO)
c1123a44 63endif
64
65ifeq ($(USEPACKAGE),ALIROOT)
66SRCS += AliL3HoughDisplay.cxx
67HDRS = $(SRCS:.cxx=.h) AliL3HoughLinkDef.h
68OBJS = $(patsubst %.cxx,$(OBJDIR)/%.o,$(SRCS)) $(DICTO)
69endif
9f33a1db 70
6fd65d1d 71ifeq ($(OBJDIR),lib_alone)
72HDRS = $(SRCS:.cxx=.h)
73OBJS = $(patsubst %.cxx,$(OBJDIR)/%.o,$(SRCS))
74endif
75
76
e998e586 77LEVELSO = $(LIBDIR)/libAliL3Hough.so
4de874d1 78
cc4d912a 79all : $(OBJDIR) $(LIBDIR) $(LEVELSO)
4de874d1 80
c05bc6c5 81$(LEVELSO) : $(OBJS)
82 $(LD) $(SOFLAGS) $(LDFLAGS) $^ -o $@
4de874d1 83
c05bc6c5 84$(DICT) : $(HDRS)
85 @echo "Generating dictionary..."
b5a207b4 86 @rootcint -f $(DICT) -c $(INCLUDES) $(HDRS)
4de874d1 87
c05bc6c5 88$(OBJDIR)/%.o : %.cxx
e2e0cb81 89 $(CXX) $(CXXFLAGS) $(DEFSTR) -c $(INCLUDES) -o $@ $<
4de874d1 90
c05bc6c5 91$(OBJDIR) :
92 test ! -e $(OBJDIR) && mkdir -p $(OBJDIR)
c1123a44 93
cc4d912a 94$(LIBDIR) :
95 test ! -e $(LIBDIR) && mkdir -p $(LIBDIR)
4de874d1 96
c05bc6c5 97clean :
98 rm -f $(OBJDIR)/*.o
e998e586 99 rm -f $(LIBDIR)/libAliL3Hough.so
74eabe5f 100 rm -f $(DICT) $(DICTH)
e998e586 101
102so:
b46b53c1 103 rm -f $(LIBDIR)/libAliL3Hough.so