windows support

This commit is contained in:
Rebecca Beyer
2025-03-20 11:55:34 +01:00
parent e55db94d48
commit 61e9916bb2
5 changed files with 2994 additions and 26 deletions
+12 -13
View File
@@ -1,22 +1,21 @@
COMPILER = gcc
C_FLAGS = -std=c99 -g -Wall -Werror -Wpedantic -Wshadow -Wstrict-prototypes
ifeq ($(OS), Windows_NT)
COMPILER = gcc
RAYLIB_FLAGS = -I path\to\raylib\include -L path\to\raylib\lib -lraylib
SRC = src\main.c
TARGET = bin\win\game.exe
RAYLIB_FLAGS = -I%RAYLIB% -L%RAYLIB% -lraylib -lopengl32 -lgdi32 -lwinmm
else
COMPILER = clang
SRC = src/main.c
TARGET = bin/osx/game
RAYLIB_FLAGS = $(shell pkg-config --libs --cflags raylib)
endif
endif
C_FLAGS = -std=c99 -g -Wall -Werror -Wpedantic -Wconversion -Wshadow -Wstrict-prototypes -fsanitize=address,undefined -O0 -I../include
SUPPRESSED_FLAGS = -Wno-conversion -Wno-sign-conversion -Wno-unused-variable -Wno-unused-but-set-variable
SRC = src/main.c
TARGET = bin/game
build: $(TARGET)
$(TARGET): $(SRC)
$(COMPILER) $(C_FLAGS) $(RAYLIB_FLAGS) $(SRC) -o $(TARGET) $(SUPPRESSED_FLAGS)
build: $(SRC)
$(COMPILER) $(SRC) -o $(TARGET) $(C_FLAGS) $(RAYLIB_FLAGS)
clean:
rm -f $(TARGET)
run: clean build
./$(TARGET)
.\$(TARGET)