Skip to content
This repository has been archived by the owner on Oct 10, 2022. It is now read-only.

Commit

Permalink
Update bindings for libctru 1.5.0
Browse files Browse the repository at this point in the history
  • Loading branch information
FenrirWolf committed May 15, 2018
1 parent 71d0a86 commit da8eeb7
Show file tree
Hide file tree
Showing 3 changed files with 2,414 additions and 2,367 deletions.
38 changes: 38 additions & 0 deletions ctru-sys/bindgen.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
#!/usr/bin/env bash

clang_version=$1

if [ -z "$clang_version" ]; then
echo " usage: ./bindgen.sh <clang_version>"
echo "example: ./bindgen.sh 5.0.0"
echo "Check your current version with \`clang -v\`."
exit 1
fi

set -euxo pipefail

bindgen "$DEVKITPRO/libctru/include/3ds.h" \
--rust-target nightly \
--use-core \
--distrust-clang-mangling \
--no-doc-comments \
--no-layout-tests \
--ctypes-prefix "::libc" \
--no-prepend-enum-name \
--generate "functions,types,vars" \
--blacklist-type "u(8|16|32|64)" \
--blacklist-type "__builtin_va_list" \
--blacklist-type "__va_list" \
-- \
--target=arm-none-eabi \
--sysroot=$DEVKITARM/arm-none-eabi \
-isystem$DEVKITARM/arm-none-eabi/include \
-isystem/usr/lib/clang/$clang_version/include \
-I$DEVKITPRO/libctru/include \
-mfloat-abi=hard \
-march=armv6k \
-mtune=mpcore \
-mfpu=vfp \
-DARM11 \
-D_3DS \
> src/bindings.rs
Loading

0 comments on commit da8eeb7

Please sign in to comment.