summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorradius <andres.430@gmail.com>2019-04-10 15:17:59 -0500
committertwinaphex <libretro@gmail.com>2021-03-12 08:40:26 +0100
commitf0a4e31eaad0bf6f53a9b8d056ea6e9ad88485cc (patch)
tree951e39e639664fa9d682cd81f332d5f8b7099fb8
parent8422492902da2897559d6d700fe9be3644f23f78 (diff)
add libretro makefile
-rw-r--r--Makefile.libretro39
1 files changed, 39 insertions, 0 deletions
diff --git a/Makefile.libretro b/Makefile.libretro
new file mode 100644
index 0000000..afe6019
--- /dev/null
+++ b/Makefile.libretro
@@ -0,0 +1,39 @@
+UNAME=$(shell uname -s)
+UNAMEM=$(shell uname -m)
+
+platform ?= unix
+ifneq ($(findstring MINGW64,$(UNAME)),)
+ platform = win
+ OS :=Windows
+ CC :=gcc
+ ABI := x86_64
+ target = libblastem.dll
+ libname = blastem_libretro.dll
+else ifneq ($(findstring MINGW32,$(UNAME)),)
+ platform = win
+ OS :=Windows
+ CC :=gcc
+ ABI := i686
+ target = libblastem.dll
+ libname = blastem_libretro.dll
+else ifneq ($(findstring Darwin,$(UNAME)),)
+ platform = osx
+else
+ platform = linux
+ OS :=Linux
+ CC :=gcc
+ ABI := x86_64
+ target = libblastem.so
+ libname = blastem_libretro.so
+endif
+
+
+
+core: $(OBJ)
+ make $(target) OS=$(OS) CC=$(CC) CPU=$(ABI)
+ cp -v $(target) $(libname)
+
+.PHONY: clean
+
+clean:
+ make clean