-
Notifications
You must be signed in to change notification settings - Fork 7
/
config.macosx-clang.mk
59 lines (52 loc) · 2.48 KB
/
config.macosx-clang.mk
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
# ******************************************************************************
# config.macosx-clang.mk make-it-quick project
# ******************************************************************************
#
# File description:
#
# This is the shared makefile configuration when building with Clang on OSX
#
#
#
#
#
#
# ******************************************************************************
# This software is licensed under the GNU General Public License v3
# (C) 2017-2019, Christophe de Dinechin <christophe@dinechin.org>
# ******************************************************************************
# This file is part of make-it-quick
#
# make-it-quick is free software: you can r redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# make-it-quick is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with make-it-quick, in a file named COPYING.
# If not, see <https://www.gnu.org/licenses/>.
# ******************************************************************************
#------------------------------------------------------------------------------
# Configuration definitions
#------------------------------------------------------------------------------
DEFINES_BUILDENV_macosx-clang=CONFIG_MACOSX
OS_NAME_BUILDENV_macosx-clang=macosx
include $(MIQ)config.gnu.mk
EXT.dll= .dylib
TEST_ENV= DYLD_LIBRARY_PATH=$(OUTPUT)
# For macOS, the convention is to put the version number before extension,
# e.g. where Linux would have libfoo.so.1.3.2, macOS has libfoo.1.3.2.dylib
MIQ_DLLBASE= $(@F:%.install.dll=%)
MIQ_DLLNAME= $(MIQ_DLLBASE:%$(EXT.dll)=%$(PRODUCTS_VERSION:%=.$(MIQ_V_VERSION))$(EXT.dll))
MIQ_SONAME= $(MIQ_SOBASE:%$(EXT.dll)=%)$(MIQ_V_MAJOR:%=.%)$(EXT.dll)
MIQ_SONAME_OPT= $(PRODUCTS_VERSION:%=-Wl,-install_name -Wl,@rpath/$(MIQ_SONAME))
# On MacOSX, we will use basic frameworks e.g. for string and filesystem functions
LDFLAGS_BUILDENV_macosx-clang= -framework CoreFoundation \
-framework CoreServices
# Special case x11 package, missing on macOS, and unusual location - A bit yucky
export PKG_CONFIG_PATH:=$(PKG_CONFIG_PATH):$(abspath $(MIQ))