2016-01-23 04:10:19 +01:00
|
|
|
DEBUG = 0
|
2016-03-21 18:16:05 +01:00
|
|
|
LIBRETRODB_DIR := .
|
2016-09-16 17:33:18 +02:00
|
|
|
LIBRETRO_COMM_DIR := ../libretro-common
|
|
|
|
INCFLAGS = -I. -I$(LIBRETRO_COMM_DIR)/include
|
2015-09-17 07:01:34 +02:00
|
|
|
|
2016-01-26 09:34:43 +01:00
|
|
|
TARGETS = rmsgpack_test libretrodb_tool c_converter
|
2016-01-23 01:07:35 +01:00
|
|
|
|
2016-01-23 04:10:19 +01:00
|
|
|
ifeq ($(DEBUG), 1)
|
|
|
|
CFLAGS = -g -O0 -Wall
|
|
|
|
else
|
|
|
|
CFLAGS = -g -O2 -Wall -DNDEBUG
|
|
|
|
endif
|
|
|
|
|
2016-03-20 16:29:14 +01:00
|
|
|
LIBRETRO_COMMON_C = \
|
2016-09-16 17:33:18 +02:00
|
|
|
$(LIBRETRO_COMM_DIR)/streams/file_stream.c
|
2016-03-20 16:29:14 +01:00
|
|
|
|
2016-01-23 01:51:09 +01:00
|
|
|
C_CONVERTER_C = \
|
2016-03-21 18:16:05 +01:00
|
|
|
$(LIBRETRODB_DIR)/rmsgpack.c \
|
|
|
|
$(LIBRETRODB_DIR)/rmsgpack_dom.c \
|
|
|
|
$(LIBRETRODB_DIR)/libretrodb.c \
|
|
|
|
$(LIBRETRODB_DIR)/bintree.c \
|
|
|
|
$(LIBRETRODB_DIR)/query.c \
|
|
|
|
$(LIBRETRODB_DIR)/c_converter.c \
|
2016-09-16 17:33:18 +02:00
|
|
|
$(LIBRETRO_COMM_DIR)/hash/rhash.c \
|
|
|
|
$(LIBRETRO_COMM_DIR)/compat/compat_fnmatch.c \
|
2016-09-17 01:42:52 +02:00
|
|
|
$(LIBRETRO_COMM_DIR)/string/stdstring.c \
|
2016-03-20 16:29:14 +01:00
|
|
|
$(LIBRETRO_COMMON_C) \
|
2016-09-16 17:33:18 +02:00
|
|
|
$(LIBRETRO_COMM_DIR)/compat/compat_strl.c
|
2016-01-23 01:51:09 +01:00
|
|
|
|
|
|
|
C_CONVERTER_OBJS := $(C_CONVERTER_C:.c=.o)
|
|
|
|
|
2015-09-17 07:01:34 +02:00
|
|
|
RARCHDB_TOOL_C = \
|
2016-03-21 18:16:05 +01:00
|
|
|
$(LIBRETRODB_DIR)/rmsgpack.c \
|
|
|
|
$(LIBRETRODB_DIR)/rmsgpack_dom.c \
|
|
|
|
$(LIBRETRODB_DIR)/libretrodb_tool.c \
|
|
|
|
$(LIBRETRODB_DIR)/bintree.c \
|
|
|
|
$(LIBRETRODB_DIR)/query.c \
|
|
|
|
$(LIBRETRODB_DIR)/libretrodb.c \
|
2016-09-16 17:33:18 +02:00
|
|
|
$(LIBRETRO_COMM_DIR)/compat/compat_fnmatch.c \
|
2016-09-17 01:42:52 +02:00
|
|
|
$(LIBRETRO_COMM_DIR)/string/stdstring.c \
|
2016-03-20 16:29:14 +01:00
|
|
|
$(LIBRETRO_COMMON_C) \
|
2016-09-16 17:33:18 +02:00
|
|
|
$(LIBRETRO_COMM_DIR)/compat/compat_strl.c
|
2015-09-17 07:01:34 +02:00
|
|
|
|
|
|
|
RARCHDB_TOOL_OBJS := $(RARCHDB_TOOL_C:.c=.o)
|
|
|
|
|
2015-09-17 19:57:51 +02:00
|
|
|
RMSGPACK_C = \
|
2016-03-21 18:16:05 +01:00
|
|
|
$(LIBRETRODB_DIR)/rmsgpack.c \
|
|
|
|
$(LIBRETRODB_DIR)/rmsgpack_test.c \
|
2016-03-20 16:29:14 +01:00
|
|
|
$(LIBRETRO_COMMON_C)
|
2015-09-17 19:57:51 +02:00
|
|
|
|
|
|
|
RMSGPACK_OBJS := $(RMSGPACK_C:.c=.o)
|
|
|
|
|
2016-01-26 09:34:43 +01:00
|
|
|
TESTLIB_FLAGS = $(CFLAGS) -shared -fpic
|
2015-01-19 22:47:09 +01:00
|
|
|
|
2016-01-26 09:34:43 +01:00
|
|
|
.PHONY: all clean
|
2015-01-07 18:34:37 +01:00
|
|
|
|
2016-01-23 01:07:35 +01:00
|
|
|
all: $(TARGETS)
|
2014-12-30 21:02:15 +01:00
|
|
|
|
|
|
|
%.o: %.c
|
2016-01-23 01:07:35 +01:00
|
|
|
$(CC) $(INCFLAGS) $< -c $(CFLAGS) -o $@
|
2014-12-30 21:02:15 +01:00
|
|
|
|
2016-01-23 01:51:09 +01:00
|
|
|
c_converter: $(C_CONVERTER_OBJS)
|
|
|
|
$(CC) $(INCFLAGS) $(C_CONVERTER_OBJS) $(CFLAGS) -o $@
|
|
|
|
|
2016-01-23 01:07:35 +01:00
|
|
|
libretrodb_tool: $(RARCHDB_TOOL_OBJS)
|
|
|
|
$(CC) $(INCFLAGS) $(RARCHDB_TOOL_OBJS) -o $@
|
2014-12-30 21:02:15 +01:00
|
|
|
|
2015-09-17 19:57:51 +02:00
|
|
|
rmsgpack_test: $(RMSGPACK_OBJS)
|
2016-01-23 01:07:35 +01:00
|
|
|
$(CC) $(INCFLAGS) $(RMSGPACK_OBJS) -g -o $@
|
2015-01-19 22:47:09 +01:00
|
|
|
|
2014-12-30 21:02:15 +01:00
|
|
|
clean:
|
2016-01-26 09:36:00 +01:00
|
|
|
rm -rf $(TARGETS) $(C_CONVERTER_OBJS) $(RARCHDB_TOOL_OBJS) $(RMSGPACK_OBJS) $(TESTLIB_OBJS)
|