- Streamline the different messages output by the code using the AliLog
[u/mrichter/AliRoot.git] / build / Makefile.macosx
CommitLineData
b934f194 1# Makefile for AliRoot for MacOS X with gcc
2
f3564e28 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??')
9
02a1d5c1 10# The compilers
11CXX = g++
02a1d5c1 12CC = gcc
13
f3564e28 14ifneq ($(MACOSX_MINOR),4)
15F77 = g77
16else
17ifeq (g95,$(findstring g95,$(ROOTBUILD)))
18F77 = g95
19else
20F77 = gfortran
21endif
22endif
23
02a1d5c1 24# Global optimisation
1bc3cc71 25OPT = -O0 -g
19ca05d1 26NOOPT = -g
02a1d5c1 27
19ca05d1 28CXXOPT = $(OPT)
29CXXNOOPT = $(NOOPT)
30COPT = $(OPT)
02a1d5c1 31FOPT = $(OPT) -fno-second-underscore
02a1d5c1 32
6c111d79 33
02a1d5c1 34# CERNLIB defines
02a1d5c1 35CLIBDEFS = -DCERNLIB_LINUX -DCERNLIB_BLDLIB -DCERNLIB_CZ
36CLIBCXXOPTS =
37CLIBCOPT =
19ca05d1 38CLIBFOPT = $(CLIBDEFS)
39
40# Compiler flags
6c111d79 41CXXFLAGS = $(CXXOPT) -Wall -W -Wno-long-double -pipe -fsigned-char -fno-common -fmessage-length=0 -I$(FINK_ROOT)/include
42ifneq ($(MACOSX_MINOR),4)
43CXXFLAGS+=-fweak-coalesced
44endif
45ifeq (g95,$(findstring g95,$(ROOTBUILD)))
46CXXFLAGS+=-DFORTRAN_G95
47endif
48CXXFLAGSNO = $(CXXNOOPT) -Wall -W -pipe -fsigned-char -fno-common -fmessage-length=0 -I$(FINK_ROOT)/include -Wno-long-double
49ifneq ($(MACOSX_MINOR),4)
50CXXFLAGSNO+=-fweak-coalesced
51endif
52CFLAGS = $(COPT) -Wall -W -fno-common -pipe -I$(FINK_ROOT)/include
53ifneq ($(MACOSX_MINOR),4)
54CFLAGS+=-fweak-coalesced
55endif
19ca05d1 56FFLAGS = $(CLIBFOPT) $(FOPT)
57# rmkdepend flags for building dependencies of FORTRAN files
58DEPENDFFLAGS = $(FFLAGS)
59
60# rootcint flags
61CINTFLAGS =
02a1d5c1 62
f3564e28 63LD = export MACOSX_DEPLOYMENT_TARGET=$(MACOSX_MAJOR).$(MACOSX_MINOR) ; \
02a1d5c1 64 unset LD_PREBIND ; \
65 g++
2bdfa405 66LDFLAGS = $(OPT) $(DICTLOAD)
02a1d5c1 67
68SHLD := $(LD)
2469b598 69SOFLAGS := -bundle -undefined dynamic_lookup
f3564e28 70SHLIB :=
02a1d5c1 71SOEXT := so
72
73DYLD := $(LD)
2469b598 74DYFLAGS = -dynamiclib -undefined dynamic_lookup -single_module
f3564e28 75DYLIB :=
02a1d5c1 76DYEXT := dylib
77
78ALLD = ar
79ALFLAGS = cr
80ALLIB =
81AEXT = a
82
02a1d5c1 83DEPENDCXXFLAGS = $(CXXFLAGS) -I/usr/include/sys
84
85GLIBS = -L/usr/X11R6/lib -lX11
86
f3564e28 87EXEFLAGS += -bind_at_load
88
02a1d5c1 89#System libraries
f3564e28 90ifneq ($(MACOSX_MINOR),4)
91SYSLIBS := -lg2c
92else
93ifeq (g95,$(findstring g95,$(ROOTBUILD)))
94SYSLIBS := -L$(dir $(shell find $(FINK_ROOT) -name libf95.a)) -lf95
95else
96SYSLIBS := -ldl -L$(dir $(shell find $(FINK_ROOT) -name libgfortran.dylib)) -lgfortranbegin -lgfortran
97endif
98endif
02a1d5c1 99
02a1d5c1 100