]> git.uio.no Git - u/mrichter/AliRoot.git/blame - build/Makefile.macosx64
Adding the description of real data (Marian)
[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
17# The compilers
c9c74649 18CXX = $(shell root-config --cxx)
19CC = $(shell root-config --cc)
d95a3ef8 20F77 = $(shell root-config --f77)
ee0345bd 21
22# Global optimisation
23OPT = -O -g
24NOOPT = -O0 -g
25
26CXXOPT = $(OPT)
27CXXNOOPT = $(NOOPT)
28COPT = $(OPT)
f36e7e21 29FOPT = $(OPT) -fno-second-underscore -m64
c9c74649 30ifneq (,$(findstring g95,$(F77)))
ee0345bd 31FOPT += -fbounds-check
32endif
33
34# CERNLIB defines
cb47c659 35CLIBDEFS = -DCERNLIB_LXIA64 -DCERNLIB_BLDLIB -DCERNLIB_CZ -DCERNLIB_PPC
ee0345bd 36CLIBCXXOPTS =
37CLIBCOPT =
38CLIBFOPT = $(CLIBDEFS)
110b30cc 39CXXSTF = -m64 -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 40
110b30cc 41CXXSTF = -m64 -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 42
43# Compiler flags
1bbe2977 44CXXFLAGS = $(CXXOPT) $(CXXSTF)
ee0345bd 45
ee0345bd 46CXXFLAGSNO = $(CXXNOOPT) $(CXXSTF)
47
48CFLAGS = $(COPT) -m64 -Wall -W -fno-common -pipe -I$(FINK_ROOT)/include
49
f36e7e21 50FFLAGS = $(CLIBFOPT) $(FOPT)
c9c74649 51ifneq (,$(findstring g95,$(F77)))
ee0345bd 52FFLAGS += -ftrace=full
7da87db6 53FFLAGS +=-DFORTRAN_G95
54else
55FFLAGS +=-DFORTRAN_GFORTRAN
ee0345bd 56endif
7da87db6 57
ee0345bd 58# rmkdepend flags for building dependencies of FORTRAN files
59DEPENDFFLAGS = $(FFLAGS)
60
61# rootcint flags
62CINTFLAGS =
63
64LD = export MACOSX_DEPLOYMENT_TARGET=$(MACOSX_MAJOR).$(MACOSX_MINOR) ; \
65 unset LD_PREBIND ; \
c9c74649 66 $(shell root-config --ld)
f36e7e21 67LDFLAGS = $(OPT) -m64 $(DICTLOAD)
ee0345bd 68
69SHLD := $(LD)
70SOFLAGS := -m64 -bundle -undefined dynamic_lookup
71SHLIB :=
72SOEXT := so
73
74DYLD := $(LD)
75DYFLAGS = -m64 -dynamiclib -undefined dynamic_lookup -single_module
76DYLIB :=
77DYEXT := dylib
78
79ALLD = ar
80ALFLAGS = cr
81ALLIB =
82AEXT = a
83
84DEPENDCXXFLAGS = $(CXXFLAGS) -I/usr/include/sys
85
86SYSLIBS := -L/usr/X11R6/lib -lX11
87
88EXEFLAGS := -bind_at_load
89
90#System libraries
91
c9c74649 92ifneq (,$(findstring g95,$(F77)))
93SYSLIBS += -L$(shell $(F77) --print-search-dirs | sed -n -e 's/install: //p') -lf95
ee0345bd 94else
1bbe2977 95SYSLIBS += -ldl $(shell $(F77) -m64 -print-file-name=libgfortran.dylib)
96SYSLIBS += $(shell $(F77) -m64 -print-file-name=libgfortranbegin.a)
ee0345bd 97endif