xxhsum: move programs/xxhsum -> cli by request

also use XXHSUM_SRC_DIR in Makefile
This commit is contained in:
easyaspi314 (Devin) 2020-09-18 17:44:15 -04:00
parent a217d5fa46
commit 4b0d1731f1
10 changed files with 17 additions and 16 deletions

1
.gitignore vendored
View File

@ -13,7 +13,6 @@ xxh32sum
xxh64sum
xxh128sum
xxhsum
!programs/xxhsum
xxhsum32
xxhsum_privateXXH
xxhsum_inlinedXXH

View File

@ -71,13 +71,14 @@ endif
LIBXXH = libxxhash.$(SHARED_EXT_VER)
XXHSUM_SPLIT_SRCS = programs/xxhsum/xsum_os_specific.c \
programs/xxhsum/xsum_output.c
XXHSUM_SRC_DIR = cli
XXHSUM_SPLIT_SRCS = $(XXHSUM_SRC_DIR)/xsum_os_specific.c \
$(XXHSUM_SRC_DIR)/xsum_output.c
XXHSUM_SPLIT_OBJS = $(XXHSUM_SPLIT_SRCS:.c=.o)
XXHSUM_HEADERS = programs/xxhsum/xsum_config.h \
programs/xxhsum/xsum_arch.h \
programs/xxhsum/xsum_os_specific.h \
programs/xxhsum/xsum_output.h
XXHSUM_HEADERS = $(XXHSUM_SRC_DIR)/xsum_config.h \
$(XXHSUM_SRC_DIR)/xsum_arch.h \
$(XXHSUM_SRC_DIR)/xsum_os_specific.h \
$(XXHSUM_SRC_DIR)/xsum_output.h
## generate CLI and libraries in release mode (default for `make`)
.PHONY: default
@ -168,7 +169,7 @@ clean: ## remove all build artifacts
$(Q)$(RM) core *.o *.obj *.$(SHARED_EXT) *.$(SHARED_EXT).* *.a libxxhash.pc
$(Q)$(RM) xxhsum$(EXT) xxhsum32$(EXT) xxhsum_inlinedXXH$(EXT) dispatch$(EXT)
$(Q)$(RM) xxh32sum$(EXT) xxh64sum$(EXT) xxh128sum$(EXT)
$(Q)$(RM) programs/xxhsum/*.o programs/xxhsum/*.obj
$(Q)$(RM) $(XXHSUM_SRC_DIR)/*.o $(XXHSUM_SRC_DIR)/*.obj
@echo cleaning completed

View File

@ -82,10 +82,11 @@ set_target_properties(xxhash PROPERTIES
VERSION "${XXHASH_VERSION_STRING}")
if(XXHASH_BUILD_XXHSUM)
set(XXHSUM_DIR "${XXHASH_DIR}/cli")
# xxhsum
add_executable(xxhsum "${XXHASH_DIR}/xxhsum.c"
"${XXHASH_DIR}/programs/xxhsum/xsum_os_specific.c"
"${XXHASH_DIR}/programs/xxhsum/xsum_output.c"
"${XXHSUM_DIR}/xsum_os_specific.c"
"${XXHSUM_DIR}/xsum_output.c"
)
add_executable(${PROJECT_NAME}::xxhsum ALIAS xxhsum)

View File

@ -30,13 +30,13 @@
*/
/* Transitional headers */
#include "programs/xxhsum/xsum_config.h"
#include "programs/xxhsum/xsum_arch.h"
#include "programs/xxhsum/xsum_os_specific.h"
#include "programs/xxhsum/xsum_output.h"
#include "cli/xsum_config.h"
#include "cli/xsum_arch.h"
#include "cli/xsum_os_specific.h"
#include "cli/xsum_output.h"
#ifdef XXH_INLINE_ALL
# include "programs/xxhsum/xsum_os_specific.c"
# include "programs/xxhsum/xsum_output.c"
# include "cli/xsum_os_specific.c"
# include "cli/xsum_output.c"
#endif
/* ************************************