summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xconfigure.ac12
-rw-r--r--src/Makefile.am12
2 files changed, 22 insertions, 2 deletions
diff --git a/configure.ac b/configure.ac
index 7969baa0d..4df89a250 100755
--- a/configure.ac
+++ b/configure.ac
@@ -128,10 +128,18 @@ AC_TYPE_INT64_T
AC_TYPE_SSIZE_T
case $host in
- (*mingw*) skip_check_lib="yes" ;;
- (*) skip_check_lib="no"
+ (*mingw*)
+ skip_check_lib="yes"
+ mingw=true
+ ;;
+ (*)
+ skip_check_lib="no"
+ mingw=false
+ ;;
esac
+AM_CONDITIONAL(MINGW, test x$mingw = xtrue)
+
# Search for *-config
AC_PATH_PROG(PKG_CONFIG, pkg-config)
AC_PATH_PROG(CURL_CONFIG, curl-config)
diff --git a/src/Makefile.am b/src/Makefile.am
index 7114ab591..2d681a341 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -1,5 +1,8 @@
AUTOMAKE_OPTIONS = subdir-objects
+.rc.o:
+ ${WINDRES} -o $@ $<
+
# this need for enable asan in tests
#AM_TESTS_ENVIRONMENT = \
# ASAN_OPTIONS=detect_leaks=1
@@ -98,6 +101,11 @@ manaplus_SOURCES =
dyecmd_SOURCES =
endif
+if MINGW
+manaplus_SOURCES += manaplus.rc
+dyecmd_SOURCES += manaplus.rc
+endif
+
if ENABLE_CILKPLUS
dyecmd_CXXFLAGS += -DENABLE_CILKPLUS -fcilkplus -lcilkrts
manaplus_CXXFLAGS += -DENABLE_CILKPLUS -fcilkplus -lcilkrts
@@ -1956,6 +1964,10 @@ manaplustests_SOURCES = ${SRC} \
utils/dumplibs_unittest.cc \
utils/checkutils_unittest.cc
+if MINGW
+manaplustests_SOURCES += manaplus.rc
+endif
+
if USE_PHYSFS
manaplustests_SOURCES += \
fs/physfs/virtfsphys_unittest.cc