]> git.uio.no Git - u/mrichter/AliRoot.git/blame - build/Makefile.macosx64
1 object for all runs
[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)
34
d76d4136 35CXXWARN = -Wall -Wno-long-long -W -Weffc++ -Wshadow -Woverloaded-virtual -ansi
36
37CXXSTF = -pipe -fbounds-check -fsigned-char -fno-common -fmessage-length=0 -fno-default-inline -fno-inline -I/usr/X11R6/include -I$(FINK_ROOT)/include
ee0345bd 38
39# Compiler flags
1bbe2977 40CXXFLAGS = $(CXXOPT) $(CXXSTF)
ee0345bd 41
ee0345bd 42CXXFLAGSNO = $(CXXNOOPT) $(CXXSTF)
43
9be1be4e 44CFLAGS = $(COPT) -Wall -W -fno-common -pipe -I$(FINK_ROOT)/include
ee0345bd 45
f36e7e21 46FFLAGS = $(CLIBFOPT) $(FOPT)
c9c74649 47ifneq (,$(findstring g95,$(F77)))
ee0345bd 48FFLAGS += -ftrace=full
7da87db6 49FFLAGS +=-DFORTRAN_G95
50else
51FFLAGS +=-DFORTRAN_GFORTRAN
ee0345bd 52endif
7da87db6 53
ee0345bd 54# rmkdepend flags for building dependencies of FORTRAN files
55DEPENDFFLAGS = $(FFLAGS)
56
57# rootcint flags
58CINTFLAGS =
59
60LD = export MACOSX_DEPLOYMENT_TARGET=$(MACOSX_MAJOR).$(MACOSX_MINOR) ; \
61 unset LD_PREBIND ; \
c9c74649 62 $(shell root-config --ld)
9be1be4e 63LDFLAGS = $(OPT) $(DICTLOAD)
ee0345bd 64
65SHLD := $(LD)
8e02d10e 66SOFLAGS := -m64 -dynamiclib -undefined dynamic_lookup -single_module
ee0345bd 67SHLIB :=
68SOEXT := so
69
ee0345bd 70ALLD = ar
71ALFLAGS = cr
72ALLIB =
73AEXT = a
74
75DEPENDCXXFLAGS = $(CXXFLAGS) -I/usr/include/sys
76
77SYSLIBS := -L/usr/X11R6/lib -lX11
78
79EXEFLAGS := -bind_at_load
80
81#System libraries
82
c9c74649 83ifneq (,$(findstring g95,$(F77)))
84SYSLIBS += -L$(shell $(F77) --print-search-dirs | sed -n -e 's/install: //p') -lf95
ee0345bd 85else
1bbe2977 86SYSLIBS += -ldl $(shell $(F77) -m64 -print-file-name=libgfortran.dylib)
87SYSLIBS += $(shell $(F77) -m64 -print-file-name=libgfortranbegin.a)
ee0345bd 88endif