mirror of
https://github.com/CTCaer/RetroArch.git
synced 2024-12-18 16:28:51 +00:00
(libretro-db) Heavy build fixes
This commit is contained in:
parent
038296f1a3
commit
bffbdabfcf
@ -2,22 +2,7 @@ CFLAGS = -g -O2
|
||||
LIBRETRO_COMMON_DIR := ../libretro-common
|
||||
INCFLAGS = -I. -I$(LIBRETRO_COMMON_DIR)/include
|
||||
|
||||
LUA_CONVERTER_C = \
|
||||
rmsgpack.c \
|
||||
rmsgpack_dom.c \
|
||||
lua_common.c \
|
||||
libretrodb.c \
|
||||
bintree.c \
|
||||
query.c \
|
||||
lua_converter.c \
|
||||
$(LIBRETRO_COMMON_DIR)/compat/compat_fnmatch.c \
|
||||
$(LIBRETRO_COMMON_DIR)/file/retro_file.c \
|
||||
$(LIBRETRO_COMMON_DIR)/compat/compat.c
|
||||
|
||||
LUA_CONVERTER_C_OBJS := $(LUA_CONVERTER_C:.c=.o)
|
||||
|
||||
PLAIN_CONVERTER_C = \
|
||||
djb2.c \
|
||||
lexer.c \
|
||||
parser.c \
|
||||
rmsgpack.c \
|
||||
@ -25,7 +10,8 @@ PLAIN_CONVERTER_C = \
|
||||
libretrodb.c \
|
||||
bintree.c \
|
||||
query.c \
|
||||
main.c \
|
||||
plain_converter.c \
|
||||
$(LIBRETRO_COMMON_DIR)/hash/rhash.c \
|
||||
$(LIBRETRO_COMMON_DIR)/compat/compat_fnmatch.c \
|
||||
$(LIBRETRO_COMMON_DIR)/file/retro_file.c \
|
||||
$(LIBRETRO_COMMON_DIR)/compat/compat.c
|
||||
@ -47,7 +33,6 @@ RARCHDB_TOOL_OBJS := $(RARCHDB_TOOL_C:.c=.o)
|
||||
|
||||
TESTLIB_C = \
|
||||
testlib.c \
|
||||
lua_common.c \
|
||||
query.c \
|
||||
libretrodb.c \
|
||||
bintree.c \
|
||||
@ -71,7 +56,7 @@ TESTLIB_FLAGS = ${CFLAGS} ${LUA_FLAGS} -shared -fpic
|
||||
|
||||
.PHONY: all clean check
|
||||
|
||||
all: rmsgpack_test libretrodb_tool lua_converter plain_dat_converter
|
||||
all: rmsgpack_test libretrodb_tool plain_dat_converter
|
||||
|
||||
%.o: %.c
|
||||
${CC} $(INCFLAGS) $< -c ${CFLAGS} -o $@
|
||||
@ -79,9 +64,6 @@ all: rmsgpack_test libretrodb_tool lua_converter plain_dat_converter
|
||||
plain_dat_converter: ${PLAIN_CONVERTER_C_OBJS}
|
||||
${CC} $(INCFLAGS) ${PLAIN_CONVERTER_C_OBJS} -o $@
|
||||
|
||||
lua_converter: ${LUA_CONVERTER_C_OBJS}
|
||||
${CC} $(INCFLAGS) ${LUA_CONVERTER_C_OBJS} ${LUA_FLAGS} -o $@
|
||||
|
||||
libretrodb_tool: ${RARCHDB_TOOL_OBJS}
|
||||
${CC} $(INCFLAGS) ${RARCHDB_TOOL_OBJS} -o $@
|
||||
|
||||
@ -98,4 +80,4 @@ clean:
|
||||
rm -rf $(LIBRETRO_COMMON_DIR)/*.o
|
||||
rm -rf $(LIBRETRO_COMMON_DIR)/compat/*.o
|
||||
rm -rf $(LIBRETRO_COMMON_DIR)/file/*.o
|
||||
rm -rf *.o rmsgpack_test lua_converter plain_dat_converter libretrodb_tool testlib.so
|
||||
rm -rf *.o rmsgpack_test plain_dat_converter libretrodb_tool testlib.so
|
||||
|
@ -1,7 +1,8 @@
|
||||
#include <malloc.h>
|
||||
#include <string.h>
|
||||
|
||||
#include "djb2.h"
|
||||
#include <rhash.h>
|
||||
|
||||
#include "parser.h"
|
||||
|
||||
static void match_any( pr_state_t* parser )
|
||||
@ -89,7 +90,7 @@ static void parse_map( pr_state_t* parser, int skip, int isrom )
|
||||
key = parser->lexer.start;
|
||||
keylen = parser->lexer.len;
|
||||
|
||||
hash = djb2( key, keylen );
|
||||
hash = djb2_calculate(key);
|
||||
|
||||
match_any( parser );
|
||||
|
||||
|
@ -5,9 +5,9 @@
|
||||
#include <errno.h>
|
||||
|
||||
#include <retro_file.h>
|
||||
#include <rhash.h>
|
||||
|
||||
#include "parser.h"
|
||||
#include "djb2.h"
|
||||
#include "libretrodb.h"
|
||||
|
||||
static const char *printchar( pr_state_t* parser )
|
||||
@ -102,7 +102,7 @@ static int provider( void* ctx, struct rmsgpack_dom_value* out )
|
||||
out->val.map.items[ i ].key.val.string.len = game->pairs[ i ].key_len;
|
||||
out->val.map.items[ i ].key.val.string.buff = dup_string( game->pairs[ i ].key, game->pairs[ i ].key_len );
|
||||
|
||||
hash = djb2( game->pairs[ i ].key, game->pairs[ i ].key_len );
|
||||
hash = djb2_calculate(game->pairs[ i ].key);
|
||||
|
||||
switch ( hash )
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user