8
0
mirror of https://github.com/FirebirdSQL/firebird.git synced 2025-01-23 10:03:03 +01:00
firebird-mirror/builds/posix/prefix.darwin_x86_64
Adriano dos Santos Fernandes 9ed0e28b09 Add Travis MacOS build, GitHub Actions MacOS/Windows build and adjust MacOS build to be (almost) relocatable.
While MacOS people seems to be ok with fixed locations for applications and libraries, this complicates a lot the (post)
build process, needing to change each id and rpaths in a very error prone process.

Relocatable binaries makes this a lot easier, but unfortunately "restricted" (chmod +s, like firebird executable)
programs cannot use @loader_path or @executable_path in its rpath.

So the solution has to make internal libraries relocatable and make rpath of firebird fixed. Also, as the ecosystem
seems to use fixed path, the id of fbclient.dylib has set to its fixed path.

Also MacOS post build makefile has adjusted to allow creation of packages for the debug build.

The MacOS build could still be improved with some scripts to build ICU (instead of done directly in the CI scripts,
but I leave that for now) and copies its files to our lib path. However situation seems to be better than before in
relation to ICU and TomMath.

Note: Linux build is not working in GitHub Actions. It segfaults when running (exiting) utilities.
I had this problem lot's of time in the past, maybe it's not completely fixed in v3.
2019-11-26 13:11:55 -03:00

54 lines
1.9 KiB
Plaintext

# The contents of this file are subject to the Interbase Public
# License Version 1.0 (the "License"); you may not use this file
# except in compliance with the License. You may obtain a copy
# of the License at http://www.Inprise.com/IPL.html
#
# Software distributed under the License is distributed on an
# "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express
# or implied. See the License for the specific language governing
# rights and limitations under the License.
#
# The Original Code was created by Inprise Corporation
# and its predecessors. Portions created by Inprise Corporation are
#
# Copyright (C) 2000 Inprise Corporation
# All Rights Reserved.
# Contributor(s): ______________________________________.
# Start of file prefix.darwin: $(VERSION) @PLATFORM@
# 2 Oct 2002, Nickolay Samofatov - Major Cleanup
#
# Default build from 10.9 using Clang
#
# Build instructions
# set CFLAGS='-I ICUDIR/icu/source/common' (ucnv.h)
# set LDFLAGS='-L ICUDIR/icu/source/lib' (-licuuc)
# set CXXFLAGS='-I -I ICUDIR/icu/source/common -I ICUDIR/icu/source/i18n'
# where ICUDIR is where you installed ICU
# configure using --with-builtin-tommath
# or add the relevant -I, -L for an installed version of libtommath
DYLD_LIBRARY_PATH=$(HOME)/icu54/icu/source/lib
export DYLD_LIBRARY_PATH
#DYLD_PRINT_ENV=1
#export DYLD_PRINT_ENV
#DYLD_PRINT_LIBRARIES=1
#export DYLD_PRINT_LIBRARIES
MACOSX_DEPLOYMENT_TARGET=10.9
export MACOSX_DEPLOYMENT_TARGET
PROD_FLAGS=-DDARWIN -pipe -O2 -MMD -fPIC -fno-common -mmacosx-version-min=10.9
DEV_FLAGS=-ggdb -DDARWIN -pipe -MMD -fPIC -fno-omit-frame-pointer -fno-common -Wall -fno-optimize-sibling-calls -mmacosx-version-min=10.9 -Wno-non-virtual-dtor
CXXFLAGS:=$(CXXFLAGS) -fvisibility-inlines-hidden -fvisibility=hidden -stdlib=libc++ -msse4
EXE_LINK_OPTIONS:=
UNDEF_PLATFORM=
LINK_LIBS+=-liconv
#MATHLIB=$(ROOT)/extern/libtommath/.libs/libtommath.a
SO_LINK_LIBS+=-liconv
include $(ROOT)/gen/darwin.defaults