diff --git a/tools/gen_api_header.sh b/tools/gen_api_header.sh new file mode 100755 index 0000000..2b21995 --- /dev/null +++ b/tools/gen_api_header.sh @@ -0,0 +1,4 @@ +#!/bin/env sh +# single header api generator with clang + +clang -I./ -P -E -nostdinc -nobuiltininc -DTWN_NOT_C $TWNROOT/include/twn_game_api.h | clang-format diff --git a/tools/twn b/tools/twn index bc0d6c5..c8bb124 100755 --- a/tools/twn +++ b/tools/twn @@ -36,6 +36,9 @@ case "$1" in esac ;; + api-gen ) "$toolpath"/gen_api_header.sh + ;; + * ) echo "Unknown command." ;; esac