aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoriamcheeseman <[email protected]>2026-05-14 19:50:26 -0400
committeriamcheeseman <[email protected]>2026-05-14 19:50:26 -0400
commit3a66e59404e46561e5b29448103fb43e1a8eed88 (patch)
treeb38fa96e2ef5398f1af020c3b1ef499a1a789685
parentc8f1a5eaed061ad4469e5309db8a7e8433391ed8 (diff)
statically link glfw
-rwxr-xr-xbuild.sh14
1 files changed, 6 insertions, 8 deletions
diff --git a/build.sh b/build.sh
index 049fb09..740e182 100755
--- a/build.sh
+++ b/build.sh
@@ -37,7 +37,7 @@ case "$platform" in
teensy_ldflags+=(-lX11)
;;
'gl')
- teensy_ldflags+=(-lglfw)
+ teensy_ldflags+=(./libglfw3.a)
;;
esac
@@ -54,17 +54,15 @@ echo -e "teensy:\t\t$(tr '\n' ' ' <<< "$teensy_src")"
echo -e "platform:\t$(tr '\n' ' ' <<< "$platform_src")"
time (
- echo -e "building libteensy\t: ${teensy_ldflags[@]} ${teensy_cflags[@]}"
+ set -x
$cc -shared -o libteensy.so \
+ ${teensy_src[@]} ${platform_src[@]} \
${teensy_ldflags[@]} \
- ${teensy_cflags[@]} \
- ${teensy_src[@]} ${platform_src[@]} || exit 1
-
- echo -e "building demonchime\t: ${dc_ldflags[@]} ${dc_cflags[@]}"
+ ${teensy_cflags[@]} || exit 1
$cc -o demonchime \
+ ${dc_src[@]} \
${dc_ldflags[@]} \
- ${dc_cflags[@]} \
- ${dc_src[@]} || exit 1
+ ${dc_cflags[@]} || exit 1
)
[ $? -eq 0 ] && [ ! -z "$run" ] && LD_LIBRARY_PATH=. $RUN_CMD ./demonchime