summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorMike Pavone <pavone@retrodev.com>2019-03-31 12:37:28 -0700
committerMike Pavone <pavone@retrodev.com>2019-03-31 12:37:28 -0700
commit29c09f60a90009ef4f44059ff33781d2eacb4478 (patch)
tree1a6e4b0f442d60404eceb127901fd5904fb4ca8a /Makefile
parenta1cb391a04823815561329aa3171c491a8bffad6 (diff)
Include ROM DB in library binary for libretro target
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile8
1 files changed, 7 insertions, 1 deletions
diff --git a/Makefile b/Makefile
index b1fa48a..c0965c3 100644
--- a/Makefile
+++ b/Makefile
@@ -1,3 +1,6 @@
+#disable built-in rules
+.SUFFIXES :
+
ifndef OS
OS:=$(shell uname -s)
endif
@@ -203,7 +206,7 @@ MAINOBJS=blastem.o system.o genesis.o debug.o gdb_remote.o vdp.o $(RENDEROBJS) i
LIBOBJS=libblastem.o system.o genesis.o debug.o gdb_remote.o vdp.o io.o romdb.o hash.o menu.o xband.o realtec.o \
i2c.o nor.o sega_mapper.o multi_game.o megawifi.o $(NET) serialize.o $(TERMINAL) $(CONFIGOBJS) gst.o \
- $(M68KOBJS) $(TRANSOBJS) $(AUDIOOBJS) saves.o jcart.o
+ $(M68KOBJS) $(TRANSOBJS) $(AUDIOOBJS) saves.o jcart.o rom.db.o
ifdef NONUKLEAR
CFLAGS+= -DDISABLE_NUKLEAR
@@ -325,6 +328,9 @@ vos_prog_info : vos_prog_info.o vos_program_module.o
%.c : %.cpu cpu_dsl.py
./cpu_dsl.py -d goto $< > $@
+%.db.c : %.db
+ sed $< -e 's/"/\\"/g' -e 's/^\(.*\)$$/"\1\\n"/' -e'1s/^\(.*\)$$/const char $(shell echo $< | tr '.' '_')_data[] = \1/' -e '$$s/^\(.*\)$$/\1;/' > $@
+
%.o : %.S
$(CC) -c -o $@ $<