From 578ceabd0ecd70ac1190c0ab6da25377fe644f47 Mon Sep 17 00:00:00 2001 From: veclavtalica Date: Mon, 7 Oct 2024 18:06:10 +0300 Subject: [PATCH] /tools/gen_api_header.sh --- tools/gen_api_header.sh | 4 ++++ tools/twn | 3 +++ 2 files changed, 7 insertions(+) create mode 100755 tools/gen_api_header.sh 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