]> git.uio.no Git - u/mrichter/AliRoot.git/blame_incremental - build/Makefile.macosx64
Cosmetic updates
[u/mrichter/AliRoot.git] / build / Makefile.macosx64
... / ...
CommitLineData
1# -*- mode: makefile -*-
2# Makefile for AliRoot for MacOS X with gcc
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
17# Global optimisation
18OPT = -O -g
19NOOPT = -O0 -g
20
21CXXOPT = $(OPT)
22CXXNOOPT = $(NOOPT)
23COPT = $(OPT)
24FOPT = $(OPT) -fno-second-underscore
25ifneq (,$(findstring g95,$(F77)))
26FOPT += -fbounds-check
27endif
28
29# CERNLIB defines
30CLIBDEFS = -DCERNLIB_LXIA64 -DCERNLIB_BLDLIB -DCERNLIB_CZ -DCERNLIB_PPC
31CLIBCXXOPTS =
32CLIBCOPT =
33CLIBFOPT = $(CLIBDEFS)
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
35
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
37
38# Compiler flags
39CXXFLAGS = $(CXXOPT) $(CXXSTF)
40
41CXXFLAGSNO = $(CXXNOOPT) $(CXXSTF)
42
43CFLAGS = $(COPT) -Wall -W -fno-common -pipe -I$(FINK_ROOT)/include
44
45FFLAGS = $(CLIBFOPT) $(FOPT)
46ifneq (,$(findstring g95,$(F77)))
47FFLAGS += -ftrace=full
48FFLAGS +=-DFORTRAN_G95
49else
50FFLAGS +=-DFORTRAN_GFORTRAN
51endif
52
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 ; \
61 $(shell root-config --ld)
62LDFLAGS = $(OPT) $(DICTLOAD)
63
64SHLD := $(LD)
65SOFLAGS := -m64 -dynamiclib -undefined dynamic_lookup -single_module
66SHLIB :=
67SOEXT := so
68
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
82ifneq (,$(findstring g95,$(F77)))
83SYSLIBS += -L$(shell $(F77) --print-search-dirs | sed -n -e 's/install: //p') -lf95
84else
85SYSLIBS += -ldl $(shell $(F77) -m64 -print-file-name=libgfortran.dylib)
86SYSLIBS += $(shell $(F77) -m64 -print-file-name=libgfortranbegin.a)
87endif