get rid of the silly unzip_stream
[picodrive.git] / Makefile
index d31779c..0d37237 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -2,7 +2,7 @@ TARGET ?= PicoDrive
 CFLAGS += -Wall -ggdb -falign-functions=2
 CFLAGS += -I.
 ifndef DEBUG
-CFLAGS += -O2 -DNDEBUG -ffunction-sections
+CFLAGS += -O3 -DNDEBUG -ffunction-sections
 ifeq ($(findstring clang,$(CC)),)
 LDFLAGS += -Wl,--gc-sections
 endif
@@ -73,6 +73,18 @@ OBJS += platform/opendingux/inputmap.o
 # OpenDingux is a generic platform, really.
 PLATFORM := generic
 endif
+ifeq ("$(PLATFORM)",$(filter "$(PLATFORM)","rpi1" "rpi2"))
+CFLAGS += -DHAVE_GLES -DRASPBERRY
+CFLAGS += -I/opt/vc/include/ -I/opt/vc/include/interface/vcos/pthreads/ -I/opt/vc/include/interface/vmcs_host/linux/
+LDFLAGS += -ldl -lbcm_host -L/opt/vc/lib -lEGL -lGLESv2
+OBJS += platform/linux/emu.o platform/linux/blit.o # FIXME
+OBJS += platform/common/plat_sdl.o
+OBJS += platform/libpicofe/plat_sdl.o platform/libpicofe/in_sdl.o
+OBJS += platform/libpicofe/plat_dummy.o
+OBJS += platform/libpicofe/gl.o
+OBJS += platform/libpicofe/gl_platform.o
+USE_FRONTEND = 1
+endif
 ifeq "$(PLATFORM)" "generic"
 OBJS += platform/linux/emu.o platform/linux/blit.o # FIXME
 OBJS += platform/common/plat_sdl.o
@@ -156,7 +168,7 @@ endif
 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
 # unzip
-OBJS += unzip/unzip.o unzip/unzip_stream.o
+OBJS += unzip/unzip.o
 
 
 include platform/common/common.mak
@@ -197,6 +209,12 @@ pico/cd/pcm.o: CFLAGS += -fno-strict-aliasing
 pico/cd/LC89510.o: CFLAGS += -fno-strict-aliasing
 pico/cd/gfx_cd.o: CFLAGS += -fno-strict-aliasing
 
+# fame needs ~2GB of RAM to compile on gcc 4.8
+# on x86, this is reduced by ~300MB when debug info is off (but not on ARM)
+# not using O3 and -fno-expensive-optimizations seems to also help, but you may
+# want to remove this stuff for better performance if your compiler can handle it
+cpu/fame/famec.o: CFLAGS += -g0 -O2 -fno-expensive-optimizations
+
 # random deps
 pico/carthw/svp/compiler.o : cpu/drc/emit_$(ARCH).c
 cpu/sh2/compiler.o : cpu/drc/emit_$(ARCH).c