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