From 917a47e022495be79c60328a7ae60f5c25b3b298 Mon Sep 17 00:00:00 2001 From: twinaphex Date: Fri, 6 Mar 2015 11:34:29 +0100 Subject: Create linux-portable target --- Makefile.libretro | 22 +++++++++++++++++----- 1 file changed, 17 insertions(+), 5 deletions(-) diff --git a/Makefile.libretro b/Makefile.libretro index d566e23..2210e9c 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 -- cgit v1.2.3