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