From 77874753614f9b9ea732a1067190e4e3ccba33f0 Mon Sep 17 00:00:00 2001 From: twinaphex Date: Fri, 30 Sep 2016 02:49:10 +0200 Subject: [PATCH] Relocate samples/utils --- libretro-common/{ => samples}/utils/Makefile | 19 +++++++++++++------ libretro-common/utils/md5.c | 3 +-- 2 files changed, 14 insertions(+), 8 deletions(-) rename libretro-common/{ => samples}/utils/Makefile (80%) diff --git a/libretro-common/utils/Makefile b/libretro-common/samples/utils/Makefile similarity index 80% rename from libretro-common/utils/Makefile rename to libretro-common/samples/utils/Makefile index ead7a8f837..b8f0a55eb2 100644 --- a/libretro-common/utils/Makefile +++ b/libretro-common/samples/utils/Makefile @@ -55,9 +55,12 @@ extra_flags += -static-libgcc -static-libstdc++ DYLIB = exe endif +LIBRETRO_COMM_DIR := ../.. +CORE_DIR := $(LIBRETRO_COMM_DIR)/utils + CC := $(compiler) CXX := $(subst CC,++,$(compiler)) -flags := -fPIC $(extra_flags) -I../../libretro-common/include +flags := -fPIC $(extra_flags) -I$(LIBRETRO_COMM_DIR)/include asflags := -fPIC $(extra_flags) LDFLAGS := flags += -std=c99 -DMD5_BUILD_UTILITY @@ -68,18 +71,22 @@ ASMFLAGS := -INEON/asm asflags += -mfpu=neon endif -OBJS += djb2.o md5.o sha1.o crc32.o + +OBJS += $(CORE_DIR)/djb2.o \ + $(CORE_DIR)/md5.o \ + $(CORE_DIR)/sha1.o \ + $(CORE_DIR)/crc32.o UTILS += djb2$(DYLIB) md5$(DYLIB) sha1$(DYLIB) crc32$(DYLIB) all: djb2$(DYLIB) md5$(DYLIB) sha1$(DYLIB) crc32$(DYLIB) -djb2$(DYLIB): djb2.o +djb2$(DYLIB): $(CORE_DIR)/djb2.o -md5$(DYLIB): md5.o +md5$(DYLIB): $(CORE_DIR)/md5.o -sha1$(DYLIB): sha1.o +sha1$(DYLIB): $(CORE_DIR)/sha1.o -crc32$(DYLIB): crc32.o ../encodings/encoding_crc32.o +crc32$(DYLIB): $(CORE_DIR)/crc32.o $(CORE_DIR)/../encodings/encoding_crc32.o %.o: %.S $(CC) -c -o $@ $(asflags) $(LDFLAGS) $(ASMFLAGS) $< diff --git a/libretro-common/utils/md5.c b/libretro-common/utils/md5.c index e97d784cc7..3208f1d65b 100644 --- a/libretro-common/utils/md5.c +++ b/libretro-common/utils/md5.c @@ -34,11 +34,10 @@ * optimizations are not included to reduce source code size and avoid * compile-time configuration. */ +#include #include -#include "rhash.h" - /* * The basic MD5 functions. *