Browse Source

linux mingw-w64 build tweaks

Pal Lockheart 7 years ago
parent
commit
56908c7730
4 changed files with 9 additions and 5 deletions
  1. 4 0
      common.h
  2. 1 1
      win32/Makefile
  3. 1 1
      win32/sdlpal.rc
  4. 3 3
      win32/win32.cpp

+ 4 - 0
common.h

@@ -70,6 +70,10 @@ extern "C"
 
 #endif
 
+#if !defined(fmax) || !defined(fmin)
+#include <math.h>
+#endif
+
 #ifndef max
 # define max fmax
 #endif

+ 1 - 1
win32/Makefile

@@ -43,7 +43,7 @@ gtest-all.o : $(GTEST_DIR)/src/gtest-all.cc
 
 %.o: %.rc
 	@echo [RES] $^
-	@windres -i $^ -o $@
+	@$(HOST)windres -i $^ -o $@
 
 $(TEST_TARGET): $(OBJFILES) $(TEST_OBJFILES) gtest-all.o
 	@echo [LD] $@

+ 1 - 1
win32/sdlpal.rc

@@ -7,7 +7,7 @@
 //
 // Generated from the TEXTINCLUDE 2 resource.
 //
-#include "Windows.h"
+#include "windows.h"
 
 /////////////////////////////////////////////////////////////////////////////
 #undef APSTUDIO_READONLY_SYMBOLS

+ 3 - 3
win32/win32.cpp

@@ -3,9 +3,9 @@
 #define _CRT_SECURE_NO_WARNINGS
 
 #include <tchar.h>
-#include <Windows.h>
-#include <CommCtrl.h>
-#include <ShlObj.h>
+#include <windows.h>
+#include <commctrl.h>
+#include <shlobj.h>
 #include <string>
 #include "resource.h"
 #include "../global.h"