mirror of
https://git.wownero.com/wownero/wownero.git
synced 2024-08-15 01:03:23 +00:00
Make Mac SDK into a regular depends package
This commit is contained in:
parent
e81ab9bc2c
commit
7ea1e214c5
11 changed files with 17 additions and 54 deletions
|
@ -2,7 +2,6 @@
|
|||
|
||||
SOURCES_PATH ?= $(BASEDIR)/sources
|
||||
BASE_CACHE ?= $(BASEDIR)/built
|
||||
SDK_PATH ?= $(BASEDIR)/SDKs
|
||||
FALLBACK_DOWNLOAD_PATH ?= https://downloads.getmonero.org/depends-sources
|
||||
|
||||
BUILD = $(shell ./config.guess)
|
||||
|
@ -185,7 +184,6 @@ $(host_prefix)/share/toolchain.cmake : toolchain.cmake.in $(host_prefix)/.stamp_
|
|||
-e 's|@build_tests@|$(build_tests)|' \
|
||||
-e 's|@depends@|$(host_cmake)|' \
|
||||
-e 's|@prefix@|$($(host_arch)_$(host_os)_prefix)|'\
|
||||
-e 's|@sdk@|$(SDK_PATH)|'\
|
||||
-e 's|@arch@|$(host_arch)|'\
|
||||
$< > $@
|
||||
$(AT)touch $@
|
||||
|
|
|
@ -30,7 +30,7 @@ Common `host-platform-triplets` for cross compilation are:
|
|||
|
||||
- `i686-w64-mingw32` for Win32
|
||||
- `x86_64-w64-mingw32` for Win64
|
||||
- `x86_64-apple-darwin11` for MacOSX
|
||||
- `x86_64-apple-darwin11` for MacOSX x86_64
|
||||
- `arm-linux-gnueabihf` for Linux ARM 32 bit
|
||||
- `aarch64-linux-gnu` for Linux ARM 64 bit
|
||||
- `riscv64-linux-gnu` for Linux RISCV 64 bit
|
||||
|
@ -43,7 +43,6 @@ The following can be set when running make: make FOO=bar
|
|||
```
|
||||
SOURCES_PATH: downloaded sources will be placed here
|
||||
BASE_CACHE: built packages will be placed here
|
||||
SDK_PATH: Path where sdk's can be found (used by OSX)
|
||||
FALLBACK_DOWNLOAD_PATH: If a source file can't be fetched, try here before giving up
|
||||
DEBUG: disable some optimizations and enable more runtime checking
|
||||
HOST_ID_SALT: Optional salt to use when generating host package ids
|
||||
|
@ -59,14 +58,6 @@ download-win: run 'make download-win' to fetch all sources needed for win builds
|
|||
download-linux: run 'make download-linux' to fetch all sources needed for linux builds
|
||||
```
|
||||
|
||||
#Darwin (macos) builds:
|
||||
|
||||
To build with the x86_64-apple-darwin11 you require the mac os developer tools in MacOSX11.1.sdk.
|
||||
Download it from apple, or search for it on github. Create a new directoty called SDKs in this
|
||||
directory and place the entire MacOSX11.1.sdk folder in it. The depends build will then pick it up automatically
|
||||
(without requiring SDK_PATH).
|
||||
|
||||
|
||||
#Mingw builds
|
||||
|
||||
Building for 32/64bit mingw requires switching alternatives to a posix mode
|
||||
|
|
|
@ -1,14 +1,12 @@
|
|||
OSX_MIN_VERSION=10.8
|
||||
OSX_SDK_VERSION=11.1
|
||||
OSX_SDK=$(SDK_PATH)/MacOSX$(OSX_SDK_VERSION).sdk
|
||||
LD64_VERSION=609
|
||||
ifeq (aarch64, $(host_arch))
|
||||
CC_target=arm64-apple-darwin11
|
||||
else
|
||||
CC_target=$(host)
|
||||
endif
|
||||
darwin_CC=clang -target $(CC_target) -mmacosx-version-min=$(OSX_MIN_VERSION) --sysroot $(OSX_SDK) -mlinker-version=$(LD64_VERSION) -B$(host_prefix)/native/bin/$(host)-
|
||||
darwin_CXX=clang++ -target $(CC_target) -mmacosx-version-min=$(OSX_MIN_VERSION) --sysroot $(OSX_SDK) -mlinker-version=$(LD64_VERSION) -stdlib=libc++ -B$(host_prefix)/native/bin/$(host)-
|
||||
darwin_CC=clang -target $(CC_target) -mmacosx-version-min=$(OSX_MIN_VERSION) --sysroot $(host_prefix)/native/SDK/ -mlinker-version=$(LD64_VERSION) -B$(host_prefix)/native/bin/$(host)-
|
||||
darwin_CXX=clang++ -target $(CC_target) -mmacosx-version-min=$(OSX_MIN_VERSION) --sysroot $(host_prefix)/native/SDK/ -mlinker-version=$(LD64_VERSION) -stdlib=libc++ -B$(host_prefix)/native/bin/$(host)-
|
||||
|
||||
darwin_CFLAGS=-pipe
|
||||
darwin_CXXFLAGS=$(darwin_CFLAGS)
|
||||
|
@ -20,4 +18,4 @@ darwin_release_CXXFLAGS=$(darwin_release_CFLAGS)
|
|||
darwin_debug_CFLAGS=-O1
|
||||
darwin_debug_CXXFLAGS=$(darwin_debug_CFLAGS)
|
||||
|
||||
darwin_native_toolchain=native_cctools
|
||||
darwin_native_toolchain=native_cctools darwin_sdk
|
||||
|
|
10
contrib/depends/packages/darwin_sdk.mk
Normal file
10
contrib/depends/packages/darwin_sdk.mk
Normal file
|
@ -0,0 +1,10 @@
|
|||
package=darwin_sdk
|
||||
$(package)_version=11.1
|
||||
$(package)_download_path=https://github.com/phracker/MacOSX-SDKs/releases/download/11.3/
|
||||
$(package)_file_name=MacOSX$($(package)_version).sdk.tar.xz
|
||||
$(package)_sha256_hash=68797baaacb52f56f713400de306a58a7ca00b05c3dc6d58f0a8283bcac721f8
|
||||
|
||||
define $(package)_stage_cmds
|
||||
mkdir -p $($(package)_staging_dir)/$(host_prefix)/native/SDK &&\
|
||||
mv * $($(package)_staging_dir)/$(host_prefix)/native/SDK
|
||||
endef
|
|
@ -34,6 +34,6 @@ mingw32_packages = icu4c sodium $(hardware_packages)
|
|||
mingw32_native_packages = $(hardware_native_packages)
|
||||
|
||||
ifneq ($(build_os),darwin)
|
||||
darwin_native_packages += native_clang native_cctools native_libtapi
|
||||
darwin_native_packages += darwin_sdk native_clang native_cctools native_libtapi
|
||||
endif
|
||||
|
||||
|
|
|
@ -95,7 +95,7 @@ if(CMAKE_SYSTEM_NAME STREQUAL "Darwin")
|
|||
SET(BUILD_64 ON)
|
||||
SET(BREW OFF)
|
||||
SET(PORT OFF)
|
||||
SET(CMAKE_OSX_SYSROOT "@sdk@/MacOSX11.1.sdk/")
|
||||
SET(CMAKE_OSX_SYSROOT "@prefix@/native/SDK/")
|
||||
SET(CMAKE_OSX_DEPLOYMENT_TARGET "10.08")
|
||||
SET(CMAKE_CXX_STANDARD 14)
|
||||
SET(LLVM_ENABLE_PIC OFF)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue