Dont complain about include
[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
33# CERNLIB defines
02a1d5c1 34CLIBDEFS = -DCERNLIB_LINUX -DCERNLIB_BLDLIB -DCERNLIB_CZ
35CLIBCXXOPTS =
36CLIBCOPT =
19ca05d1 37CLIBFOPT = $(CLIBDEFS)
38
39# Compiler flags
f3564e28 40CXXFLAGS = $(CXXOPT) -Wall -W -pipe -fsigned-char -fno-common -fweak-coalesced -fmessage-length=0 -I$(FINK_ROOT)/include -Wno-long-double #-Weffc++ -Woverloaded-virtual
41CXXFLAGSNO = $(CXXNOOPT) -Wall -W -pipe -fsigned-char -fno-common -fweak-coalesced -fmessage-length=0 -I$(FINK_ROOT)/include -Wno-long-double
42CFLAGS = $(COPT) -Wall -W -fno-common -fweak-coalesced -pipe -I$(FINK_ROOT)/include
19ca05d1 43FFLAGS = $(CLIBFOPT) $(FOPT)
44# rmkdepend flags for building dependencies of FORTRAN files
45DEPENDFFLAGS = $(FFLAGS)
46
47# rootcint flags
48CINTFLAGS =
02a1d5c1 49
f3564e28 50LD = export MACOSX_DEPLOYMENT_TARGET=$(MACOSX_MAJOR).$(MACOSX_MINOR) ; \
02a1d5c1 51 unset LD_PREBIND ; \
52 g++
2bdfa405 53LDFLAGS = $(OPT) $(DICTLOAD)
02a1d5c1 54
55SHLD := $(LD)
2469b598 56SOFLAGS := -bundle -undefined dynamic_lookup
f3564e28 57SHLIB :=
02a1d5c1 58SOEXT := so
59
60DYLD := $(LD)
2469b598 61DYFLAGS = -dynamiclib -undefined dynamic_lookup -single_module
f3564e28 62DYLIB :=
02a1d5c1 63DYEXT := dylib
64
65ALLD = ar
66ALFLAGS = cr
67ALLIB =
68AEXT = a
69
02a1d5c1 70DEPENDCXXFLAGS = $(CXXFLAGS) -I/usr/include/sys
71
72GLIBS = -L/usr/X11R6/lib -lX11
73
f3564e28 74EXEFLAGS += -bind_at_load
75
02a1d5c1 76#System libraries
f3564e28 77ifneq ($(MACOSX_MINOR),4)
78SYSLIBS := -lg2c
79else
80ifeq (g95,$(findstring g95,$(ROOTBUILD)))
81SYSLIBS := -L$(dir $(shell find $(FINK_ROOT) -name libf95.a)) -lf95
82else
83SYSLIBS := -ldl -L$(dir $(shell find $(FINK_ROOT) -name libgfortran.dylib)) -lgfortranbegin -lgfortran
84endif
85endif
02a1d5c1 86
02a1d5c1 87