Move raylib build commands to Makefile

This commit is contained in:
Abdelrahman Said 2025-05-10 14:36:41 +01:00
parent 516e3de576
commit 4963d455be
2 changed files with 7 additions and 6 deletions

View File

@ -3,10 +3,15 @@ CFLAGS = -g -Iraylib/include -Iwapp/src
LDFLAGS = '-Wl,-rpath,$$ORIGIN/raylib/lib' -Lraylib/lib -lraylib
OUT = main
.PHONY: all game
.PHONY: all raylib game
all: game
game:
raylib:
cmake -S raylib-src -B raylib-build -DCMAKE_INSTALL_PREFIX=raylib -DCMAKE_CONFIGURATION_TYPES=Release -DBUILD_SHARED_LIBS=ON -G "Ninja Multi-Config"
cmake --build raylib-build --config=Release
cmake --install raylib-build --config=Release
game: raylib
cd wapp && python3 -m codegen
$(CC) $(CFLAGS) $(LDFLAGS) main.c wapp/src/wapp.c -o $(OUT)

4
build
View File

@ -1,7 +1,3 @@
#!/bin/bash
cmake -S raylib-src -B raylib-build -DCMAKE_INSTALL_PREFIX=raylib -DCMAKE_CONFIGURATION_TYPES=Release -DBUILD_SHARED_LIBS=ON -G "Ninja Multi-Config"
cmake --build raylib-build --config=Release
cmake --install raylib-build --config=Release
bear -- make