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