diff --git a/Makefile b/Makefile index 44fca33d..e41f221a 100644 --- a/Makefile +++ b/Makefile @@ -64,6 +64,8 @@ DOCKERBUILD ?= 0 DEBUG_INFO_LEVEL ?= 2 # Enable profiling PROFILE ?= 0 +# Enable Game ICON +ICON ?= 1 # Various workarounds for weird toolchains @@ -891,6 +893,19 @@ else # endif endif +#icon +ifeq ($(WINDOWS_BUILD),1) + ifeq ($(ICON),1) + Command := mkdir $(BUILD_DIR)/res + Resp := $(shell $(call Command)) + + Command := windres -o "$(BUILD_DIR)/res/icon.o" -i res/icon.rc + Resp := $(shell $(call Command)) + + LDFLAGS += $(BUILD_DIR)/res/icon.o + endif +endif + # Coop specific libraries # Lua @@ -1093,6 +1108,8 @@ endef # Main Targets # #==============================================================================# + + ifeq ($(EXTERNAL_DATA),1) BASEPACK_PATH := $(BUILD_DIR)/$(BASEDIR)/$(BASEPACK) @@ -1545,4 +1562,4 @@ MAKEFLAGS += --no-builtin-rules -include $(DEP_FILES) -print-% : ; $(info $* is a $(flavor $*) variable set to [$($*)]) @true \ No newline at end of file +print-% : ; $(info $* is a $(flavor $*) variable set to [$($*)]) @true diff --git a/res/icon.ico b/res/icon.ico new file mode 100644 index 00000000..a147df06 Binary files /dev/null and b/res/icon.ico differ diff --git a/res/icon.rc b/res/icon.rc new file mode 100644 index 00000000..7e84e50b --- /dev/null +++ b/res/icon.rc @@ -0,0 +1 @@ +id ICON res/icon.ico \ No newline at end of file