]> git.uio.no Git - u/mrichter/AliRoot.git/blob - build/Makefile.macosx
warning removal
[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 CXXSTF        =  -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
36
37 # Compiler flags
38 CXXFLAGS      = $(CXXOPT) $(CXXSTF)
39
40 CXXFLAGSNO    = $(CXXNOOPT) $(CXXSTF) 
41
42 CFLAGS        = $(COPT) -Wall -W -fno-common -pipe -I$(FINK_ROOT)/include
43
44 FFLAGS        = $(CLIBFOPT) $(FOPT)
45 ifneq (,$(findstring g95,$(F77)))
46 FFLAGS        += -ftrace=full
47 FFLAGS        +=-DFORTRAN_G95
48 else
49 FFLAGS        +=-DFORTRAN_GFORTRAN
50 endif
51
52 # rmkdepend flags for building dependencies of FORTRAN files
53 DEPENDFFLAGS  = $(FFLAGS)
54
55 # rootcint flags
56 CINTFLAGS     = 
57
58 LD            = export MACOSX_DEPLOYMENT_TARGET=$(MACOSX_MAJOR).$(MACOSX_MINOR) ; \
59                 unset LD_PREBIND ; \
60                 $(shell root-config --ld)
61 LDFLAGS       = $(OPT) $(DICTLOAD)
62
63 SHLD         := $(LD)
64 SOFLAGS      := -dynamiclib -undefined dynamic_lookup -single_module
65 SHLIB        := 
66 SOEXT        := so
67
68 ALLD          = ar
69 ALFLAGS       = cr
70 ALLIB         = 
71 AEXT          = a
72
73 DEPENDCXXFLAGS = $(CXXFLAGS) -I/usr/include/sys
74
75 SYSLIBS      := -L/usr/X11R6/lib -lX11
76
77 EXEFLAGS     := -bind_at_load 
78
79 #System libraries
80
81 ifneq (,$(findstring g95,$(F77)))
82 SYSLIBS += -L$(shell $(F77) --print-search-dirs | sed -n -e 's/install: //p') -lf95
83 DYLIB += -L$(shell $(F77) --print-search-dirs | sed -n -e 's/install: //p') -lf95
84 else
85 SYSLIBS += -ldl $(shell $(F77) -print-file-name=libgfortran.dylib)
86 SYSLIBS += $(shell $(F77) -print-file-name=libgfortranbegin.a)
87 endif