RetroArch/libretro-db/Makefile

60 lines
1.3 KiB
Makefile
Raw Normal View History

2014-12-30 22:14:40 +00:00
CFLAGS = -g
INCFLAGS = -I. -I../libretro-common/include
2015-01-07 17:34:37 +00:00
LUA_CONVERTER_OBJ = rmsgpack.o \
2014-12-30 20:02:15 +00:00
rmsgpack_dom.o \
2015-01-19 21:47:09 +00:00
lua_common.o \
2015-01-23 04:59:47 +00:00
libretrodb.o \
2014-12-30 20:02:15 +00:00
bintree.o \
2015-01-19 21:47:09 +00:00
query.o \
2015-01-07 17:34:37 +00:00
lua_converter.o \
2015-01-20 00:05:45 +00:00
compat_fnmatch.c \
2014-12-30 20:02:15 +00:00
$(NULL)
2015-01-07 17:34:37 +00:00
2014-12-30 20:02:15 +00:00
RARCHDB_TOOL_OBJ = rmsgpack.o \
2015-01-19 21:47:09 +00:00
rmsgpack_dom.o \
2015-01-23 04:59:47 +00:00
libretrodb_tool.o \
2015-01-19 21:47:09 +00:00
bintree.o \
query.o \
2015-01-23 04:59:47 +00:00
libretrodb.o \
2015-01-20 00:05:45 +00:00
compat_fnmatch.c \
2015-01-19 21:47:09 +00:00
$(NULL)
TESTLIB_C = testlib.c \
lua_common.c \
query.c \
2015-01-20 00:05:45 +00:00
compat_fnmatch.c \
2015-01-23 04:59:47 +00:00
libretrodb.c \
2015-01-19 21:47:09 +00:00
bintree.c \
rmsgpack.c \
rmsgpack_dom.c \
$(NULL)
2014-12-30 20:02:15 +00:00
2015-01-07 17:34:37 +00:00
LUA_FLAGS = `pkg-config lua --libs`
2015-01-19 21:47:09 +00:00
TESTLIB_FLAGS = ${CFLAGS} ${LUA_FLAGS} -shared -fpic
.PHONY: all clean check
2015-01-07 17:34:37 +00:00
2015-01-23 04:59:47 +00:00
all: rmsgpack_test libretrodb_tool lua_converter
2014-12-30 20:02:15 +00:00
%.o: %.c
2014-12-30 20:45:03 +00:00
${CC} $(INCFLAGS) $< -c ${CFLAGS} -o $@
2014-12-30 20:02:15 +00:00
2015-01-07 17:34:37 +00:00
lua_converter: ${LUA_CONVERTER_OBJ}
${CC} $(INCFLAGS) ${LUA_CONVERTER_OBJ} ${LUA_FLAGS} -o $@
2014-12-30 20:02:15 +00:00
2015-01-23 04:59:47 +00:00
libretrodb_tool: ${RARCHDB_TOOL_OBJ}
2014-12-30 20:45:03 +00:00
${CC} $(INCFLAGS) ${RARCHDB_TOOL_OBJ} -o $@
2014-12-30 20:02:15 +00:00
rmsgpack_test:
2014-12-30 22:14:40 +00:00
${CC} $(INCFLAGS) rmsgpack.c rmsgpack_test.c -g -o $@
2015-01-19 21:47:09 +00:00
testlib.so: ${TESTLIB_C}
${CC} ${INCFLAGS} ${TESTLIB_FLAGS} ${TESTLIB_C} -o $@
check: testlib.so tests.lua
lua ./tests.lua
2014-12-30 20:02:15 +00:00
clean:
2015-01-23 04:59:47 +00:00
rm -rf *.o rmsgpack_test lua_converter libretrodb_tool testlib.so