aboutsummaryrefslogtreecommitdiff
path: root/Makefile.libretro
diff options
context:
space:
mode:
authornotaz2016-07-10 02:09:08 +0300
committernotaz2016-07-10 02:10:24 +0300
commit4e0771f57fdc6d3410a11c7731d9e8dbc3c026f6 (patch)
tree7f8f548d813bb4c0934dcdda24d9b39dd2b730f2 /Makefile.libretro
parent7e89e240045b5c4145f24387ae993c87e32640fb (diff)
downloadpcsx_rearmed-4e0771f57fdc6d3410a11c7731d9e8dbc3c026f6.tar.gz
pcsx_rearmed-4e0771f57fdc6d3410a11c7731d9e8dbc3c026f6.tar.bz2
pcsx_rearmed-4e0771f57fdc6d3410a11c7731d9e8dbc3c026f6.zip
libretro: try to prevent bad builds
Diffstat (limited to 'Makefile.libretro')
-rw-r--r--Makefile.libretro11
1 files changed, 11 insertions, 0 deletions
diff --git a/Makefile.libretro b/Makefile.libretro
index 2abe711..26ee336 100644
--- a/Makefile.libretro
+++ b/Makefile.libretro
@@ -267,6 +267,17 @@ endif
MAIN_LDFLAGS += -shared
MAIN_LDLIBS += $(LIBM) $(LIBZ)
+# try to autodetect stuff for the lazy
+ifndef ARCH
+ARCH = $(shell $(CC) -dumpmachine | awk -F- '{print $$1}')
+endif
+ifndef HAVE_NEON
+HAVE_NEON = $(shell $(CC) -E -dD - < /dev/null 2> /dev/null | grep -q __ARM_NEON__ && echo 1 || echo 0)
+endif
+ifeq ($(shell ld -v 2> /dev/null | awk '{print $$1}'),GNU)
+MAIN_LDFLAGS += -Wl,--no-undefined
+endif
+
TARGET ?= libretro.so
PLATFORM = libretro
BUILTIN_GPU ?= peops