rbdc 0.8.0
Sign up to get free protection for your applications and to get access to all the features.
- data/bindings/ruby/rbdc/extconf.rb +57 -0
- data/bindings/ruby/rbdc/rbdc.c +304 -0
- data/dyncall/AUTHORS +4 -0
- data/dyncall/BUGS +3 -0
- data/dyncall/CMakeLists.txt +79 -0
- data/dyncall/ChangeLog +165 -0
- data/dyncall/LICENSE +15 -0
- data/dyncall/Makefile.M +15 -0
- data/dyncall/Makefile.embedded +71 -0
- data/dyncall/Makefile.generic +36 -0
- data/dyncall/Nmakefile +45 -0
- data/dyncall/README +92 -0
- data/dyncall/ToDo +114 -0
- data/dyncall/autovar/LICENSE.txt +15 -0
- data/dyncall/autovar/README.txt +69 -0
- data/dyncall/autovar/autovar_ABI.h +44 -0
- data/dyncall/autovar/autovar_ARCH.h +56 -0
- data/dyncall/autovar/autovar_CC.h +46 -0
- data/dyncall/autovar/autovar_OS.h +78 -0
- data/dyncall/autovar/autovar_OSFAMILY.h +39 -0
- data/dyncall/buildsys/cmake/Modules/FindDynCall.cmake +43 -0
- data/dyncall/buildsys/cmake/Modules/FindDynCallback.cmake +43 -0
- data/dyncall/buildsys/cmake/Modules/FindDynLoad.cmake +45 -0
- data/dyncall/buildsys/cmake/Modules/UseLATEX.cmake +811 -0
- data/dyncall/buildsys/dynmake/Makefile.base.M +82 -0
- data/dyncall/buildsys/dynmake/dynmake.bat +2 -0
- data/dyncall/buildsys/dynmake/dynmake.sh +4 -0
- data/dyncall/buildsys/lua/Makefile +10 -0
- data/dyncall/buildsys/lua/README.txt +4 -0
- data/dyncall/buildsys/lua/bootstrap.sh +34 -0
- data/dyncall/buildsys/lua/cleanup.sh +6 -0
- data/dyncall/buildsys/lua/mkfile +34 -0
- data/dyncall/buildsys/lua/setenv.sh +4 -0
- data/dyncall/buildsys/mk/app.mk +30 -0
- data/dyncall/buildsys/mk/dirs.mk +27 -0
- data/dyncall/buildsys/mk/epilog.mk +30 -0
- data/dyncall/buildsys/mk/lib.mk +23 -0
- data/dyncall/buildsys/mk/pcc.mk +60 -0
- data/dyncall/buildsys/mk/prolog.mk +35 -0
- data/dyncall/buildsys/nmake/common.nmake +61 -0
- data/dyncall/buildsys/nmake/epilog.nmake +28 -0
- data/dyncall/buildsys/nmake/prolog.nmake +76 -0
- data/dyncall/buildsys/nmake/tool_gcc.nmake +82 -0
- data/dyncall/buildsys/nmake/tool_msvc.nmake +67 -0
- data/dyncall/buildsys/scripts/batch-build-linux.sh +11 -0
- data/dyncall/buildsys/scripts/batch-build-minix.sh +11 -0
- data/dyncall/buildsys/scripts/batch-build-psp.sh +11 -0
- data/dyncall/buildsys/scripts/conf-nds.bat +41 -0
- data/dyncall/buildsys/scripts/setenv-cross-ios.sh +8 -0
- data/dyncall/buildsys/scripts/setenv-sdk-ios.sh +22 -0
- data/dyncall/buildsys/vs2005/dyncall/dyncall.vcproj +245 -0
- data/dyncall/buildsys/vs2005/test_plain/test_plain.vcproj +202 -0
- data/dyncall/buildsys/vs2005/vs2005.sln +29 -0
- data/dyncall/configure +152 -0
- data/dyncall/configure.bat +157 -0
- data/dyncall/configure.rc +234 -0
- data/dyncall/dynMakefile +4 -0
- data/dyncall/dyncall/CMakeLists.txt +53 -0
- data/dyncall/dyncall/DynCallConfig.cmake +3 -0
- data/dyncall/dyncall/Makefile.M +10 -0
- data/dyncall/dyncall/Makefile.embedded +20 -0
- data/dyncall/dyncall/Makefile.generic +16 -0
- data/dyncall/dyncall/Nmakefile +62 -0
- data/dyncall/dyncall/README-Developer.txt +45 -0
- data/dyncall/dyncall/README.txt +65 -0
- data/dyncall/dyncall/TODO +9 -0
- data/dyncall/dyncall/dynMakefile +4 -0
- data/dyncall/dyncall/dyncall.3 +189 -0
- data/dyncall/dyncall/dyncall.h +135 -0
- data/dyncall/dyncall/dyncall_alloc.h +40 -0
- data/dyncall/dyncall/dyncall_api.c +167 -0
- data/dyncall/dyncall/dyncall_call.S +72 -0
- data/dyncall/dyncall/dyncall_call_arm32_arm.S +80 -0
- data/dyncall/dyncall/dyncall_call_arm32_arm.h +61 -0
- data/dyncall/dyncall/dyncall_call_arm32_arm_armhf.S +96 -0
- data/dyncall/dyncall/dyncall_call_arm32_arm_armhf.h +44 -0
- data/dyncall/dyncall/dyncall_call_arm32_thumb.h +65 -0
- data/dyncall/dyncall/dyncall_call_arm32_thumb_apple.s +80 -0
- data/dyncall/dyncall/dyncall_call_arm32_thumb_armhf.S +121 -0
- data/dyncall/dyncall/dyncall_call_arm32_thumb_gas.s +101 -0
- data/dyncall/dyncall/dyncall_call_mips.h +50 -0
- data/dyncall/dyncall/dyncall_call_mips_eabi.h +61 -0
- data/dyncall/dyncall/dyncall_call_mips_eabi_gas.s +115 -0
- data/dyncall/dyncall/dyncall_call_mips_gas.S +36 -0
- data/dyncall/dyncall/dyncall_call_mips_n32.h +67 -0
- data/dyncall/dyncall/dyncall_call_mips_n32_gas.s +192 -0
- data/dyncall/dyncall/dyncall_call_mips_n64.h +67 -0
- data/dyncall/dyncall/dyncall_call_mips_n64_gas.s +192 -0
- data/dyncall/dyncall/dyncall_call_mips_o32.h +70 -0
- data/dyncall/dyncall/dyncall_call_mips_o32_gas.s +109 -0
- data/dyncall/dyncall/dyncall_call_ppc32.S +266 -0
- data/dyncall/dyncall/dyncall_call_ppc32.h +62 -0
- data/dyncall/dyncall/dyncall_call_sparc.S +192 -0
- data/dyncall/dyncall/dyncall_call_sparc.h +42 -0
- data/dyncall/dyncall/dyncall_call_sparc64.S +361 -0
- data/dyncall/dyncall/dyncall_call_sparc64.h +42 -0
- data/dyncall/dyncall/dyncall_call_sparc_v9.S +220 -0
- data/dyncall/dyncall/dyncall_call_sparc_v9.h +42 -0
- data/dyncall/dyncall/dyncall_call_x64-att.S +146 -0
- data/dyncall/dyncall/dyncall_call_x64.S +149 -0
- data/dyncall/dyncall/dyncall_call_x64.h +63 -0
- data/dyncall/dyncall/dyncall_call_x64_generic_masm.asm +70 -0
- data/dyncall/dyncall/dyncall_call_x86.S +238 -0
- data/dyncall/dyncall/dyncall_call_x86.h +70 -0
- data/dyncall/dyncall/dyncall_call_x86_8a.s +127 -0
- data/dyncall/dyncall/dyncall_call_x86_generic_masm.asm +136 -0
- data/dyncall/dyncall/dyncall_call_x86_nasm.asm +234 -0
- data/dyncall/dyncall/dyncall_callf.c +112 -0
- data/dyncall/dyncall/dyncall_callf.h +52 -0
- data/dyncall/dyncall/dyncall_callvm.c +68 -0
- data/dyncall/dyncall/dyncall_callvm.h +88 -0
- data/dyncall/dyncall/dyncall_callvm_arm32_arm.c +250 -0
- data/dyncall/dyncall/dyncall_callvm_arm32_arm.h +59 -0
- data/dyncall/dyncall/dyncall_callvm_arm32_arm_armhf.c +204 -0
- data/dyncall/dyncall/dyncall_callvm_arm32_arm_armhf.h +63 -0
- data/dyncall/dyncall/dyncall_callvm_arm32_thumb.c +271 -0
- data/dyncall/dyncall/dyncall_callvm_arm32_thumb.h +59 -0
- data/dyncall/dyncall/dyncall_callvm_base.c +33 -0
- data/dyncall/dyncall/dyncall_callvm_mips.c +40 -0
- data/dyncall/dyncall/dyncall_callvm_mips.h +37 -0
- data/dyncall/dyncall/dyncall_callvm_mips_eabi.c +181 -0
- data/dyncall/dyncall/dyncall_callvm_mips_eabi.h +61 -0
- data/dyncall/dyncall/dyncall_callvm_mips_n32.c +268 -0
- data/dyncall/dyncall/dyncall_callvm_mips_n64.c +268 -0
- data/dyncall/dyncall/dyncall_callvm_mips_n64.h +53 -0
- data/dyncall/dyncall/dyncall_callvm_mips_o32.c +235 -0
- data/dyncall/dyncall/dyncall_callvm_mips_o32.h +45 -0
- data/dyncall/dyncall/dyncall_callvm_ppc32.c +372 -0
- data/dyncall/dyncall/dyncall_callvm_ppc32.h +61 -0
- data/dyncall/dyncall/dyncall_callvm_sparc.c +155 -0
- data/dyncall/dyncall/dyncall_callvm_sparc.h +44 -0
- data/dyncall/dyncall/dyncall_callvm_sparc64.c +239 -0
- data/dyncall/dyncall/dyncall_callvm_sparc64.h +47 -0
- data/dyncall/dyncall/dyncall_callvm_sparc_v9.c +182 -0
- data/dyncall/dyncall/dyncall_callvm_sparc_v9.h +45 -0
- data/dyncall/dyncall/dyncall_callvm_x64.c +228 -0
- data/dyncall/dyncall/dyncall_callvm_x64.h +111 -0
- data/dyncall/dyncall/dyncall_callvm_x86.c +667 -0
- data/dyncall/dyncall/dyncall_callvm_x86.h +75 -0
- data/dyncall/dyncall/dyncall_config.h +46 -0
- data/dyncall/dyncall/dyncall_macros.h +248 -0
- data/dyncall/dyncall/dyncall_signature.h +71 -0
- data/dyncall/dyncall/dyncall_struct.c +255 -0
- data/dyncall/dyncall/dyncall_struct.h +69 -0
- data/dyncall/dyncall/dyncall_types.h +74 -0
- data/dyncall/dyncall/dyncall_utils.h +38 -0
- data/dyncall/dyncall/dyncall_value.h +73 -0
- data/dyncall/dyncall/dyncall_vector.c +52 -0
- data/dyncall/dyncall/dyncall_vector.h +56 -0
- data/dyncall/dyncall/gen-masm.sh +7 -0
- data/dyncall/dyncall/mkfile +29 -0
- data/dyncall/dyncallback/CMakeLists.txt +55 -0
- data/dyncall/dyncallback/DynCallbackConfig.cmake +2 -0
- data/dyncall/dyncallback/Makefile.M +10 -0
- data/dyncall/dyncallback/Makefile.embedded +15 -0
- data/dyncall/dyncallback/Makefile.generic +20 -0
- data/dyncall/dyncallback/Nmakefile +71 -0
- data/dyncall/dyncallback/README.txt +9 -0
- data/dyncall/dyncallback/TODO +4 -0
- data/dyncall/dyncallback/dynMakefile +4 -0
- data/dyncall/dyncallback/dyncall_alloc_wx.c +35 -0
- data/dyncall/dyncallback/dyncall_alloc_wx.h +46 -0
- data/dyncall/dyncallback/dyncall_alloc_wx_malloc.c +40 -0
- data/dyncall/dyncallback/dyncall_alloc_wx_mmap.c +42 -0
- data/dyncall/dyncallback/dyncall_alloc_wx_win32.c +42 -0
- data/dyncall/dyncallback/dyncall_args.c +45 -0
- data/dyncall/dyncallback/dyncall_args.h +65 -0
- data/dyncall/dyncallback/dyncall_args_arm32_arm.c +112 -0
- data/dyncall/dyncallback/dyncall_args_arm32_arm.h +40 -0
- data/dyncall/dyncallback/dyncall_args_arm32_thumb.c +29 -0
- data/dyncall/dyncallback/dyncall_args_arm32_thumb.h +32 -0
- data/dyncall/dyncallback/dyncall_args_mips.c +81 -0
- data/dyncall/dyncallback/dyncall_args_mips.h +41 -0
- data/dyncall/dyncallback/dyncall_args_ppc32.c +88 -0
- data/dyncall/dyncallback/dyncall_args_ppc32.h +41 -0
- data/dyncall/dyncallback/dyncall_args_sparc32.c +41 -0
- data/dyncall/dyncallback/dyncall_args_sparc32.h +37 -0
- data/dyncall/dyncallback/dyncall_args_sparc64.c +41 -0
- data/dyncall/dyncallback/dyncall_args_sparc64.h +37 -0
- data/dyncall/dyncallback/dyncall_args_x64.c +73 -0
- data/dyncall/dyncallback/dyncall_args_x64.h +44 -0
- data/dyncall/dyncallback/dyncall_args_x86.c +121 -0
- data/dyncall/dyncallback/dyncall_args_x86.h +58 -0
- data/dyncall/dyncallback/dyncall_callback.c +45 -0
- data/dyncall/dyncallback/dyncall_callback.h +51 -0
- data/dyncall/dyncallback/dyncall_callback_arch.S +71 -0
- data/dyncall/dyncallback/dyncall_callback_arm32_arm.c +63 -0
- data/dyncall/dyncallback/dyncall_callback_arm32_arm.h +45 -0
- data/dyncall/dyncallback/dyncall_callback_arm32_arm_apple.s +73 -0
- data/dyncall/dyncallback/dyncall_callback_arm32_arm_gas.s +73 -0
- data/dyncall/dyncallback/dyncall_callback_arm32_thumb.c +29 -0
- data/dyncall/dyncallback/dyncall_callback_arm32_thumb.h +33 -0
- data/dyncall/dyncallback/dyncall_callback_arm32_thumb_apple.s +32 -0
- data/dyncall/dyncallback/dyncall_callback_arm32_thumb_gas.s +32 -0
- data/dyncall/dyncallback/dyncall_callback_mips.c +61 -0
- data/dyncall/dyncallback/dyncall_callback_mips.h +42 -0
- data/dyncall/dyncallback/dyncall_callback_ppc32.S +33 -0
- data/dyncall/dyncallback/dyncall_callback_ppc32.c +60 -0
- data/dyncall/dyncallback/dyncall_callback_ppc32.h +43 -0
- data/dyncall/dyncallback/dyncall_callback_ppc32_apple.s +180 -0
- data/dyncall/dyncallback/dyncall_callback_sparc32.c +57 -0
- data/dyncall/dyncallback/dyncall_callback_sparc32.h +43 -0
- data/dyncall/dyncallback/dyncall_callback_sparc32.s +30 -0
- data/dyncall/dyncallback/dyncall_callback_sparc64.c +57 -0
- data/dyncall/dyncallback/dyncall_callback_sparc64.s +30 -0
- data/dyncall/dyncallback/dyncall_callback_x64.S +187 -0
- data/dyncall/dyncallback/dyncall_callback_x64.c +69 -0
- data/dyncall/dyncallback/dyncall_callback_x64.h +44 -0
- data/dyncall/dyncallback/dyncall_callback_x64_apple.s +122 -0
- data/dyncall/dyncallback/dyncall_callback_x64_gas.s +119 -0
- data/dyncall/dyncallback/dyncall_callback_x64_gas_w64.s +102 -0
- data/dyncall/dyncallback/dyncall_callback_x64_masm.asm +89 -0
- data/dyncall/dyncallback/dyncall_callback_x86.S +115 -0
- data/dyncall/dyncallback/dyncall_callback_x86.c +281 -0
- data/dyncall/dyncallback/dyncall_callback_x86.h +49 -0
- data/dyncall/dyncallback/dyncall_callback_x86_8a.s +100 -0
- data/dyncall/dyncallback/dyncall_callback_x86_masm.asm +74 -0
- data/dyncall/dyncallback/dyncall_thunk.c +47 -0
- data/dyncall/dyncallback/dyncall_thunk.h +84 -0
- data/dyncall/dyncallback/dyncall_thunk_arm32_arm.c +45 -0
- data/dyncall/dyncallback/dyncall_thunk_arm32_arm.h +40 -0
- data/dyncall/dyncallback/dyncall_thunk_arm32_thumb.c +29 -0
- data/dyncall/dyncallback/dyncall_thunk_arm32_thumb.h +35 -0
- data/dyncall/dyncallback/dyncall_thunk_mips.c +52 -0
- data/dyncall/dyncallback/dyncall_thunk_mips.h +37 -0
- data/dyncall/dyncallback/dyncall_thunk_ppc32.c +51 -0
- data/dyncall/dyncallback/dyncall_thunk_ppc32.h +40 -0
- data/dyncall/dyncallback/dyncall_thunk_sparc32.c +32 -0
- data/dyncall/dyncallback/dyncall_thunk_sparc32.h +36 -0
- data/dyncall/dyncallback/dyncall_thunk_sparc64.c +32 -0
- data/dyncall/dyncallback/dyncall_thunk_sparc64.h +36 -0
- data/dyncall/dyncallback/dyncall_thunk_x64.c +48 -0
- data/dyncall/dyncallback/dyncall_thunk_x64.h +39 -0
- data/dyncall/dyncallback/dyncall_thunk_x86.c +44 -0
- data/dyncall/dyncallback/dyncall_thunk_x86.h +39 -0
- data/dyncall/dyncallback/dyncallback.3 +134 -0
- data/dyncall/dyncallback/gen-masm.sh +8 -0
- data/dyncall/dyncallback/mkfile +29 -0
- data/dyncall/dynload/CMakeLists.txt +25 -0
- data/dyncall/dynload/DynLoadConfig.cmake +3 -0
- data/dyncall/dynload/Makefile.M +10 -0
- data/dyncall/dynload/Makefile.embedded +22 -0
- data/dyncall/dynload/Makefile.generic +18 -0
- data/dyncall/dynload/Nmakefile +57 -0
- data/dyncall/dynload/README.txt +113 -0
- data/dyncall/dynload/TODO +20 -0
- data/dyncall/dynload/dynMakefile +4 -0
- data/dyncall/dynload/dynload.3 +64 -0
- data/dyncall/dynload/dynload.c +38 -0
- data/dyncall/dynload/dynload.h +65 -0
- data/dyncall/dynload/dynload_alloc.h +40 -0
- data/dyncall/dynload/dynload_darwin.c +89 -0
- data/dyncall/dynload/dynload_syms.c +38 -0
- data/dyncall/dynload/dynload_syms_elf.c +214 -0
- data/dyncall/dynload/dynload_syms_mach-o.c +167 -0
- data/dyncall/dynload/dynload_syms_pe.c +109 -0
- data/dyncall/dynload/dynload_unix.c +57 -0
- data/dyncall/dynload/dynload_windows.c +59 -0
- data/dyncall/mkfile +36 -0
- data/dyncall/portasm/README.txt +42 -0
- data/dyncall/portasm/gen-masm.sh +3 -0
- data/dyncall/portasm/portasm-arm.S +36 -0
- data/dyncall/portasm/portasm-ppc.S +98 -0
- data/dyncall/portasm/portasm-x64-att.S +155 -0
- data/dyncall/portasm/portasm-x86.S +127 -0
- metadata +311 -0
@@ -0,0 +1,234 @@
|
|
1
|
+
#!/bin/rc
|
2
|
+
#//////////////////////////////////////////////////////////////////////////////
|
3
|
+
#
|
4
|
+
# Copyright (c) 2007-2010 Daniel Adler <dadler@uni-goettingen.de>,
|
5
|
+
# Tassilo Philipp <tphilipp@potion-studios.com>
|
6
|
+
#
|
7
|
+
# Permission to use, copy, modify, and distribute this software for any
|
8
|
+
# purpose with or without fee is hereby granted, provided that the above
|
9
|
+
# copyright notice and this permission notice appear in all copies.
|
10
|
+
#
|
11
|
+
# THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
|
12
|
+
# WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
13
|
+
# MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
|
14
|
+
# ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
15
|
+
# WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
16
|
+
# ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
|
17
|
+
# OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
18
|
+
#
|
19
|
+
#//////////////////////////////////////////////////////////////////////////////
|
20
|
+
|
21
|
+
# --- configure settings ------------------------------------------------------
|
22
|
+
|
23
|
+
PACKAGE=dyncall
|
24
|
+
CONFIG_PREFIX=/usr/local #@@@
|
25
|
+
|
26
|
+
# --- output error message ----------------------------------------------------
|
27
|
+
fn error {
|
28
|
+
echo error: $*
|
29
|
+
exit 1
|
30
|
+
}
|
31
|
+
|
32
|
+
# --- output warning message --------------------------------------------------
|
33
|
+
|
34
|
+
fn warning {
|
35
|
+
echo warning: $*
|
36
|
+
}
|
37
|
+
|
38
|
+
# --- output info message -----------------------------------------------------
|
39
|
+
|
40
|
+
fn info {
|
41
|
+
echo $*
|
42
|
+
}
|
43
|
+
|
44
|
+
# --- print usage -------------------------------------------------------------
|
45
|
+
|
46
|
+
fn usage {
|
47
|
+
echo $PACKAGE' configuration shell-script'
|
48
|
+
echo 'Usage:'
|
49
|
+
echo ' configure [ options ]'
|
50
|
+
echo
|
51
|
+
echo 'Options:'
|
52
|
+
echo ' --help'
|
53
|
+
echo ' -h print this page'
|
54
|
+
#echo
|
55
|
+
#echo ' --target-x86 build for x86 architecture platform'
|
56
|
+
#echo ' --target-x64 build for x64 architecture platform'
|
57
|
+
#echo ' --target-ppc32 build for ppc32 architecture platform'
|
58
|
+
#echo ' --target-arm-arm build for ARM architecture platform (ARM mode)'
|
59
|
+
#echo ' --target-arm-thumb build for ARM architecture platform (THUMB mode)'
|
60
|
+
#echo
|
61
|
+
#echo ' --tool-pcc use Portable C Compiler'
|
62
|
+
#echo
|
63
|
+
#echo ' --asm-xa use Plan9 Assemblers (0a, 1a, 2a, etc.)'
|
64
|
+
#echo
|
65
|
+
#echo ' --config-release build release version (default)'
|
66
|
+
#echo ' --config-debug build debug version'
|
67
|
+
echo
|
68
|
+
exit 0
|
69
|
+
}
|
70
|
+
|
71
|
+
# --- guess operating system -------------------------------------------------
|
72
|
+
|
73
|
+
CONFIG_OS=()
|
74
|
+
fn guess_os {
|
75
|
+
CONFIG_OS='plan9'
|
76
|
+
info 'guess os '$CONFIG_OS
|
77
|
+
}
|
78
|
+
|
79
|
+
# --- guess architecture -----------------------------------------------------
|
80
|
+
|
81
|
+
CONFIG_ARCH=()
|
82
|
+
fn guess_arch {
|
83
|
+
CONFIG_ARCH='x86'
|
84
|
+
switch($cputype) {
|
85
|
+
case 386
|
86
|
+
CONFIG_ARCH='x86'
|
87
|
+
case amd64
|
88
|
+
CONFIG_ARCH='x64'
|
89
|
+
case arm
|
90
|
+
CONFIG_ARCH='arm32_arm'
|
91
|
+
case power
|
92
|
+
CONFIG_ARCH='ppc32'
|
93
|
+
case mips
|
94
|
+
CONFIG_ARCH='mips32'
|
95
|
+
case *
|
96
|
+
warning 'unknown architecture '$cputype' - using default (x86)'
|
97
|
+
}
|
98
|
+
info 'guess arch '$CONFIG_ARCH
|
99
|
+
}
|
100
|
+
|
101
|
+
# --- guess tool chain -------------------------------------------------------
|
102
|
+
|
103
|
+
CONFIG_TOOL=()
|
104
|
+
fn guess_tool {
|
105
|
+
#CONFIG_TOOL=`{grep CC /$objtype/mkfile | sed s/CC.//}
|
106
|
+
CONFIG_TOOL='pcc'
|
107
|
+
info 'guess tool '$CONFIG_TOOL
|
108
|
+
}
|
109
|
+
|
110
|
+
# --- guess assembler --------------------------------------------------------
|
111
|
+
|
112
|
+
CONFIG_ASM=()
|
113
|
+
fn guess_asm {
|
114
|
+
CONFIG_ASM=`{grep AS /$objtype/mkfile | sed s/AS.//}
|
115
|
+
info 'guess assembler '$CONFIG_ASM
|
116
|
+
}
|
117
|
+
|
118
|
+
# --- process arguments ------------------------------------------------------
|
119
|
+
|
120
|
+
fn args {
|
121
|
+
while(! ~ $#* 0 && ~ $1 -*) {
|
122
|
+
OPT=$1
|
123
|
+
shift
|
124
|
+
|
125
|
+
switch($OPT) {
|
126
|
+
case --help -h
|
127
|
+
usage
|
128
|
+
#case --target-x86
|
129
|
+
#CONFIG_ARCH='x86'
|
130
|
+
#case --target-x64
|
131
|
+
#CONFIG_ARCH='x64'
|
132
|
+
#case --target-ppc32
|
133
|
+
#CONFIG_ARCH='ppc32'
|
134
|
+
#case --target-arm-arm
|
135
|
+
#CONFIG_ARCH='arm32_arm'
|
136
|
+
#case --target-arm-thumb
|
137
|
+
#CONFIG_ARCH='arm32_thumb'
|
138
|
+
#case --tool-pcc
|
139
|
+
#CONFIG_TOOL=pcc
|
140
|
+
#CONFIG_ASM=2a
|
141
|
+
#case --tool-xa
|
142
|
+
#CONFIG_ASM=2a
|
143
|
+
#case --config-release
|
144
|
+
#CONFIG_CONFIG=release
|
145
|
+
#case --config-debug
|
146
|
+
#CONFIG_CONFIG=debug
|
147
|
+
case *
|
148
|
+
warning 'unknown option '$OPT
|
149
|
+
}
|
150
|
+
}
|
151
|
+
}
|
152
|
+
|
153
|
+
# --- guess variables --------------------------------------------------------
|
154
|
+
|
155
|
+
fn guess {
|
156
|
+
if(~ $#CONFIG_OS 0) {
|
157
|
+
guess_os
|
158
|
+
if(~ $#CONFIG_OS 0) {
|
159
|
+
error 'unsupported operating system '$OS
|
160
|
+
}
|
161
|
+
}
|
162
|
+
|
163
|
+
if(~ $#CONFIG_ARCH 0) {
|
164
|
+
guess_arch
|
165
|
+
if(~ $#CONFIG_ARCH 0) {
|
166
|
+
error 'unsupported architecture '$ARCH
|
167
|
+
}
|
168
|
+
}
|
169
|
+
|
170
|
+
if(~ $#CONFIG_TOOL 0) {
|
171
|
+
guess_tool
|
172
|
+
if(~ $#CONFIG_TOOL 0) {
|
173
|
+
error 'no tool'
|
174
|
+
}
|
175
|
+
}
|
176
|
+
|
177
|
+
if(~ $#CONFIG_ASM 0) {
|
178
|
+
guess_asm
|
179
|
+
if(~ $#CONFIG_ASM 0) {
|
180
|
+
error 'no assembler tool'
|
181
|
+
}
|
182
|
+
}
|
183
|
+
|
184
|
+
if(~ $#CONFIG_CONFIG 0) {
|
185
|
+
CONFIG_CONFIG=release
|
186
|
+
}
|
187
|
+
}
|
188
|
+
|
189
|
+
# --- set default variables --------------------------------------------------
|
190
|
+
|
191
|
+
fn set_defaults {
|
192
|
+
CONFIG_HOST=$CONFIG_OS
|
193
|
+
}
|
194
|
+
|
195
|
+
# --- derive variables -------------------------------------------------------
|
196
|
+
|
197
|
+
fn derive_vars {
|
198
|
+
BUILD_HOST=$CONFIG_HOST
|
199
|
+
if(! ~ $CONFIG_HOST $CONFIG_OS) {
|
200
|
+
BUILD_HOST=$CONFIG_HOST'_'$CONFIG_OS
|
201
|
+
}
|
202
|
+
}
|
203
|
+
|
204
|
+
# --- write ConfigVars files ------------------------------------------------
|
205
|
+
|
206
|
+
fn output {
|
207
|
+
echo '#auto-generated by '$PACKAGE'/configure' >$1
|
208
|
+
echo 'CONFIG_PACKAGE='$PACKAGE >>$1
|
209
|
+
echo 'CONFIG_HOST='$CONFIG_HOST >>$1
|
210
|
+
echo 'CONFIG_OS='$CONFIG_OS >>$1
|
211
|
+
echo 'CONFIG_ARCH='$CONFIG_ARCH >>$1
|
212
|
+
echo 'CONFIG_TOOL='$CONFIG_TOOL >>$1
|
213
|
+
echo 'CONFIG_ASM='$CONFIG_ASM >>$1
|
214
|
+
echo 'CONFIG_CONFIG='$CONFIG_CONFIG >>$1
|
215
|
+
echo 'CONFIG_PREFIX='$CONFIG_PREFIX >>$1
|
216
|
+
if(! ~ $#CONFIG_BUILDPREFIX 0) {
|
217
|
+
echo 'CONFIG_BUILDPREFIX='$CONFIG_BUILDPREFIX >>$1
|
218
|
+
}
|
219
|
+
echo '' >>$1
|
220
|
+
}
|
221
|
+
|
222
|
+
# --- main -------------------------------------------------------------------
|
223
|
+
|
224
|
+
fn main {
|
225
|
+
args $*
|
226
|
+
info '* configure package '$PACKAGE
|
227
|
+
guess
|
228
|
+
set_defaults
|
229
|
+
derive_vars
|
230
|
+
output ConfigVars
|
231
|
+
}
|
232
|
+
|
233
|
+
main $*
|
234
|
+
|
data/dyncall/dynMakefile
ADDED
@@ -0,0 +1,53 @@
|
|
1
|
+
# Package: dyncall
|
2
|
+
# File: dyncall/CMakeLists.txt
|
3
|
+
# Description: DynCall library cmake files
|
4
|
+
# License:
|
5
|
+
#
|
6
|
+
# Copyright (c) 2010 Daniel Adler <dadler@uni-goettingen.de>
|
7
|
+
#
|
8
|
+
# Permission to use, copy, modify, and distribute this software for any
|
9
|
+
# purpose with or without fee is hereby granted, provided that the above
|
10
|
+
# copyright notice and this permission notice appear in all copies.
|
11
|
+
#
|
12
|
+
# THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
|
13
|
+
# WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
14
|
+
# MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
|
15
|
+
# ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
16
|
+
# WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
17
|
+
# ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
|
18
|
+
# OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
19
|
+
#
|
20
|
+
|
21
|
+
if(MSVC)
|
22
|
+
if(CMAKE_SIZEOF_VOID_P MATCHES 4)
|
23
|
+
set(ASM_SRC dyncall_call_x86_generic_masm.asm)
|
24
|
+
else()
|
25
|
+
set(ASM_SRC dyncall_call_x64_generic_masm.asm)
|
26
|
+
endif()
|
27
|
+
else()
|
28
|
+
set(ASM_SRC dyncall_call.S)
|
29
|
+
set_source_files_properties(${ASM_SRC} PROPERTIES LANGUAGE "C")
|
30
|
+
endif()
|
31
|
+
|
32
|
+
add_library(dyncall_s STATIC ${ASM_SRC}
|
33
|
+
dyncall_vector.c
|
34
|
+
dyncall_struct.c
|
35
|
+
dyncall_api.c
|
36
|
+
dyncall_callvm.c
|
37
|
+
dyncall_callvm_base.c
|
38
|
+
dyncall_callf.c
|
39
|
+
)
|
40
|
+
|
41
|
+
install(TARGETS dyncall_s ARCHIVE DESTINATION lib )
|
42
|
+
|
43
|
+
install(FILES
|
44
|
+
dyncall_macros.h
|
45
|
+
dyncall_config.h
|
46
|
+
dyncall_types.h
|
47
|
+
dyncall.h
|
48
|
+
dyncall_signature.h
|
49
|
+
dyncall_value.h
|
50
|
+
dyncall_callf.h
|
51
|
+
DESTINATION include
|
52
|
+
)
|
53
|
+
|
@@ -0,0 +1,10 @@
|
|
1
|
+
#include "../buildsys/dynmake/Makefile.base.M"
|
2
|
+
|
3
|
+
all: _L(dyncall_s)
|
4
|
+
|
5
|
+
_L(dyncall_s): _O(dyncall_vector) _O(dyncall_api) _O(dyncall_callvm) _O(dyncall_callvm_base) _O(dyncall_call) _O(dyncall_callf) _O(dyncall_struct)
|
6
|
+
_(AR) _(ARFLAGS) _(ARFLAG_OUT_PREFIX)_(TARGET) _(PREREQS)
|
7
|
+
|
8
|
+
clean:
|
9
|
+
_(RM) _O(*)
|
10
|
+
_(RM) _L(dyncall_s)
|
@@ -0,0 +1,20 @@
|
|
1
|
+
MAKEFILE = Makefile.embedded
|
2
|
+
MAKE_CMD = ${MAKE} -f ${MAKEFILE}
|
3
|
+
TARGET = libdyncall_s.a
|
4
|
+
OBJS = dyncall_vector.o dyncall_api.o dyncall_callvm.o dyncall_callvm_base.o dyncall_call.o dyncall_callf.o dyncall_struct.o
|
5
|
+
HEADERS = dyncall_macros.h dyncall_config.h dyncall_types.h dyncall.h dyncall_signature.h dyncall_value.h dyncall_callf.h dyncall_alloc.h
|
6
|
+
all: ${TARGET}
|
7
|
+
libdyncall_s.a: ${OBJS}
|
8
|
+
${AR} ${ARFLAGS} $@ ${OBJS}
|
9
|
+
clean:
|
10
|
+
rm -f ${OBJS} ${TARGET}
|
11
|
+
install: all
|
12
|
+
mkdir -p ${DESTDIR}${PREFIX}/include
|
13
|
+
cp ${HEADERS} ${DESTDIR}${PREFIX}/include
|
14
|
+
mkdir -p ${DESTDIR}${PREFIX}/lib
|
15
|
+
cp ${TARGET} ${DESTDIR}${PREFIX}/lib
|
16
|
+
mkdir -p ${DESTDIR}${PREFIX}/man/man3
|
17
|
+
gzip -c dyncall.3 >${DESTDIR}${PREFIX}/man/man3/dyncall.3.gz
|
18
|
+
.PHONY: all clean install
|
19
|
+
osx-universal:
|
20
|
+
CFLAGS="${CFLAGS} -arch i386 -arch x86_64 -arch ppc" ASFLAGS="${ASFLAGS} -arch i386 -arch x86_64 -arch ppc" AR="libtool" ARFLAGS="-static -o" ${MAKE_CMD} all
|
@@ -0,0 +1,16 @@
|
|
1
|
+
LIBNAME = dyncall
|
2
|
+
OBJS = dyncall_vector.o dyncall_api.o dyncall_callvm.o dyncall_callvm_base.o dyncall_call.o dyncall_callf.o dyncall_struct.o
|
3
|
+
HEADERS = ${VPATH}/dyncall_macros.h ${VPATH}/dyncall_config.h ${VPATH}/dyncall_types.h ${VPATH}/dyncall.h ${VPATH}/dyncall_signature.h ${VPATH}/dyncall_value.h ${VPATH}/dyncall_callf.h ${VPATH}/dyncall_alloc.h
|
4
|
+
LIB = lib${LIBNAME}_s.a
|
5
|
+
.PHONY: all clean install
|
6
|
+
all: ${LIB}
|
7
|
+
${LIB}: ${OBJS}
|
8
|
+
${AR} ${ARFLAGS} ${LIB} ${OBJS}
|
9
|
+
clean:
|
10
|
+
rm -f ${OBJS} ${LIB}
|
11
|
+
install: all
|
12
|
+
mkdir -p ${PREFIX}/lib
|
13
|
+
mkdir -p ${PREFIX}/include
|
14
|
+
cp ${LIB} ${PREFIX}/lib
|
15
|
+
cp ${HEADERS} ${PREFIX}/include
|
16
|
+
|
@@ -0,0 +1,62 @@
|
|
1
|
+
#//////////////////////////////////////////////////////////////////////////////
|
2
|
+
#
|
3
|
+
# Copyright (c) 2007,2009 Daniel Adler <dadler@uni-goettingen.de>,
|
4
|
+
# Tassilo Philipp <tphilipp@potion-studios.com>
|
5
|
+
#
|
6
|
+
# Permission to use, copy, modify, and distribute this software for any
|
7
|
+
# purpose with or without fee is hereby granted, provided that the above
|
8
|
+
# copyright notice and this permission notice appear in all copies.
|
9
|
+
#
|
10
|
+
# THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
|
11
|
+
# WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
12
|
+
# MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
|
13
|
+
# ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
14
|
+
# WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
15
|
+
# ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
|
16
|
+
# OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
17
|
+
#
|
18
|
+
#//////////////////////////////////////////////////////////////////////////////
|
19
|
+
|
20
|
+
#///////////////////////////////////////////////////
|
21
|
+
#
|
22
|
+
# nmake makefile
|
23
|
+
# Nmakefile
|
24
|
+
#
|
25
|
+
#///////////////////////////////////////////////////
|
26
|
+
|
27
|
+
|
28
|
+
TOP=..
|
29
|
+
|
30
|
+
!INCLUDE $(TOP)\buildsys\nmake\prolog.nmake
|
31
|
+
|
32
|
+
|
33
|
+
!IF "$(BUILD_OS)" == "windows"
|
34
|
+
|
35
|
+
TARGETS = libdyncall_s.lib #libdyncall.lib libdyncall.dll
|
36
|
+
|
37
|
+
OBJS = dyncall_call_$(BUILD_ARCH)_generic_masm.obj dyncall_vector.obj dyncall_vector.obj dyncall_callvm.obj dyncall_callvm_base.obj dyncall_api.obj dyncall_callf.obj dyncall_struct.obj
|
38
|
+
|
39
|
+
libdyncall_s.lib: $(OBJS)
|
40
|
+
echo Creating library $@ ...
|
41
|
+
$(AR) $(ARFLAGS) /OUT:"$@" $(OBJS) > nul
|
42
|
+
|
43
|
+
libdyncall.dll libdyncall.lib: $(OBJS)
|
44
|
+
echo Creating shared/import library $@ ...
|
45
|
+
$(LD) /DLL $(LDFLAGS) $(OBJS) > nul
|
46
|
+
|
47
|
+
|
48
|
+
!ELSE IF "$(BUILD_OS)" == "nds"
|
49
|
+
|
50
|
+
TARGETS = libdyncall_s.a
|
51
|
+
|
52
|
+
OBJS = dyncall_call.o dyncall_vector.o dyncall_vector.o dyncall_callvm.o dyncall_callvm_base.o dyncall_api.o dyncall_callf.o
|
53
|
+
|
54
|
+
libdyncall_s.a: $(OBJS)
|
55
|
+
echo Creating library $@ ...
|
56
|
+
$(AR) -rc $(ARFLAGS) "$@" $(OBJS)
|
57
|
+
|
58
|
+
!ENDIF
|
59
|
+
|
60
|
+
|
61
|
+
!INCLUDE $(TOP)\buildsys\nmake\epilog.nmake
|
62
|
+
|
@@ -0,0 +1,45 @@
|
|
1
|
+
Build with GCC Tool-Chain:
|
2
|
+
|
3
|
+
One assembly front-end *.S source file for all supported architectures:
|
4
|
+
|
5
|
+
Usage:
|
6
|
+
gcc -c dyncall_call.S -o dyncall_call.o
|
7
|
+
|
8
|
+
Advantages:
|
9
|
+
- works fine with universal binary builds (fat binaries), e.g.:
|
10
|
+
gcc -arch i386 -arch ppc -arch x86_64 -c dyncall_call.S -o dyncall_call.o
|
11
|
+
|
12
|
+
Details:
|
13
|
+
Simplified assembly file compilation via using a gigantic C Preprocessor switch include.
|
14
|
+
|
15
|
+
source file "dyncall_call.S" selects the appropriate GAS/Apple assembly file
|
16
|
+
"dyncall_call_<arch>_<asmtool>.[sS]".
|
17
|
+
|
18
|
+
archs so far:
|
19
|
+
|
20
|
+
arm32_thumb .s
|
21
|
+
arm32_arm .s
|
22
|
+
mips .s
|
23
|
+
ppc32 .s
|
24
|
+
x64 .s
|
25
|
+
x86 .S [ uses C macros ]
|
26
|
+
|
27
|
+
asmtools:
|
28
|
+
|
29
|
+
gas - standard GNU assembler
|
30
|
+
apple - apple's assembler (based on GNU but is significantly different in syntax)
|
31
|
+
masm - Microsoft assembler x86 and x64
|
32
|
+
nasm - Netwide assembler for x86 and x64
|
33
|
+
|
34
|
+
|
35
|
+
NOTE: .S is used for preprocessing assembly files using gcc
|
36
|
+
.s is used directly with as
|
37
|
+
|
38
|
+
advantages:
|
39
|
+
- one way to build the kernel:
|
40
|
+
|
41
|
+
gcc -c dyncall_call.S -o dyncall_call.o
|
42
|
+
|
43
|
+
- we can build now universal binaries
|
44
|
+
|
45
|
+
|