depends: add shared dependency builder
See the README's in depends for documentation
This commit is contained in:
8
depends/hosts/darwin.mk
Normal file
8
depends/hosts/darwin.mk
Normal file
@@ -0,0 +1,8 @@
|
||||
OSX_MIN_VERSION=10.6
|
||||
OSX_SDK_VERSION=10.7
|
||||
OSX_SDK=$(SDK_PATH)/MacOSX$(OSX_SDK_VERSION).sdk
|
||||
darwin_CC=clang -target $(host) -mmacosx-version-min=$(OSX_MIN_VERSION) --sysroot $(OSX_SDK)
|
||||
darwin_CXX=clang++ -target $(host) -mmacosx-version-min=$(OSX_MIN_VERSION) --sysroot $(OSX_SDK)
|
||||
darwin_CFLAGS=-pipe -O2
|
||||
darwin_CXXFLAGS=$(darwin_CFLAGS)
|
||||
darwin_native_toolchain=native_cctools
|
||||
23
depends/hosts/default.mk
Normal file
23
depends/hosts/default.mk
Normal file
@@ -0,0 +1,23 @@
|
||||
default_host_CC = $(host_toolchain)gcc
|
||||
default_host_CXX = $(host_toolchain)g++
|
||||
default_host_AR = $(host_toolchain)ar
|
||||
default_host_RANLIB = $(host_toolchain)ranlib
|
||||
default_host_STRIP = $(host_toolchain)strip
|
||||
default_host_LIBTOOL = $(host_toolchain)libtool
|
||||
default_host_INSTALL_NAME_TOOL = $(host_toolchain)install_name_tool
|
||||
default_host_OTOOL = $(host_toolchain)otool
|
||||
default_host_NM = $(host_toolchain)nm
|
||||
|
||||
define add_host_tool_func
|
||||
$(host_os)_$1?=$$(default_host_$1)
|
||||
$(host_arch)_$(host_os)_$1?=$$($(host_os)_$1)
|
||||
host_$1=$$($(host_arch)_$(host_os)_$1)
|
||||
endef
|
||||
|
||||
define add_host_flags_func
|
||||
$(host_arch)_$(host_os)_$1 += $($(host_os)_$1)
|
||||
host_$1 = $$($(host_arch)_$(host_os)_$1)
|
||||
endef
|
||||
|
||||
$(foreach tool,CC CXX AR RANLIB STRIP NM LIBTOOL OTOOL INSTALL_NAME_TOOL,$(eval $(call add_host_tool_func,$(tool))))
|
||||
$(foreach flags,CFLAGS CXXFLAGS LDFLAGS, $(eval $(call add_host_flags_func,$(flags))))
|
||||
23
depends/hosts/linux.mk
Normal file
23
depends/hosts/linux.mk
Normal file
@@ -0,0 +1,23 @@
|
||||
linux_CFLAGS=-pipe -O2
|
||||
linux_CXXFLAGS=$(linux_CFLAGS)
|
||||
|
||||
ifeq (86,$(findstring 86,$(build_arch)))
|
||||
i686_linux_CC=gcc -m32
|
||||
i686_linux_CXX=g++ -m32
|
||||
i686_linux_AR=ar
|
||||
i686_linux_RANLIB=ranlib
|
||||
i686_linux_NM=nm
|
||||
i686_linux_STRIP=strip
|
||||
|
||||
x86_64_linux_CC=gcc -m64
|
||||
x86_64_linux_CXX=g++ -m64
|
||||
x86_64_linux_AR=ar
|
||||
x86_64_linux_RANLIB=ranlib
|
||||
x86_64_linux_NM=nm
|
||||
x86_64_linux_STRIP=strip
|
||||
else
|
||||
i686_linux_CC=$(default_host_CC) -m32
|
||||
i686_linux_CXX=$(default_host_CXX) -m32
|
||||
x86_64_linux_CC=$(default_host_CC) -m64
|
||||
x86_64_linux_CXX=$(default_host_CXX) -m64
|
||||
endif
|
||||
2
depends/hosts/mingw32.mk
Normal file
2
depends/hosts/mingw32.mk
Normal file
@@ -0,0 +1,2 @@
|
||||
mingw32_CFLAGS=-pipe -O2
|
||||
mingw32_CXXFLAGS=$(mingw32_CFLAGS)
|
||||
Reference in New Issue
Block a user