From: twinaphex Date: Fri, 6 Mar 2015 10:34:29 +0000 (+0100) Subject: Create linux-portable target X-Git-Tag: r24l~888 X-Git-Url: https://notaz.gp2x.de/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=917a47e022495be79c60328a7ae60f5c25b3b298;p=pcsx_rearmed.git Create linux-portable target --- diff --git a/Makefile.libretro b/Makefile.libretro index d566e23a..2210e9cf 100644 --- a/Makefile.libretro +++ b/Makefile.libretro @@ -20,8 +20,12 @@ CC_AS ?= $(CC) CFLAGS ?= TARGET_NAME := pcsx_rearmed - +LIBM := -lm +LIBZ := -lz +LIBPTHREAD := -lpthread +LIBDL := -ldl MMAP_WIN32=0 +EXTRA_LDFLAGS = # Unix ifeq ($(platform), unix) @@ -29,6 +33,15 @@ ifeq ($(platform), unix) fpic := -fPIC SHARED := -shared -Wl,--version-script=libretro/link.T +else ifeq ($(platform), linux-portable) + TARGET := $(TARGET_NAME)_libretro.so + fpic := -fPIC -nostdlib + EXTRA_LDFLAGS += -fPIC -nostdlib + LIBM := + LIBZ := + LIBPTHREAD := + LIBDL := + SHARED := -shared -Wl,--version-script=libretro/link.T # OS X else ifeq ($(platform), osx) TARGET := $(TARGET_NAME)_libretro.dylib @@ -175,12 +188,11 @@ CFLAGS += -fPIC ifeq ($(platform),win) MAIN_LDLIBS += -lws2_32 else ifneq ($(platform),qnx) - LDLIBS += -lpthread - MAIN_LDLIBS += -ldl + LDLIBS += $(LIBPHTREAD) + MAIN_LDLIBS += $(LIBDL) endif MAIN_LDFLAGS += -shared -MAIN_LDLIBS += -lm -lz -EXTRA_LDFLAGS = +MAIN_LDLIBS += $(LIBM) $(LIBZ) TARGET ?= libretro.so PLATFORM = libretro