From 5a81d83d301cb1568199941baece3cd1390d14b5 Mon Sep 17 00:00:00 2001 From: Lior Halphon Date: Thu, 29 Mar 2018 22:02:01 +0300 Subject: [PATCH] Yet another attempt to fix building using MINGW. Affects #55 --- Makefile | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/Makefile b/Makefile index ade586305..3be722d58 100755 --- a/Makefile +++ b/Makefile @@ -6,6 +6,7 @@ PLATFORM := $(shell uname -s) ifneq ($(findstring MINGW,$(PLATFORM)),) PLATFORM := windows32 +USE_WINDRES := true endif ifeq ($(PLATFORM),Darwin) @@ -235,12 +236,18 @@ $(BIN)/SDL/sameboy_debugger.exe: $(CORE_OBJECTS) $(SDL_OBJECTS) $(OBJ)/Windows/r -@$(MKDIR) -p $(dir $@) $(CC) $^ -o $@ $(LDFLAGS) $(SDL_LDFLAGS) -Wl,/subsystem:console +ifneq ($(USE_WINDRES),) +$(OBJ)/%.o: %.rc + -@$(MKDIR) -p $(dir $@) + windres -DVERSION=\"$(VERSION)\" $^ $@ +else $(OBJ)/%.res: %.rc -@$(MKDIR) -p $(dir $@) rc /fo $@ /dVERSION=\"$(VERSION)\" $^ %.o: %.res cvtres /OUT:"$@" $^ +endif # We must provide SDL2.dll with the Windows port. $(BIN)/SDL/SDL2.dll: