got the sdl/sconstruct build working in cygwin
this required some changes to build scripts. please assume, if it requires fixing, that what I did was sane! many files included #ifdef WIN32 which I changed to #ifdef MSVC since we are only supporting windows-specific features in the msvc build.
This commit is contained in:
parent
529df3c6b5
commit
b8b6324ba3
|
@ -1,7 +1,6 @@
|
|||
CCFLAGS= ''
|
||||
LINKFLAGS = ''
|
||||
#fetch environment
|
||||
env = Environment()
|
||||
|
||||
env = Environment(CCFLAGS=CCFLAGS, LINKFLAGS=LINKFLAGS)
|
||||
conf = Configure(env)
|
||||
if not conf.CheckLib('SDL'):
|
||||
print 'Did not find libSDL.a or SDL.lib, exiting!'
|
||||
|
@ -9,6 +8,8 @@ if not conf.CheckLib('SDL'):
|
|||
if not conf.CheckLib('z'):
|
||||
print 'Did not find libz.a or z.lib, exiting!'
|
||||
Exit(1)
|
||||
if not conf.CheckFunc('asprintf'):
|
||||
env['CCFLAGS'] += " -DHAVE_ASPRINTF"
|
||||
|
||||
env = conf.Finish()
|
||||
Export('env')
|
||||
|
|
|
@ -1,5 +1,10 @@
|
|||
Items to be completed before 2.0 release
|
||||
|
||||
FASTAPASS / FP_FASTAPASS / Are these archaic? They suck - ??
|
||||
|
||||
Doxygen integration - ??
|
||||
* website integration
|
||||
|
||||
Linux build - soules
|
||||
* clean-up scons files to manage SDL variables properly
|
||||
* go through #def variables and figure out which we need and which we don't
|
||||
|
|
|
@ -65,12 +65,26 @@ sdl_libflags = sdl_libflags_pipe.read();
|
|||
for flag in sdl_libflags.split(' '):
|
||||
if flag.find("-L") == 0:
|
||||
sdl_libpath.append(flag.strip("-L"));
|
||||
else:
|
||||
elif flag.find("-l") == 0:
|
||||
sdl_libs.append(flag.strip("-l"));
|
||||
else:
|
||||
env['LINKFLAGS'] += " " + flag;
|
||||
sdl_libflags_pipe.close();
|
||||
|
||||
# add zlib
|
||||
libs = sdl_libs;
|
||||
libs.append('z');
|
||||
|
||||
env.Program('fceu', file_list, CCFLAGS=sdl_cflags, LIBS=libs, LIBPATH=sdl_libpath)
|
||||
# include sdl cflags
|
||||
env['CCFLAGS'] += sdl_cflags;
|
||||
|
||||
#special flags for cygwin
|
||||
print "platform: " + env['PLATFORM']
|
||||
if env['PLATFORM'] == 'cygwin':
|
||||
env['CCFLAGS'] += " -mno-cygwin"
|
||||
#env['LINKFLAGS'] += " -mno-cygwin"
|
||||
libs.extend(['ddraw','dinput','dsound','gdi32','dxguid','winmm','shell32','wsock32','comdlg32','ole32']);
|
||||
|
||||
print env['CCFLAGS']
|
||||
|
||||
env.Program('fceu', file_list, LIBS=libs, LIBPATH=sdl_libpath)
|
||||
|
|
|
@ -202,9 +202,9 @@ char *GetKeyboard(void)
|
|||
#include <windows.h>
|
||||
|
||||
/* Stupid SDL */
|
||||
#ifdef main
|
||||
#undef main
|
||||
#endif
|
||||
//#ifdef main
|
||||
//#undef main
|
||||
//#endif
|
||||
#endif
|
||||
|
||||
#ifndef EXTGUI
|
||||
|
|
|
@ -67,21 +67,20 @@ if(which < FCEUIOD__COUNT)
|
|||
}
|
||||
}
|
||||
|
||||
// XXX commented out for now... Linux has asprintf()
|
||||
// #ifndef HAVE_ASPRINTF
|
||||
// static int asprintf(char **strp, const char *fmt, ...)
|
||||
// {
|
||||
// va_list ap;
|
||||
// int ret;
|
||||
#ifndef HAVE_ASPRINTF
|
||||
static int asprintf(char **strp, const char *fmt, ...)
|
||||
{
|
||||
va_list ap;
|
||||
int ret;
|
||||
|
||||
// va_start(ap,fmt);
|
||||
// if(!(*strp=(char*)malloc(2048))) //mbg merge 7/17/06 cast to char*
|
||||
// return(0);
|
||||
// ret=vsnprintf(*strp,2048,fmt,ap);
|
||||
// va_end(ap);
|
||||
// return(ret);
|
||||
// }
|
||||
// #endif
|
||||
va_start(ap,fmt);
|
||||
if(!(*strp=(char*)malloc(2048))) //mbg merge 7/17/06 cast to char*
|
||||
return(0);
|
||||
ret=vsnprintf(*strp,2048,fmt,ap);
|
||||
va_end(ap);
|
||||
return(ret);
|
||||
}
|
||||
#endif
|
||||
|
||||
char* FCEU_GetPath(int type)
|
||||
{
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
//#include <unistd.h> //mbgm erge 7/17/06 removed
|
||||
#ifdef WIN32
|
||||
#ifdef MSVC
|
||||
#include <windows.h>
|
||||
#endif
|
||||
|
||||
|
@ -235,7 +235,7 @@ void FCEUI_StopMovie(void)
|
|||
if(current > 0) StopRecording();
|
||||
}
|
||||
|
||||
#ifdef WIN32
|
||||
#ifdef MSVC
|
||||
#include "process.h"
|
||||
void executeCommand(const char* cmd)
|
||||
{
|
||||
|
@ -255,7 +255,7 @@ void executeCommand(const char* cmd)
|
|||
int justAutoConverted=0;
|
||||
static const char* convertToFCM(const char *fname, char *buffer)
|
||||
{
|
||||
#ifdef WIN32
|
||||
#ifdef MSVC
|
||||
justAutoConverted=0;
|
||||
|
||||
// convert to fcm if not already
|
||||
|
@ -350,7 +350,7 @@ void ParseGIInput(FCEUGI *GI); //mbg merge 7/17/06 - had to add. gross.
|
|||
void InitOtherInput(void); //mbg merge 7/17/06 - had to add. gross.
|
||||
static void ResetInputTypes()
|
||||
{
|
||||
#ifdef WIN32
|
||||
#ifdef MSVC
|
||||
extern int UsrInputType[3];
|
||||
UsrInputType[0] = SI_GAMEPAD;
|
||||
UsrInputType[1] = SI_GAMEPAD;
|
||||
|
@ -867,7 +867,7 @@ void FCEU_DrawMovies(uint8 *XBuf)
|
|||
{
|
||||
int frameDisplayOn = current != 0 && frame_display;
|
||||
extern int howlong;
|
||||
#if WIN32
|
||||
#if MSVC
|
||||
extern int32 fps_scale;
|
||||
#else
|
||||
int32 fps_scale=256;
|
||||
|
|
|
@ -259,7 +259,7 @@ static int ReadStateChunks(FILE *st, int32 totalsize)
|
|||
extern uint8 *XBackBuf;
|
||||
if(size != fread(XBackBuf,1,size,st))
|
||||
ret = 0;
|
||||
#ifdef WIN32
|
||||
#ifdef MSVC
|
||||
else
|
||||
{
|
||||
FCEUD_BlitScreen(XBuf);
|
||||
|
|
|
@ -23,7 +23,7 @@ void FCEU_WriteWaveData(int32 *Buffer, int Count)
|
|||
int16 *dest;
|
||||
int x;
|
||||
|
||||
#ifndef WIN32
|
||||
#ifndef MSVC
|
||||
if(!soundlog) return;
|
||||
#else
|
||||
if(!soundlog && !FCEUI_AviIsRecording()) return;
|
||||
|
@ -45,7 +45,7 @@ void FCEU_WriteWaveData(int32 *Buffer, int Count)
|
|||
if(soundlog)
|
||||
wsize+=fwrite(temp,1,Count*sizeof(int16),soundlog);
|
||||
|
||||
#ifdef WIN32
|
||||
#ifdef MSVC
|
||||
if(FCEUI_AviIsRecording())
|
||||
{
|
||||
extern int bittage;
|
||||
|
|
Loading…
Reference in New Issue