Skip to content

Commit

Permalink
do not try to build icons on mingw (no rc available)
Browse files Browse the repository at this point in the history
  • Loading branch information
ianmaclarty committed Nov 6, 2018
1 parent 3318076 commit ff83e49
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 deletions.
4 changes: 4 additions & 0 deletions Common.mk
Original file line number Diff line number Diff line change
Expand Up @@ -297,6 +297,7 @@ else ifeq ($(TARGET_PLATFORM),msvc32)
$(BUILD_LIB_DIR)/SDL2.lib
TARGET_CFLAGS = -nologo -EHsc -fp:fast
WINDOWS = 1
MSVC = 1
WINDOWS_SUBSYSTEM_OPT = -SUBSYSTEM:WINDOWS
CONSOLE_SUBSYSTEM_OPT = -SUBSYSTEM:CONSOLE
SDL_PREBUILT_SUBDIR=win32
Expand Down Expand Up @@ -324,6 +325,7 @@ else ifeq ($(TARGET_PLATFORM),msvc64)
$(BUILD_LIB_DIR)/SDL2.lib
TARGET_CFLAGS = -nologo -EHsc -fp:fast
WINDOWS = 1
MSVC = 1
WINDOWS_SUBSYSTEM_OPT = -SUBSYSTEM:WINDOWS
CONSOLE_SUBSYSTEM_OPT = -SUBSYSTEM:CONSOLE
SDL_PREBUILT_SUBDIR=win64
Expand All @@ -339,6 +341,7 @@ else ifeq ($(TARGET_PLATFORM),mingw32)
XCFLAGS = -Wall -Werror -fno-strict-aliasing
LUAJIT_FLAGS += HOST_CC="gcc -m32" CROSS=i686-w64-mingw32- TARGET_SYS=Windows
WINDOWS = 1
MINGW = 1
WINDOWS_SUBSYSTEM_OPT = -mwindows
CONSOLE_SUBSYSTEM_OPT =
SDL_PREBUILT_SUBDIR=win32
Expand All @@ -353,6 +356,7 @@ else ifeq ($(TARGET_PLATFORM),mingw64)
XCFLAGS = -Wall -Werror -fno-strict-aliasing
LUAJIT_FLAGS += HOST_CC="gcc -m64" CROSS=x86_64-w64-mingw32- TARGET_SYS=Windows
WINDOWS = 1
MINGW = 1
WINDOWS_SUBSYSTEM_OPT = -mwindows
CONSOLE_SUBSYSTEM_OPT =
SDL_PREBUILT_SUBDIR=win64
Expand Down
9 changes: 7 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -108,14 +108,19 @@ $(AMULET): $(DEP_ALIBS) $(AM_OBJ_FILES) $(EXTRA_PREREQS) | $(BUILD_BIN_DIR)
$(LINK) $(AM_OBJ_FILES) $(AM_LDFLAGS) $(EXE_OUT_OPT)$@
for f in $(DEP_ALIBS); do ff=`basename $$f`; cp $$f $(BUILD_BIN_DIR)/`echo $$ff | sed 's/^lib//'`; done
@$(PRINT_BUILD_DONE_MSG)
else ifdef WINDOWS
# build both console and windows versions
else ifdef MSVC
$(AMULET): $(DEP_ALIBS) $(AM_OBJ_FILES) $(EXTRA_PREREQS) | $(BUILD_BIN_DIR)
rc amulet.rc
$(LINK) $(CONSOLE_SUBSYSTEM_OPT) amulet.res $(AM_OBJ_FILES) $(AM_LDFLAGS) $(EXE_OUT_OPT)$(BUILD_BIN_DIR)/amulet-console.exe
$(LINK) $(WINDOWS_SUBSYSTEM_OPT) amulet.res $(AM_OBJ_FILES) $(AM_LDFLAGS) $(EXE_OUT_OPT)$@
cp $(BUILD_BIN_DIR)/* .
@$(PRINT_BUILD_DONE_MSG)
else ifdef MINGW
$(AMULET): $(DEP_ALIBS) $(AM_OBJ_FILES) $(EXTRA_PREREQS) | $(BUILD_BIN_DIR)
$(LINK) $(CONSOLE_SUBSYSTEM_OPT) $(AM_OBJ_FILES) $(AM_LDFLAGS) $(EXE_OUT_OPT)$(BUILD_BIN_DIR)/amulet-console.exe
$(LINK) $(WINDOWS_SUBSYSTEM_OPT) $(AM_OBJ_FILES) $(AM_LDFLAGS) $(EXE_OUT_OPT)$@
cp $(BUILD_BIN_DIR)/* .
@$(PRINT_BUILD_DONE_MSG)
else ifdef OSX
$(AMULET): $(DEP_ALIBS) $(AM_OBJ_FILES) $(EXTRA_PREREQS) | $(BUILD_BIN_DIR)
$(LINK) $(AM_OBJ_FILES) $(AM_LDFLAGS) $(EXE_OUT_OPT)$@
Expand Down

0 comments on commit ff83e49

Please sign in to comment.