+# -*- Mode: Makefile -*-
#$Id$
-###########################
-# Makefile for HLT code. #
-# #
-# Author: Anders Vestbo #
-###########################
+################################
+# Makefile.conf for HLT code. #
+# #
+# Author: Anders Vestbo, #
+# Constantin Loizide #
+################################
-#Define whether you want to run with ALIROOT or only ROOT
-#Only one of them should be defined
-ifndef USEPACKAGE
-USEPACKAGE = ALIROOT
-#USEPACKAGE = ROOT
-#USEPACKAGE = STANDALONE
+#Added for MACOSX
+ARCH := $(shell root-config --arch)
+
+ifeq ($(ARCH),macosxxlc)
+ARCH := macosx
endif
#Specify the directory where the level3code tree is located.
-ifndef TOPDIR
-TOPDIR = $(HOME)/workcode/level3code
+ifndef ALIHLT_TOPDIR
+ALIHLT_TOPDIR = $(HOME)/workcode/level3code
endif
-#Define directory to contain additional L3 code, such as logging classes.
-ifndef LEVEL3
-LEVEL3 = /prog/alice/level3
+#Define directory to contain additional hlt code, such as logging classes.
+ifndef ALIHLT_BASEDIR
+ALIHLT_BASEDIR = /prog/alice/level3
endif
-ifndef LIBDIR
-LIBDIR = $(LEVEL3)/lib_$(USERNAME)
+
+#Define directory where libs will be stored
+ifndef ALIHLT_LIBDIR
+ALIHLT_LIBDIR = $(ALIHLT_BASEDIR)/lib_$(USER)
endif
-#Switch on/off HLT logging classes
-#NOLOGGING = 1
+#Define whether you want to run with ALIROOT or only ROOT
+#Only one of them should be defined
+ifndef ALIHLT_USEPACKAGE
+ALIHLT_USEPACKAGE = ALIROOT
+#ALIHLT_USEPACKAGE = ROOT
+#ALIHLT_USEPACKAGE = STANDALONE
+endif
-#Switch on/off saving MC data through the chain.
-#This will only have an effect if you are running with aliroot.
-#DO_MC = 1
+#Switch off special HLT logging classes
+ifeq ($(ALIHLT_NOLOGGING),true)
+NOLOGGING = 1
+endif
-#Switch of if you are not using patched AliTPC
+#Switch on saving MC data through the chain.
#This will only have an effect if you are running with aliroot.
-ASVVERSION = 1
+ifeq ($(ALIHLT_DOMC),true)
+DOMC = 1
+endif
-#If you are compiling on the alpha, use this flag:
-#EXTRACXXFLAGS += -mcpu=ev6
+#Switch on ALIROOT version detection by cvs command
+ifeq ($(ALIHLT_ALIDETECT),true)
+USECVS = 1
+endif
-CXX = g++
-LD = g++
-GCCVERSION = $(shell $(CXX) --version | head -n 1 | cut -d" " -f 3 | cut -d. -f 1)
+#switch on NEWIO if aliroot version needs it
+ifndef ALIHLT_USENEWIO
+ALIHLT_USENEWIO = false
+ifeq ($(ALICE_LEVEL),ali-head)
+ALIHLT_USENEWIO = true
+endif
+endif
+
+ifeq ($(ALIHLT_ROWHOUGH),true)
+USEROWHOUGH = 1
+endif
-CXXGCC3FLAGS = -DGCCVERSION=$(GCCVERSION)
-#CXXGCC3FLAGS += -pedantic
-#CXXGCC3FLAGS += -Wno-deprecated
+ifeq ($(ALIHLT_USENEWIO),true)
+USENEWIO = 1
+endif
+
+#----------------------------------------------------
+#Some compiler flags or defines: You can use your
+#own setting by defining them outside (make -e)
+#----------------------------------------------------
-CXXFLAGS = -O2 -Wall -fPIC -Woverloaded-virtual $(CXXGCC3FLAGS) $(EXTRACXXFLAGS)
+ifeq ($(ARCH),Darwin)
+FINKDIR = /sw
+CXX = g++
+CXXFLAGS = -O -pipe -Wall -fsigned-char $(CXXGCC3FLAGS) $(EXTRACXXFLAGS)
+CINTCXXFLAGS = -pipe -W -Wall -fsigned-char \
+ -DG__REGEXP -DG__UNIX -DG__SHAREDLIB \
+ -DG__ROOT -DG__REDIRECTIO -DG__OSFDLL
+LD = $(CXX)
+#SOFLAGS = -bundle -Xlinker -bind_at_load -undefined suppress
+SOFLAGS = -bundle -undefined suppress
+DYFLAGS = -dynamiclib -undefined suppress \
+ -compatibility_version 1 -current_version 1.0.0
+LDFLAGS = -O $(EXTRALDFLAGS) -L/sw/lib -ldl
+else
+CXX = g++
+CXXFLAGS = -O2 -fPIC -Wall $(CXXGCC3FLAGS) $(EXTRACXXFLAGS)
+LD = $(CXX)
LDFLAGS = -O2 $(EXTRALDFLAGS)
SOFLAGS = -shared
+endif
+
+#static flags for profiling
+PROFILEFLAGS = -g -pg
+LDSTATIC = ar
+STATICFLAGS = rucs