# Boost.Context Library Build Jamfile # Copyright Oliver Kowalke 2009. # Distributed under the Boost Software License, Version 1.0. # (See accompanying file LICENSE_1_0.txt or copy at # http://www.boost.org/LICENSE_1_0.txt) import common ; import feature ; import indirect ; import modules ; import os ; import toolset ; import architecture ; project boost/context : requirements SOLARIS:_XOPEN_SOURCE=600 shared:BOOST_CONTEXT_DYN_LINK=1 BOOST_CONTEXT_SOURCE : usage-requirements shared:BOOST_CONTEXT_DYN_LINK=1 : source-location ../src ; local rule default_binary_format ( ) { local tmp = elf ; if [ os.name ] = "MACOSX" { tmp = mach-o ; } if [ os.name ] = "NT" { tmp = pe ; } if [ os.name ] = "AIX" { tmp = xcoff ; } return $(tmp) ; } feature.feature binary-format : elf mach-o pe xcoff : propagated ; feature.set-default binary-format : [ default_binary_format ] ; local rule default_abi ( ) { local tmp = sysv ; if [ os.name ] = "NT" { tmp = ms ; } else if [ os.platform ] = "ARM" { tmp = aapcs ; } else if [ os.platform ] = "MIPS" { tmp = o32 ; } return $(tmp) ; } feature.feature abi : aapcs eabi ms n32 n64 o32 o64 sysv x32 : propagated ; feature.set-default abi : [ default_abi ] ; actions gas { cpp -x assembler-with-cpp "$(>)" | as -am -o "$(<)" } actions armasm { armasm "$(>)" "$(<)" } actions masm { ml /c /Fo"$(<)" "$(>)" } actions masm64 { ml64 /c /Fo"$(<)" "$(>)" } rule configure ( properties * ) { local result ; # if ( ! ( gcc in $(properties) # || intel in $(properties) # || msvc in $(properties) ) ) # { # result = no ; # ECHO "toolset not supported" ; # } return $(result) ; } # ARM alias asm_context_sources : [ make asm/make_arm_aapcs_elf_gas.o : asm/make_arm_aapcs_elf_gas.S : @gas ] [ make asm/jump_arm_aapcs_elf_gas.o : asm/jump_arm_aapcs_elf_gas.S : @gas ] : arm elf ; alias asm_context_sources : [ make asm/make_arm_aapcs_macho_gas.o : asm/make_arm_aapcs_macho_gas.S : @gas ] [ make asm/jump_arm_aapcs_macho_gas.o : asm/jump_arm_aapcs_macho_gas.S : @gas ] : arm mach-o ; alias asm_context_sources : [ make asm/make_arm_aapcs_pe_armasm.o : asm/make_arm_aapcs_pe_armasm.asm : @armasm ] [ make asm/jump_arm_aapcs_pe_armasm.o : asm/jump_arm_aapcs_pe_armasm.asm : @armasm ] untested.cpp : arm pe ; # MIPS alias asm_context_sources : [ make asm/make_mips32_o32_elf_gas.o : asm/make_mips32_o32_elf_gas.S : @gas ] [ make asm/jump_mips32_o32_elf_gas.o : asm/jump_mips32_o32_elf_gas.S : @gas ] : mips1 elf ; # POWERPC_32 alias asm_context_sources : [ make asm/make_ppc32_sysv_elf_gas.o : asm/make_ppc32_sysv_elf_gas.S : @gas ] [ make asm/jump_ppc32_sysv_elf_gas.o : asm/jump_ppc32_sysv_elf_gas.S : @gas ] : 32 power elf ; alias asm_context_sources : [ make asm/make_ppc32_sysv_macho_gas.o : asm/make_ppc32_sysv_macho_gas.S : @gas ] [ make asm/jump_ppc32_sysv_macho_gas.o : asm/jump_ppc32_sysv_macho_gas.S : @gas ] : 32 power mach-o ; alias asm_context_sources : [ make asm/make_ppc32_sysv_xcoff_gas.o : asm/make_ppc32_sysv_xcoff_gas.S : @gas ] [ make asm/jump_ppc32_sysv_xcoff_gas.o : asm/jump_ppc32_sysv_xcoff_gas.S : @gas ] untested.cpp : 32 power xcoff ; # POWERPC_64 alias asm_context_sources : [ make asm/make_ppc64_sysv_elf_gas.o : asm/make_ppc64_sysv_elf_gas.S : @gas ] [ make asm/jump_ppc64_sysv_elf_gas.o : asm/jump_ppc64_sysv_elf_gas.S : @gas ] : 64 power elf ; alias asm_context_sources : [ make asm/make_ppc64_sysv_macho_gas.o : asm/make_ppc64_sysv_macho_gas.S : @gas ] [ make asm/jump_ppc64_sysv_macho_gas.o : asm/jump_ppc64_sysv_macho_gas.S : @gas ] untested.cpp : 64 power mach-o ; alias asm_context_sources : [ make asm/make_ppc64_sysv_xcoff_gas.o : asm/make_ppc64_sysv_xcoff_gas.S : @gas ] [ make asm/jump_ppc64_sysv_xcoff_gas.o : asm/jump_ppc64_sysv_xcoff_gas.S : @gas ] untested.cpp : 64 power xcoff ; # POWERPC universal alias asm_context_sources : [ make asm/make_ppc32_ppc64_sysv_macho_gas.o : asm/make_ppc32_ppc64_sysv_macho_gas.S : @gas ] [ make asm/jump_ppc32_ppc64_sysv_macho_gas.o : asm/jump_ppc32_ppc64_sysv_macho_gas.S : @gas ] untested.cpp : 32_64 power mach-o ; # SPARC alias asm_context_sources : [ make asm/make_sparc_sysv_elf_gas.o : asm/make_sparc_sysv_elf_gas.S : @gas ] [ make asm/jump_sparc_sysv_elf_gas.o : asm/jump_sparc_sysv_elf_gas.S : @gas ] unsupported.cpp : 32 sparc elf ; # SPARC_64 alias asm_context_sources : [ make asm/make_sparc64_sysv_elf_gas.o : asm/make_sparc64_sysv_elf_gas.S : @gas ] [ make asm/jump_sparc64_sysv_elf_gas.o : asm/jump_sparc64_sysv_elf_gas.S : @gas ] unsupported.cpp : 64 sparc elf ; # X86 alias asm_context_sources : [ make asm/make_i386_sysv_elf_gas.o : asm/make_i386_sysv_elf_gas.S : @gas ] [ make asm/jump_i386_sysv_elf_gas.o : asm/jump_i386_sysv_elf_gas.S : @gas ] : 32 x86 elf ; alias asm_context_sources : [ make asm/make_i386_sysv_macho_gas.o : asm/make_i386_sysv_macho_gas.S : @gas ] [ make asm/jump_i386_sysv_macho_gas.o : asm/jump_i386_sysv_macho_gas.S : @gas ] : 32 x86 mach-o ; alias asm_context_sources : [ make asm/make_i386_ms_pe_masm.o : asm/make_i386_ms_pe_masm.asm : @masm ] [ make asm/jump_i386_ms_pe_masm.o : asm/jump_i386_ms_pe_masm.asm : @masm ] dummy.cpp : 32 x86 pe ; # X86_64 alias asm_context_sources : [ make asm/make_x86_64_sysv_elf_gas.o : asm/make_x86_64_sysv_elf_gas.S : @gas ] [ make asm/jump_x86_64_sysv_elf_gas.o : asm/jump_x86_64_sysv_elf_gas.S : @gas ] : 64 x86 elf ; alias asm_context_sources : [ make asm/make_x86_64_x32_elf_gas.o : asm/make_x86_64_x32_elf_gas.S : @gas ] [ make asm/jump_x86_64_x32_elf_gas.o : asm/jump_x86_64_x32_elf_gas.S : @gas ] untested.cpp : 32 x86 elf x32 ; alias asm_context_sources : [ make asm/make_x86_64_sysv_macho_gas.o : asm/make_x86_64_sysv_macho_gas.S : @gas ] [ make asm/jump_x86_64_sysv_macho_gas.o : asm/jump_x86_64_sysv_macho_gas.S : @gas ] : 64 x86 mach-o ; alias asm_context_sources : [ make asm/make_x86_64_ms_pe_masm.o : asm/make_x86_64_ms_pe_masm.asm : @masm64 ] [ make asm/jump_x86_64_ms_pe_masm.o : asm/jump_x86_64_ms_pe_masm.asm : @masm64 ] dummy.cpp : 64 x86 pe ; #X86 universal alias asm_context_sources : [ make asm/make_i386_x86_64_sysv_macho_gas.o : asm/make_i386_x86_64_sysv_macho_gas.S : @gas ] [ make asm/jump_i386_x86_64_sysv_macho_gas.o : asm/jump_i386_x86_64_sysv_macho_gas.S : @gas ] untested.cpp : 32_64 x86 mach-o ; # COMBINED alias asm_context_sources : [ make asm/make_combined_sysv_macho_gas.o : asm/make_combined_sysv_macho_gas.S : @gas ] [ make asm/jump_combined_sysv_macho_gas.o : asm/jump_combined_sysv_macho_gas.S : @gas ] untested.cpp : combined mach-o ; alias asm_context_sources : unsupported.cpp ; explicit asm_context_sources ; alias select_asm_context_sources : asm_context_sources : [ architecture.architecture ] [ architecture.address-model ] ; lib boost_context : select_asm_context_sources ; boost-install boost_context ;