Skip to content

Commit

Permalink
fix not using mingw resources.rc for mingw builds
Browse files Browse the repository at this point in the history
  • Loading branch information
asiekierka committed Jan 20, 2024
1 parent d0d7998 commit 16dfc2c
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,9 @@ LDFLAGS = -g -O3 -flto -std=gnu18 -Wall

ifeq (${PLATFORM},mingw32-sdl)
USE_SDL = 1
WINDRES = windres
ifneq (${ARCH},)
WINDRES = ${ARCH}-w64-mingw32-windres
ifneq (${USE_CLANG},)
CC = ${ARCH}-w64-mingw32-clang
else
Expand Down Expand Up @@ -113,6 +115,10 @@ OBJS += $(OBJDIR)/frontend_headless.o \
$(OBJDIR)/posix_vfs.o
endif

ifeq (${PLATFORM},mingw32-sdl)
OBJS += $(OBJDIR)/win32-resources.o
endif

all: $(TARGET)

$(TARGET): $(OBJS)
Expand Down Expand Up @@ -147,6 +153,10 @@ $(OBJDIR)/8x8.bin: $(FONTSDIR)/pc_cga.png $(TOOLSDIR)/font2raw.py
@mkdir -p $(@D)
python3 $(TOOLSDIR)/font2raw.py $< 8 8 a $@

$(OBJDIR)/win32-resources.o: mingw/resources.rc
@mkdir -p $(@D)
$(WINDRES) -i $< -o $@

.PHONY: clean

clean:
Expand Down

0 comments on commit 16dfc2c

Please sign in to comment.