From 165168c05db64b9384d63f194430b639196a1ea0 Mon Sep 17 00:00:00 2001 From: "Ben \"root\" Anderson" Date: Tue, 29 Oct 2013 19:58:58 -0500 Subject: [PATCH] 1) Make GL_CFLAGS/XCFLAGS/XLIBS actually be respected 2) Include Windows resources in the build --- autoconf/m4/opengl.m4 | 1 - configure.ac | 6 ++++++ src/Makefile.am | 8 +++++++- 3 files changed, 13 insertions(+), 2 deletions(-) diff --git a/autoconf/m4/opengl.m4 b/autoconf/m4/opengl.m4 index 7ab304f914..6b75899f1a 100644 --- a/autoconf/m4/opengl.m4 +++ b/autoconf/m4/opengl.m4 @@ -41,5 +41,4 @@ AC_DEFUN([SM_OPENGL], AC_CHECK_DECL(GLEW_VERSION_2_1, , AC_MSG_ERROR("GLEW 1.3.5 or newer is required."), [#include ]) GL_LIBS="$GL_LIBS $GLU_LIBS $GLEW_LIBS" - AC_SUBST(GL_LIBS) ]) \ No newline at end of file diff --git a/configure.ac b/configure.ac index b466dfec03..b0a1700963 100644 --- a/configure.ac +++ b/configure.ac @@ -30,6 +30,7 @@ if test "$host_os" = "mingw32"; then # HACK: The prebuilts are 32bit only. Force the issue. CFLAGS="$CFLAGS -m32" CXXFLAGS="$CXXFLAGS -m32" + RESFLAGS="$RESFLAGS --target=pe-i386" fi AM_CONDITIONAL(WITH_TTY, test "$with_tty" = "yes") @@ -200,6 +201,9 @@ SM_X11 GL_CFLAGS="$GL_CFLAGS $XCFLAGS" GL_LIBS="$GL_LIBS $XLIBS" +AC_SUBST(GL_CFLAGS) +AC_SUBST(GL_LIBS) + have_libpng=yes SM_STATIC AC_CHECK_LIB(png, png_create_read_struct, [x=y], have_libpng=no, [-lz -lm]) # x=y to stop autoconf from messing with LIBS @@ -356,6 +360,8 @@ AM_CONDITIONAL(BUILD_TESTS, test "$enable_tests" = "yes" ) AC_ARG_ENABLE(lua-binaries, AS_HELP_STRING([--enable-lua-binaries],[Build lua and luac]), enable_lua_binaries=$enableval, enable_lua_binaries=no) AM_CONDITIONAL(BUILD_LUA_BINARIES, test "$enable_lua_binaries" = "yes" ) +AC_SUBST(RESFLAGS) + AC_CONFIG_FILES(Makefile) AC_CONFIG_FILES(src/Makefile) AC_OUTPUT diff --git a/src/Makefile.am b/src/Makefile.am index f68e8a1603..7e471d9ee4 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -1,5 +1,10 @@ AUTOMAKE_OPTIONS = subdir-objects +# Windows resource files +# Using $^ here makes it add .dirstamp garbage as well. So just the first file please. +.rc.o: + windres $(RESFLAGS) $< $@ + ## Do not install stepmania in the traditional way. noinst_PROGRAMS = stepmania TESTS = @@ -362,7 +367,8 @@ if WINDOWS archutils/Win32/USB.cpp archutils/Win32/USB.h \ archutils/Win32/VideoDriverInfo.cpp archutils/Win32/VideoDriverInfo.h \ archutils/Win32/WindowIcon.cpp archutils/Win32/WindowIcon.h \ - archutils/Win32/WindowsDialogBox.cpp archutils/Win32/WindowsDialogBox.h + archutils/Win32/WindowsDialogBox.cpp archutils/Win32/WindowsDialogBox.h \ + archutils/Win32/WindowsResources.rc archutils/Win32/WindowsResources.h Dialog += arch/Dialog/DialogDriver_Win32.cpp arch/Dialog/DialogDriver_Win32.h