BUILD: Improve rules for compiling Windows resource scripts

This commit is contained in:
Cameron Cawley 2018-12-15 00:11:05 +00:00 committed by David Turner
parent a3767e679e
commit 309286cfbb
4 changed files with 8 additions and 7 deletions

View File

@ -156,6 +156,12 @@ endif
$(QUIET)$(MKDIR) $(*D)
$(QUIET_AS)$(AS) $(ASFLAGS) $(<) -o $*.o
# Build rule for Windows resource files
# TODO: Support dependency tracking
%.o: %.rc
$(QUIET)$(MKDIR) $(*D)
$(QUIET_WINDRES)$(WINDRES) $(WINDRESFLAGS) $(CPPFLAGS) $(<) -o $*.o
ifdef USE_NASM
# Build rule for NASM assembler files
%.o: %.asm

View File

@ -2,8 +2,7 @@
# Windows specific
#
scummvmwinres.o: $(srcdir)/icons/scummvm.ico $(DIST_FILES_THEMES) $(DIST_FILES_NETWORKING) $(DIST_FILES_ENGINEDATA) $(srcdir)/dists/scummvm.rc
$(QUIET_WINDRES)$(WINDRES) -DHAVE_CONFIG_H $(WINDRESFLAGS) $(DEFINES) -I. -I$(srcdir) $(srcdir)/dists/scummvm.rc scummvmwinres.o
dists/scummvm.o: $(srcdir)/icons/scummvm.ico $(DIST_FILES_THEMES) $(DIST_FILES_NETWORKING) $(DIST_FILES_ENGINEDATA) config.h $(srcdir)/base/internal_version.h
# Special target to create a win32 snapshot binary (for Inno Setup)
win32dist: all

View File

@ -2,10 +2,6 @@ ifdef WRAP_MALLOC
LDFLAGS += -Wl,--wrap,malloc -Wl,--wrap,free
endif
backends/platform/wince/PocketSCUMM.o: $(srcdir)/backends/platform/wince/PocketSCUMM.rc
$(QUIET)$(MKDIR) $(*D)
$(WINDRES) $(WINDRESFLAGS) -I$(srcdir)/backends/platform/wince $< $@
ifdef DYNAMIC_MODULES
plugins: backends/platform/wince/stub.o backends/platform/wince/PocketSCUMM.o
$(CXX) backends/platform/wince/stub.o backends/platform/wince/PocketSCUMM.o -L. -lscummvm -o scummvm.exe

2
configure vendored
View File

@ -2786,7 +2786,7 @@ case $_host_os in
append_var DEFINES "-D__USE_MINGW_ANSI_STDIO=0"
append_var LDFLAGS "-static-libgcc -static-libstdc++"
append_var LIBS "-lmingw32 -lwinmm -lgdi32"
append_var OBJS "scummvmwinres.o"
append_var OBJS "dists/scummvm.o"
add_line_to_config_mk 'WIN32 = 1'
_port_mk="backends/platform/sdl/win32/win32.mk"
;;