add optional ccache

This commit is contained in:
asrael 2025-09-30 21:20:30 -05:00
parent ab9e017427
commit 1e913f8998
No known key found for this signature in database
GPG key ID: 2786557804DFAE24

11
pxl8.sh
View file

@ -3,6 +3,11 @@
set -e
CC="${CC:-gcc}"
if command -v ccache >/dev/null 2>&1; then
CC="ccache $CC"
fi
CFLAGS="-std=c23 -Wall -Wextra"
LIBS="-lm"
MODE="debug"
@ -349,7 +354,11 @@ case "$COMMAND" in
setup_sdl3
print_info "Building pxl8 ($MODE mode)"
if [[ "$CC" == ccache* ]]; then
print_info "Compiler cache: ccache enabled"
fi
if [[ -n "$SIMD_FLAGS" ]]; then
case "$(uname -m)" in
x86_64|amd64)