]> Shamusworld >> Repos - thunder/commitdiff
Fixes for compilation under MinGW.
authorU-MIKSAN\shamus <shamus@DESKTOP-6PN9E2O.MIKSAN.local>
Fri, 11 Jan 2019 18:52:35 +0000 (12:52 -0600)
committerU-MIKSAN\shamus <shamus@DESKTOP-6PN9E2O.MIKSAN.local>
Fri, 11 Jan 2019 18:52:35 +0000 (12:52 -0600)
makefile
src/gui.h
src/screen.h
src/sound.cpp
src/thunder.cpp
src/video.h

index fdf79bca85a29cf4a8cfc85ee1932b5138ae170b..11b7da914562fae539cfc2944c05f8ba1bcabaed 100644 (file)
--- a/makefile
+++ b/makefile
@@ -12,8 +12,9 @@ SYSTYPE    = __GCCWIN32__
 EXESUFFIX  = .exe
 GLLIB      = -lopengl32
 ICON       = obj/icon.o
-SDLLIBTYPE = --libs
+SDLLIBTYPE = --static-libs
 MSG        = Win32 on MinGW
+EXTRA      = -static
 
 else
 #ifeq "$(OSTYPE)" "darwin"
@@ -51,7 +52,7 @@ CPPFLAGS = -MMD -Wall -Wno-switch -Wno-non-virtual-dtor -Wno-uninitialized -Wno-
 LDFLAGS =
 
 # Ugh, let's get rid of the ref to -lcurses [DONE]
-LIBS = `sdl2-config $(SDLLIBTYPE)` -lstdc++ -lz -lm $(GLLIB)
+LIBS = `sdl2-config $(SDLLIBTYPE)` -lstdc++ -lz -lm $(GLLIB) $(EXTRA)
 
 INCS = -I. -Isrc
 
@@ -81,7 +82,7 @@ all: checkenv message obj $(TARGET)$(EXESUFFIX)
 checkenv:
        @echo
        @echo -en "\033[01;33m***\033[00;32m Checking compilation environment... \033[00m"
-ifeq "" "$(shell which sdl-config)"
+ifeq "" "$(shell which sdl2-config)"
        @echo
        @echo
        @echo -e "\033[01;33mIt seems that you don't have the SDL development libraries installed.
index a5d4c6fa26659c75e500cec53fbf95200f3b53b8..bc3ed2e6613136865be669073a80a80d0e7c18ce 100644 (file)
--- a/src/gui.h
+++ b/src/gui.h
@@ -9,7 +9,7 @@
 #define __GUI_H__
 
 #include <stdint.h>
-#include <SDL2/SDL.h>
+#include <SDL.h>
 
 // Message macros
 
index bc1e2ec53763e03899e7a92d3697b5a18aab10de..01e166083db25d7c930534ff9c4a06ae62a7eaef 100644 (file)
@@ -8,7 +8,7 @@
 #ifndef __SCREEN_H__
 #define __SCREEN_H__
 
-#include <SDL2/SDL.h>
+#include <SDL.h>
 #include <stdint.h>
 
 void BlitChar(uint8_t *, uint8_t *);
index e366830664797c133f64079200cbd2c9ae5b41d4..8d87ad9ea12b14f086df6be0e6ca16a045859219 100644 (file)
@@ -12,7 +12,7 @@
 //
 
 #include "sound.h"
-#include <SDL2/SDL.h>
+#include <SDL.h>
 #include "psg.h"
 #include "resource.h"
 #include "ym2151.h"
index bd0cc855ab903cfa0409ce278aaccd06c5f3a747..f53dd689ce541f235d9dbac35bde9cf5323efc62 100644 (file)
@@ -16,7 +16,7 @@
 
 #define THUNDER_VERSION                "1.2.0"
 
-#include <SDL2/SDL.h>
+#include <SDL.h>
 #include <string>
 #include <stdio.h>
 #include <stdlib.h>
index 8e59dfbee804b97988be5fc6c190c83aa468339c..b3afeaf1b6580159019a4d941f6935a4cef82968 100644 (file)
@@ -5,7 +5,7 @@
 #ifndef __VIDEO_H__
 #define __VIDEO_H__
 
-#include <SDL2/SDL.h>
+#include <SDL.h>
 #include <stdint.h>                                                    // For uint32_t
 
 #define VIRTUAL_SCREEN_WIDTH   288