From 86464b6bd09567005d6517fba9e170f4f3550c90 Mon Sep 17 00:00:00 2001 From: Adam Malczewski Date: Sat, 18 Apr 2026 18:38:01 +0900 Subject: final touches --- Makefile | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'Makefile') diff --git a/Makefile b/Makefile index b30a2d6..283b081 100644 --- a/Makefile +++ b/Makefile @@ -12,13 +12,14 @@ RAYLIB_LIB := $(BUILD_DIR)/libraylib.a # Source files APP_SRC := $(SRC_DIR)/main.c +FONT_HEADER := $(BUILD_DIR)/font_data.h CC := x86_64-w64-mingw32-gcc APP_OUT := $(BUILD_DIR)/study-player.exe -LDFLAGS := -lgdi32 -lwinmm -lcomdlg32 -lole32 +LDFLAGS := -mwindows -lgdi32 -lwinmm -lcomdlg32 -lole32 DEFINES := -DPLATFORM_DESKTOP -D_GLFW_WIN32 -CFLAGS_COMMON := -std=c99 -O2 -I$(RAYLIB_SRC) -I$(RAYLIB_SRC)/external/glfw/include +CFLAGS_COMMON := -std=c99 -O2 -I$(RAYLIB_SRC) -I$(RAYLIB_SRC)/external/glfw/include -I$(BUILD_DIR) CFLAGS := $(CFLAGS_COMMON) -Wall -Wextra CFLAGS_RAYLIB := $(CFLAGS_COMMON) -w @@ -32,8 +33,8 @@ RAYLIB_OBJS := $(patsubst $(RAYLIB_SRC)/%.c,$(BUILD_DIR)/raylib/%.o,$(RAYLIB_SRC all: $(APP_OUT) -# Build application -$(APP_OUT): $(APP_SRC) $(RAYLIB_LIB) | $(BUILD_DIR) +# Build application (font_data.h is generated by bin/build before invoking make) +$(APP_OUT): $(APP_SRC) $(FONT_HEADER) $(RAYLIB_LIB) | $(BUILD_DIR) $(CC) $(CFLAGS) $(DEFINES) -o $@ $< -L$(BUILD_DIR) -lraylib $(LDFLAGS) # Archive raylib objects into static library -- cgit v1.2.3