From: notaz Date: Sun, 16 Apr 2017 21:34:00 +0000 (+0300) Subject: use system's zlib X-Git-Tag: v1.92~65 X-Git-Url: https://notaz.gp2x.de/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=325ee167fd00e070f0e5ab6319880aa3ecbc3062;p=picodrive.git use system's zlib except for libretro github issue #45 --- diff --git a/Makefile b/Makefile index 0d37237c..30b246fd 100644 --- a/Makefile +++ b/Makefile @@ -164,9 +164,12 @@ else OBJS += platform/common/mp3_dummy.o endif +ifeq "$(PLATFORM)" "libretro" # zlib OBJS += zlib/gzio.o zlib/inffast.o zlib/inflate.o zlib/inftrees.o zlib/trees.o \ zlib/deflate.o zlib/crc32.o zlib/adler32.o zlib/zutil.o zlib/compress.o zlib/uncompr.o +CFLAGS += -Izlib +endif # unzip OBJS += unzip/unzip.o diff --git a/configure b/configure index 6cc42545..35130cb8 100755 --- a/configure +++ b/configure @@ -258,7 +258,7 @@ check_zlib() #include int main(void) { uncompress(0, 0, 0, 0); } EOF - compile_binary + compile_binary "$@" } check_libpng() @@ -308,8 +308,8 @@ EOF compile_object "$@" } -#MAIN_LDLIBS="$MAIN_LDLIBS -lz" -#check_zlib || fail "please install zlib (libz-dev)" +MAIN_LDLIBS="$MAIN_LDLIBS -lz" +check_zlib -lz || fail "please install zlib (libz-dev)" MAIN_LDLIBS="-lpng $MAIN_LDLIBS" check_libpng || fail "please install libpng (libpng-dev)" diff --git a/pico/cart.c b/pico/cart.c index 377ecbc2..bb452c0b 100644 --- a/pico/cart.c +++ b/pico/cart.c @@ -8,9 +8,9 @@ */ #include "pico_int.h" -#include "../zlib/zlib.h" #include "../cpu/debug.h" #include "../unzip/unzip.h" +#include static int rom_alloc_size; diff --git a/pico/state.c b/pico/state.c index 089957eb..88b8655c 100644 --- a/pico/state.c +++ b/pico/state.c @@ -7,7 +7,7 @@ */ #include "pico_int.h" -#include +#include #include "../cpu/sh2/sh2.h" #include "sound/ym2612.h" diff --git a/platform/gizmondo/menu.c b/platform/gizmondo/menu.c index d4f6bd49..dd6740a3 100644 --- a/platform/gizmondo/menu.c +++ b/platform/gizmondo/menu.c @@ -32,7 +32,7 @@ #include #include -#include +#include #define gizKeyUnkn "???" diff --git a/platform/gp2x/emu.c b/platform/gp2x/emu.c index 244f15d9..7741ba60 100644 --- a/platform/gp2x/emu.c +++ b/platform/gp2x/emu.c @@ -30,7 +30,7 @@ #include #include #include -#include +#include #ifdef BENCHMARK #define OSD_FPS_X 220 diff --git a/platform/psp/menu.c b/platform/psp/menu.c index 24c6d606..f01f0ae5 100644 --- a/platform/psp/menu.c +++ b/platform/psp/menu.c @@ -33,7 +33,7 @@ #include #include -#include +#include #define pspKeyUnkn "???" diff --git a/unzip/unzip.c b/unzip/unzip.c index ddf59aa6..10291652 100644 --- a/unzip/unzip.c +++ b/unzip/unzip.c @@ -5,7 +5,7 @@ #include #include -#include "zlib/zlib.h" +#include /* public globals */ //int gUnzipQuiet = 0; /* flag controls error messages */