From acfe7ab16db6ee170118640dc2938be3b12270eb Mon Sep 17 00:00:00 2001 From: twinaphex Date: Thu, 30 Jan 2020 17:41:38 +0100 Subject: [PATCH] Updates to samples/utils --- libretro-common/samples/utils/Makefile | 28 +++++++++++++------ .../{ => samples}/utils/sha1_main.c | 0 2 files changed, 19 insertions(+), 9 deletions(-) rename libretro-common/{ => samples}/utils/sha1_main.c (100%) diff --git a/libretro-common/samples/utils/Makefile b/libretro-common/samples/utils/Makefile index d0ced5fb5c..c2f11d5217 100644 --- a/libretro-common/samples/utils/Makefile +++ b/libretro-common/samples/utils/Makefile @@ -52,6 +52,7 @@ else EXE_EXT = .exe endif +PWD_DIR := . LIBRETRO_COMM_DIR := ../.. CORE_DIR := $(LIBRETRO_COMM_DIR)/utils @@ -67,23 +68,32 @@ ASMFLAGS := -INEON/asm asflags += -mfpu=neon endif -OBJS += $(CORE_DIR)/djb2.o \ - $(CORE_DIR)/md5.o \ - $(CORE_DIR)/sha1.o \ - $(CORE_DIR)/sha1_main.o \ - $(CORE_DIR)/crc32.o +DJB2_OBJS := $(CORE_DIR)/djb2.o + +MD5_OBJS := $(CORE_DIR)/md5.o + +SHA1_OBJS := $(CORE_DIR)/sha1.o \ + $(PWD_DIR)/sha1_main.o + +CRC32_OBJS := $(CORE_DIR)/crc32.o \ + $(LIBRETRO_COMM_DIR)/compat/fopen_utf8.o \ + $(LIBRETRO_COMM_DIR)/compat/compat_strl.o \ + $(LIBRETRO_COMM_DIR)/encodings/encoding_utf.o \ + $(LIBRETRO_COMM_DIR)/streams/file_stream.o \ + $(LIBRETRO_COMM_DIR)/vfs/vfs_implementation.o \ + $(LIBRETRO_COMM_DIR)/encodings/encoding_crc32.o UTILS := djb2$(EXE_EXT) md5$(EXE_EXT) sha1$(EXE_EXT) crc32$(EXE_EXT) all: $(UTILS) -djb2$(EXE_EXT): $(CORE_DIR)/djb2.o +djb2$(EXE_EXT): $(DJB2_OBJS) -md5$(EXE_EXT): $(CORE_DIR)/md5.o +md5$(EXE_EXT): $(MD5_OBJS) -sha1$(EXE_EXT): $(CORE_DIR)/sha1.o $(CORE_DIR)/sha1_main.o +sha1$(EXE_EXT): $(SHA1_OBJS) -crc32$(EXE_EXT): $(CORE_DIR)/crc32.o $(CORE_DIR)/../encodings/encoding_crc32.o +crc32$(EXE_EXT): $(CRC32_OBJS) %.o: %.S $(CC) -c -o $@ $(asflags) $(LDFLAGS) $(ASMFLAGS) $< diff --git a/libretro-common/utils/sha1_main.c b/libretro-common/samples/utils/sha1_main.c similarity index 100% rename from libretro-common/utils/sha1_main.c rename to libretro-common/samples/utils/sha1_main.c