Created
February 12, 2015 20:49
-
-
Save refi64/549151151b4a440c48b2 to your computer and use it in GitHub Desktop.
AsmJit build system with Boost.Build
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import option ; | |
import package ; | |
import regex ; | |
local embed = [ option.get embed : 0 ] ; | |
local xprops = ; | |
if embed in 1 true yes { | |
xprops = "<link>static" ; | |
} | |
project asmjit | |
: requirements <include>src $(xprops) | |
<toolset>msvc:<linkflags>"/OPT:REF /OPT:ICF" | |
<toolset>msvc:<cflags>"/GF" | |
<toolset>msvc:<variant>debug:<cflags>"/GS" | |
<toolset>msvc:<variant>release:<cflags>"/Oi /Oy /GS-" | |
<toolset>msvc:<rtti>:off | |
<toolset>gcc:<exception-handling>off | |
<toolset>gcc:<variant>debug:<optimization>off | |
<toolset>gcc:<inlining>full | |
<toolset>gcc:<cflags>"-fomit-frame-pointer -fmerge-all-constants -fno-keep-static-consts" | |
<toolset>gcc:<exception-handling>off | |
<toolset>clang:<variant>debug:<optimization>off | |
<toolset>clang:<cflags>"-fcolor-diagnostics -fomit-frame-pointer -fmerge-all-constants" | |
<variant>debug:<define>ASMJIT_DEBUG | |
<variant>release:<define>ASMJIT_RELEASE | |
<link>static:<define>ASMJIT_STATIC | |
<threading>multi | |
: usage-requirements <include>src | |
; | |
local dirs = asmjit asmjit/base asmjit/x86 ; | |
local srcs = ; | |
local headers = ; | |
for local d in $(dirs) { | |
srcs += [ glob src/$(d)/*.cpp ] ; | |
headers += [ glob src/$(d)/*.h ] ; | |
} | |
if ! ( embed in 1 true yes ) { | |
lib asmjit : $(srcs) ; | |
exe asmjit_test : $(srcs) [ glob src/asmjit/test/*.cpp ] ; | |
local apps = asmjit_bench_x86 asmjit_test_opcode asmjit_test_x86 ; | |
for local app in $(apps) { | |
exe $(app) : src/app/test/$(app).cpp asmjit ; | |
} | |
install bin : asmjit asmjit_test $(apps) ; | |
package.install install : <install-source-root>src : : asmjit : $(headers) ; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment