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