engine-c: arid KKND2-like showcase shot + kitchen claim DONE
This commit is contained in:
parent
575d7d29b8
commit
b5a89c9b47
11 changed files with 739 additions and 84 deletions
|
|
@ -10,13 +10,27 @@ SRCS="src/unit_card.c src/rng.c src/config.c src/png.c src/snapshot.c src/map.c
|
|||
src/units.c src/buildings.c src/projectiles.c src/render.c \
|
||||
src/input.c src/ai.c src/audio.c src/save.c src/engine.c src/main.c"
|
||||
|
||||
LIBS=$(pkg-config --cflags --libs sdl2 SDL2_ttf 2>/dev/null)
|
||||
# Homebrew (macOS arm64/x86) often has .pc files that pkg-config misses without PATH.
|
||||
if [ -d /opt/homebrew/lib/pkgconfig ]; then
|
||||
export PKG_CONFIG_PATH="/opt/homebrew/lib/pkgconfig${PKG_CONFIG_PATH:+:$PKG_CONFIG_PATH}"
|
||||
elif [ -d /usr/local/lib/pkgconfig ]; then
|
||||
export PKG_CONFIG_PATH="/usr/local/lib/pkgconfig${PKG_CONFIG_PATH:+:$PKG_CONFIG_PATH}"
|
||||
fi
|
||||
|
||||
LIBS=$(pkg-config --cflags --libs sdl2 SDL2_ttf 2>/dev/null || true)
|
||||
if [ -z "$LIBS" ]; then
|
||||
LIBS="-lSDL2 -lSDL2_ttf"
|
||||
if [ -d /opt/homebrew/include ]; then
|
||||
LIBS="-I/opt/homebrew/include -L/opt/homebrew/lib -lSDL2 -lSDL2_ttf"
|
||||
elif [ -d /usr/local/include ]; then
|
||||
LIBS="-I/usr/local/include -L/usr/local/lib -lSDL2 -lSDL2_ttf"
|
||||
else
|
||||
LIBS="-lSDL2 -lSDL2_ttf"
|
||||
fi
|
||||
fi
|
||||
LIBS="$LIBS -lz"
|
||||
|
||||
echo "openkknd: compiling..."
|
||||
# shellcheck disable=SC2086
|
||||
$CC $CFLAGS $SRCS -o openkknd $LIBS -lm
|
||||
echo "openkknd: built -> ./openkknd"
|
||||
echo "usage: ./openkknd [--easy|--normal|--hard] [--load savegame.kknd]"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue