From d8e4cc4967b01ab48b1ca93994ffa39f8707fad0 Mon Sep 17 00:00:00 2001 From: twinaphex Date: Fri, 24 Mar 2017 08:54:08 +0100 Subject: [PATCH] Cleanups --- Makefile.libretro | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/Makefile.libretro b/Makefile.libretro index ade5bc66..9b681911 100644 --- a/Makefile.libretro +++ b/Makefile.libretro @@ -23,6 +23,7 @@ AS ?= as CC_AS ?= $(CC) CFLAGS ?= +STATIC_LINKING:= 0 TARGET_NAME := picodrive LIBM := -lm GIT_VERSION := " $(shell git rev-parse --short HEAD || echo unknown)" @@ -39,9 +40,15 @@ asm_cdmemory = 0 asm_mix = 0 fpic := + +ifeq ($(STATIC_LINKING),1) +EXT=a +endif + # Unix ifeq ($(platform), unix) - TARGET := $(TARGET_NAME)_libretro.so + EXT ?= so + TARGET := $(TARGET_NAME)_libretro.$(EXT) fpic := -fPIC SHARED := -shared DONT_COMPILE_IN_ZLIB = 1 @@ -49,7 +56,8 @@ ifeq ($(platform), unix) # Portable Linux else ifeq ($(platform), linux-portable) - TARGET := $(TARGET_NAME)_libretro.so + EXT ?= so + TARGET := $(TARGET_NAME)_libretro.$(EXT) SHARED := -shared -nostdlib fpic := -fPIC LIBM := @@ -58,7 +66,8 @@ else ifeq ($(platform), linux-portable) # OS X else ifeq ($(platform), osx) - TARGET := $(TARGET_NAME)_libretro.dylib + EXT ?= dylib + TARGET := $(TARGET_NAME)_libretro.$(EXT) SHARED := -dynamiclib fpic := -fPIC APPLE := 1 -- 2.39.5