Making sure Win32 can build with and without SDL support, suppress some warnings

This commit is contained in:
David Schmidt 2011-01-10 03:10:09 +00:00
parent b62b14b392
commit 08bc587246
5 changed files with 15 additions and 9 deletions

View File

@ -56,7 +56,7 @@ gsportx: $(OBJECTS) compile_time.o
# Mingw32 (native windows) builds:
gsport.exe: $(OBJECTS) compile_time.o
g++ $(CCOPTS) $(LDOPTS) $(OBJECTS) compile_time.o $(LDFLAGS) -o $(NAME)$(SUFFIX) $(EXTRA_LIBS) -lwinmm -lgdi32 -ldsound -lcomctl32 -lws2_32 -lshell32 -lSDL -lfreetype -lcomdlg32
g++ $(CCOPTS) $(LDOPTS) $(OBJECTS) compile_time.o $(LDFLAGS) -o $(NAME)$(SUFFIX) $(EXTRA_LIBS) -lwinmm -lgdi32 -ldsound -lcomctl32 -lws2_32 -lshell32
mkdir -p ../GSport.app/lib
cp -f gsport.exe ../GSport.app/GSport.exe
cp -f ../config.template ../GSport.app/config.txt

View File

@ -60,12 +60,9 @@ const char* const textPrinterFileName = "./printer.txt";
#define PIXX ((Bitu)floor(curX*dpi+0.5))
#define PIXY ((Bitu)floor(curY*dpi+0.5))
static Bit16u confdpi, confwidth, confheight;
static Bitu printer_timout;
static bool timeout_dirty;
static const char* document_path;
static char confoutputDevice[50];
static bool confmultipageOutput;
extern "C" char* g_printer_font_roman;
extern "C" char* g_printer_font_sans;
extern "C" char* g_printer_font_courier;
@ -451,7 +448,7 @@ void CPrinter::updateFont()
FT_Set_Transform(curFont, &matrix, 0);
}
}
#endif HAVE_SDL
#endif // HAVE_SDL
#ifdef HAVE_SDL
bool CPrinter::processCommandChar(Bit8u ch)

View File

@ -52,7 +52,7 @@
#include <ft2build.h>
#include FT_FREETYPE_H
#endif
#endif // HAVE_SDL
#if defined (WIN32)
#include <windows.h>
@ -268,7 +268,6 @@ private:
Real64 hmi; // Horizontal motion index (in inch; overrides CPI settings)
Bit8u msb; // MSB mode
Bit16u numPrintAsChar; // Number of bytes to print as characters (even when normally control codes)
#if defined (WIN32)

View File

@ -1,11 +1,10 @@
TARGET = gsport.exe
TFEOBJ = tfe/tfe.o arch/win32/tfearch.o tfe/tfesupp.o
OBJECTS = $(OBJECTS1) $(TFEOBJ) scc_windriver.o win32snd_driver.o win_console.o win_generic.o
CCOPTS = -O2 -DGSPORT_LITTLE_ENDIAN -DHAVE_TFE
CPPOPTS = -O2 -DGSPORT_LITTLE_ENDIAN -DHAVE_TFE
SUFFIX = ".exe"
NAME = gsport
XOPTS = -Wall -fomit-frame-pointer -march=pentium
XLIBS =

11
src/vars_win32_sdl Normal file
View File

@ -0,0 +1,11 @@
TARGET = gsport.exe
TFEOBJ = tfe/tfe.o arch/win32/tfearch.o tfe/tfesupp.o
OBJECTS = $(OBJECTS1) $(TFEOBJ) scc_windriver.o win32snd_driver.o win_console.o win_generic.o
CCOPTS = -O2 -DGSPORT_LITTLE_ENDIAN -DHAVE_TFE -DHAVE_SDL
CPPOPTS = -O2 -DGSPORT_LITTLE_ENDIAN -DHAVE_TFE -DHAVE_SDL -I /usr/include/freetype2 -I/usr/include/SDL
SUFFIX = ".exe"
NAME = gsport
EXTRA_LIBS = -lSDL -lfreetype -lcomdlg32
XOPTS = -Wall -fomit-frame-pointer -march=pentium
XLIBS =