mirror of
https://git.do.srb2.org/KartKrew/Kart-Public.git
synced 2024-11-14 00:40:46 +00:00
Merge branch 'zlib-split' into 'master'
Makefile: Split zlib and libpng See merge request STJr/SRB2!285
This commit is contained in:
commit
1115f41f8e
3 changed files with 25 additions and 22 deletions
22
src/Makefile
22
src/Makefile
|
@ -66,6 +66,7 @@
|
|||
# Compile without 3D sound support, add 'NOHS=1'
|
||||
# Compile with GDBstubs, add 'RDB=1'
|
||||
# Compile without PNG, add 'NOPNG=1'
|
||||
# Compile without zlib, add 'NOZLIB=1'
|
||||
#
|
||||
# Addon for SDL:
|
||||
# To Cross-Compile, add 'SDL_CONFIG=/usr/*/bin/sdl-config'
|
||||
|
@ -119,6 +120,7 @@ include Makefile.cfg
|
|||
|
||||
ifdef DUMMY
|
||||
NOPNG=1
|
||||
NOZLIB=1
|
||||
NONET=1
|
||||
NOHW=1
|
||||
NOHS=1
|
||||
|
@ -199,6 +201,7 @@ endif
|
|||
|
||||
ifdef NDS
|
||||
NOPNG=1
|
||||
NOZLIB=1
|
||||
NONET=1
|
||||
#NOHW=1
|
||||
NOHS=1
|
||||
|
@ -325,13 +328,6 @@ LIBS+=$(PNG_LDFLAGS)
|
|||
CFLAGS+=$(PNG_CFLAGS)
|
||||
endif
|
||||
|
||||
ZLIB_PKGCONFIG?=zlib
|
||||
ZLIB_CFLAGS?=$(shell $(PKG_CONFIG) $(ZLIB_PKGCONFIG) --cflags)
|
||||
ZLIB_LDFLAGS?=$(shell $(PKG_CONFIG) $(ZLIB_PKGCONFIG) --libs)
|
||||
|
||||
LIBS+=$(ZLIB_LDFLAGS)
|
||||
CFLAGS+=$(ZLIB_CFLAGS)
|
||||
|
||||
ifdef HAVE_LIBGME
|
||||
OPTS+=-DHAVE_LIBGME
|
||||
|
||||
|
@ -343,6 +339,18 @@ LIBS+=$(LIBGME_LDFLAGS)
|
|||
CFLAGS+=$(LIBGME_CFLAGS)
|
||||
endif
|
||||
|
||||
ifndef NOZLIB
|
||||
OPTS+=-DHAVE_ZLIB
|
||||
ZLIB_PKGCONFIG?=zlib
|
||||
ZLIB_CFLAGS?=$(shell $(PKG_CONFIG) $(ZLIB_PKGCONFIG) --cflags)
|
||||
ZLIB_LDFLAGS?=$(shell $(PKG_CONFIG) $(ZLIB_PKGCONFIG) --libs)
|
||||
|
||||
LIBS+=$(ZLIB_LDFLAGS)
|
||||
CFLAGS+=$(ZLIB_CFLAGS)
|
||||
else
|
||||
NOPNG=1
|
||||
endif
|
||||
|
||||
ifdef STATIC
|
||||
LIBS:=-static $(LIBS)
|
||||
endif
|
||||
|
|
|
@ -38,10 +38,8 @@
|
|||
#include "gme/gme.h"
|
||||
#define GME_TREBLE 5.0
|
||||
#define GME_BASS 1.0
|
||||
#ifdef HAVE_PNG /// TODO: compile with zlib support without libpng
|
||||
|
||||
#define HAVE_ZLIB
|
||||
|
||||
#ifdef HAVE_ZLIB
|
||||
#ifndef _MSC_VER
|
||||
#ifndef _LARGEFILE64_SOURCE
|
||||
#define _LARGEFILE64_SOURCE
|
||||
|
@ -57,8 +55,8 @@
|
|||
#endif
|
||||
|
||||
#include "zlib.h"
|
||||
#endif
|
||||
#endif
|
||||
#endif // HAVE_ZLIB
|
||||
#endif // HAVE_LIBGME
|
||||
|
||||
UINT8 sound_started = false;
|
||||
|
||||
|
@ -362,7 +360,7 @@ void *I_GetSfx(sfxinfo_t *sfx)
|
|||
}
|
||||
Z_Free(inflatedData); // GME didn't open jack, but don't let that stop us from freeing this up
|
||||
#else
|
||||
//CONS_Alert(CONS_ERROR,"Cannot decompress VGZ; no zlib support\n");
|
||||
return NULL; // No zlib support
|
||||
#endif
|
||||
}
|
||||
// Try to read it as a GME sound
|
||||
|
@ -645,7 +643,8 @@ boolean I_StartDigSong(const char *musicname, boolean looping)
|
|||
}
|
||||
Z_Free(inflatedData); // GME didn't open jack, but don't let that stop us from freeing this up
|
||||
#else
|
||||
//CONS_Alert(CONS_ERROR,"Cannot decompress VGZ; no zlib support\n");
|
||||
CONS_Alert(CONS_ERROR,"Cannot decompress VGZ; no zlib support\n");
|
||||
return true;
|
||||
#endif
|
||||
}
|
||||
else if (!gme_open_data(data, len, &gme, 44100))
|
||||
|
@ -874,4 +873,4 @@ void I_UnRegisterSong(INT32 handle)
|
|||
music = NULL;
|
||||
}
|
||||
|
||||
#endif
|
||||
#endif
|
|
@ -17,17 +17,13 @@
|
|||
#include "gme/gme.h"
|
||||
#define GME_TREBLE 5.0
|
||||
#define GME_BASS 1.0
|
||||
#ifdef HAVE_PNG /// TODO: compile with zlib support without libpng
|
||||
|
||||
#define HAVE_ZLIB
|
||||
|
||||
#ifdef HAVE_ZLIB
|
||||
#ifndef _MSC_VER
|
||||
#ifndef _WII
|
||||
#ifndef _LARGEFILE64_SOURCE
|
||||
#define _LARGEFILE64_SOURCE
|
||||
#endif
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifndef _LFS64_LARGEFILE
|
||||
#define _LFS64_LARGEFILE
|
||||
|
@ -38,8 +34,8 @@
|
|||
#endif
|
||||
|
||||
#include "zlib.h"
|
||||
#endif
|
||||
#endif
|
||||
#endif // HAVE_ZLIB
|
||||
#endif // HAVE_LIBGME
|
||||
|
||||
static FMOD_SYSTEM *fsys;
|
||||
static FMOD_SOUND *music_stream;
|
||||
|
|
Loading…
Reference in a new issue