diff --git a/Makefile.port b/Makefile.port index 650f02474..f94f1f858 100644 --- a/Makefile.port +++ b/Makefile.port @@ -230,6 +230,10 @@ CXX_O_FILES := $(patsubst %.cpp, $(B_DIR)/%.o, $(CXX_FILES)) O_FILES := $(C_O_FILES) $(CXX_O_FILES) +ifneq (,$(findstring windows,$(TARGET_PLATFORM))) + O_FILES += $(B_DIR)/icon.res +endif + INCLUDES = \ -I include \ -I include/PR \ @@ -247,7 +251,7 @@ else LD := $(CC) endif -$(C_O_FILES): OPT_LVL := $(GCC_OPT_LVL) +$(O_FILES): OPT_LVL := $(GCC_OPT_LVL) COMMON_CFLAGS := $(C_DEFINES) -DAVOID_UB=1 $(INCLUDES) $(TARGET_CFLAGS) -g \ -fno-inline-functions \ @@ -322,6 +326,9 @@ $(B_DIR)/%.o: %.cpp $(JSON_HEADERS) @mkdir -p $(dir $@) $(CXX) -c $(CXXFLAGS) $(OPT_LVL) -o $@ $< +$(B_DIR)/%.res: dist/windows/%.rc + windres $< -O coff -o $@ + ################################################################################ # Clean rules diff --git a/dist/windows/icon.ico b/dist/windows/icon.ico new file mode 100644 index 000000000..c69fb2fee Binary files /dev/null and b/dist/windows/icon.ico differ diff --git a/dist/windows/icon.rc b/dist/windows/icon.rc new file mode 100644 index 000000000..f2e2d4d79 --- /dev/null +++ b/dist/windows/icon.rc @@ -0,0 +1 @@ +id ICON icon.ico