]> git.uio.no Git - u/mrichter/AliRoot.git/blame - build/Makefile.macosx64
AliDecayer realisation for the EvtGen code and EvtGen itself.
[u/mrichter/AliRoot.git] / build / Makefile.macosx64
CommitLineData
d95a3ef8 1# -*- mode: makefile -*-
f36e7e21 2# Makefile for AliRoot for MacOS X with gcc
ee0345bd 3
4XARGS = xargs
5
6# OS version
7MACOSX_MAJOR := $(strip $(shell sw_vers | sed -n 's/ProductVersion://p' | cut -d . -f 1))
8MACOSX_MINOR := $(strip $(shell sw_vers | sed -n 's/ProductVersion://p' | cut -d . -f 2))
9
10# fink directories
11FINK_ROOT := $(shell which fink | sed -e 's?/bin/fink??')
12ifeq (,$(FINK_ROOT))
13# No fink, build will probably fail, but we try a guess
14FINK_ROOT=/usr/local
15endif
16
ee0345bd 17# Global optimisation
18OPT = -O -g
19NOOPT = -O0 -g
20
21CXXOPT = $(OPT)
22CXXNOOPT = $(NOOPT)
23COPT = $(OPT)
9be1be4e 24FOPT = $(OPT) -fno-second-underscore
c9c74649 25ifneq (,$(findstring g95,$(F77)))
ee0345bd 26FOPT += -fbounds-check
27endif
28
29# CERNLIB defines
cb47c659 30CLIBDEFS = -DCERNLIB_LXIA64 -DCERNLIB_BLDLIB -DCERNLIB_CZ -DCERNLIB_PPC
ee0345bd 31CLIBCXXOPTS =
32CLIBCOPT =
33CLIBFOPT = $(CLIBDEFS)
9be1be4e 34CXXSTF = -pipe -Wall -W -pipe -fbounds-check -fsigned-char -fno-common -fmessage-length=0 -Woverloaded-virtual -Weffc++ -Wconversion -Wshadow -fno-default-inline -fno-inline -I/usr/X11R6/include -I$(FINK_ROOT)/include
ee0345bd 35
9be1be4e 36CXXSTF = -pipe -Wall -W -pipe -fbounds-check -fsigned-char -fno-common -fmessage-length=0 -Woverloaded-virtual -Weffc++ -Wshadow -fno-default-inline -fno-inline -I/usr/X11R6/include -I$(FINK_ROOT)/include
ee0345bd 37
38# Compiler flags
1bbe2977 39CXXFLAGS = $(CXXOPT) $(CXXSTF)
ee0345bd 40
ee0345bd 41CXXFLAGSNO = $(CXXNOOPT) $(CXXSTF)
42
9be1be4e 43CFLAGS = $(COPT) -Wall -W -fno-common -pipe -I$(FINK_ROOT)/include
ee0345bd 44
f36e7e21 45FFLAGS = $(CLIBFOPT) $(FOPT)
c9c74649 46ifneq (,$(findstring g95,$(F77)))
ee0345bd 47FFLAGS += -ftrace=full
7da87db6 48FFLAGS +=-DFORTRAN_G95
49else
50FFLAGS +=-DFORTRAN_GFORTRAN
ee0345bd 51endif
7da87db6 52
ee0345bd 53# rmkdepend flags for building dependencies of FORTRAN files
54DEPENDFFLAGS = $(FFLAGS)
55
56# rootcint flags
57CINTFLAGS =
58
59LD = export MACOSX_DEPLOYMENT_TARGET=$(MACOSX_MAJOR).$(MACOSX_MINOR) ; \
60 unset LD_PREBIND ; \
c9c74649 61 $(shell root-config --ld)
9be1be4e 62LDFLAGS = $(OPT) $(DICTLOAD)
ee0345bd 63
64SHLD := $(LD)
8e02d10e 65SOFLAGS := -m64 -dynamiclib -undefined dynamic_lookup -single_module
ee0345bd 66SHLIB :=
67SOEXT := so
68
ee0345bd 69ALLD = ar
70ALFLAGS = cr
71ALLIB =
72AEXT = a
73
74DEPENDCXXFLAGS = $(CXXFLAGS) -I/usr/include/sys
75
76SYSLIBS := -L/usr/X11R6/lib -lX11
77
78EXEFLAGS := -bind_at_load
79
80#System libraries
81
c9c74649 82ifneq (,$(findstring g95,$(F77)))
83SYSLIBS += -L$(shell $(F77) --print-search-dirs | sed -n -e 's/install: //p') -lf95
ee0345bd 84else
1bbe2977 85SYSLIBS += -ldl $(shell $(F77) -m64 -print-file-name=libgfortran.dylib)
86SYSLIBS += $(shell $(F77) -m64 -print-file-name=libgfortranbegin.a)
ee0345bd 87endif