Files
RetroArch/libretro-db/lua/Makefile
LibretroAdmin 367b717681 buildsystem: rstrtod in the nested sample and tool trees too
The previous sweep enumerated makefiles by pattern at the repository
root and under libretro-common/samples, and missed every nested build
tree: libretro-db and its two sample tests (the reported failures), the
top-level samples/ tree for gfx, menu, playlist, and tasks including
the four http stress makefile variants, and the standalone makefiles of
the bundled ffmpeg, imageviewer, and net-retropad cores. This pass
enumerated by find across the whole repository instead, and every
source list linking config_file.c, file_stream.c, or rjson.c now
carries string/rstrtod.c -- 24 more makefiles.

All of them build with the sanitizer arguments the workflows pass, and
the two tests the libretro-db job executes build and run clean. Two
directories fail identically on the pristine upstream tree and are
untouched here: libretro-db/lua's rmsgpack_test wants intfstream
objects it does not link, and samples/gfx/font_lifecycle references
video_driver_thread_wrapper_active, which no longer exists.
2026-08-22 13:54:32 +02:00

93 lines
2.7 KiB
Makefile

DEBUG = 0
LIBRETRODB_DIR := ../
LIBRETRO_COMMON_DIR := ../../libretro-common
INCFLAGS = -I. -I$(LIBRETRODB_DIR) -I$(LIBRETRO_COMMON_DIR)/include
TARGETS = rmsgpack_test libretrodb_tool lua_converter
ifeq ($(DEBUG), 1)
CFLAGS = -g -O0 -Wall
else
CFLAGS = -g -O2 -Wall -DNDEBUG
endif
LUA_CONVERTER_C = \
$(LIBRETRODB_DIR)/rmsgpack.c \
$(LIBRETRODB_DIR)/rmsgpack_dom.c \
lua_common.c \
$(LIBRETRODB_DIR)/libretrodb.c \
$(LIBRETRODB_DIR)/bintree.c \
$(LIBRETRODB_DIR)/query.c \
lua_converter.c \
$(LIBRETRO_COMMON_DIR)/compat/compat_fnmatch.c \
$(LIBRETRO_COMMON_DIR)/streams/file_stream.c \
$(LIBRETRO_COMMON_DIR)/string/rstrtod.c \
$(LIBRETRO_COMMON_DIR)/compat/compat_strl.c
LUA_CONVERTER_OBJS := $(LUA_CONVERTER_C:.c=.o)
RARCHDB_TOOL_C = \
$(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 \
$(LIBRETRO_COMMON_DIR)/compat/compat_fnmatch.c \
$(LIBRETRO_COMMON_DIR)/streams/file_stream.c \
$(LIBRETRO_COMMON_DIR)/string/rstrtod.c \
$(LIBRETRO_COMMON_DIR)/compat/compat_strl.c
RARCHDB_TOOL_OBJS := $(RARCHDB_TOOL_C:.c=.o)
TESTLIB_C = \
testlib.c \
$(LIBRETRODB_DIR)/query.c \
($LIBRETRODB_DIR)/libretrodb.c \
$(LIBRETRODB_DIR)/bintree.c \
$(LIBRETRODB_DIR)/rmsgpack.c \
$(LIBRETRODB_DIR)/rmsgpack_dom.c \
$(LIBRETRO_COMMON_DIR)/compat/compat_fnmatch.c \
$(LIBRETRO_COMMON_DIR)/streams/file_stream.c \
$(LIBRETRO_COMMON_DIR)/string/rstrtod.c \
$(LIBRETRO_COMMON_DIR)/compat/compat_strl.c
TESTLIB_OBJS := $(TESTLIB_C:.c=.o)
RMSGPACK_C = \
$(LIBRETRODB_DIR)/rmsgpack.c \
$(LIBRETRODB_DIR)/rmsgpack_test.c \
$(LIBRETRO_COMMON_DIR)/streams/file_stream.c \
$(LIBRETRO_COMMON_DIR)/string/rstrtod.c
RMSGPACK_OBJS := $(RMSGPACK_C:.c=.o)
LUA_FLAGS = `pkg-config lua --libs`
TESTLIB_FLAGS = $(CFLAGS) $(LUA_FLAGS) -shared -fpic
.PHONY: all clean check
all: $(TARGETS)
%.o: %.c
$(CC) $(INCFLAGS) $< -c $(CFLAGS) -o $@
lua_converter: $(LUA_CONVERTER_OBJS)
$(CC) $(INCFLAGS) $(LUA_CONVERTER_OBJS) $(LUA_FLAGS) -o $@
libretrodb_tool: $(RARCHDB_TOOL_OBJS)
$(CC) $(INCFLAGS) $(RARCHDB_TOOL_OBJS) -o $@
rmsgpack_test: $(RMSGPACK_OBJS)
$(CC) $(INCFLAGS) $(RMSGPACK_OBJS) -g -o $@
testlib.so: CFLAGS += -fPIC
testlib.so: clean $(TESTLIB_OBJS)
$(CC) $(INCFLAGS) $(TESTLIB_FLAGS) $(TESTLIB_OBJS) -o $@
check: testlib.so lua/tests.lua
lua ./lua/tests.lua
clean:
rm -rf $(TARGETS) $(LUA_CONVERTER_OBJS) $(C_CONVERTER_OBJS) $(RARCHDB_TOOL_OBJS) $(RMSGPACK_OBJS) $(TESTLIB_OBJS) testlib.so