diff --git a/README.rst b/README.rst index 3483893..f991a4a 100644 --- a/README.rst +++ b/README.rst @@ -3,8 +3,8 @@ Vanilla Squad ============= :Author: Daniel Walker -:Version: 6.0.2 -:Date: 2022-07-28 +:Version: 6.0.3 +:Date: 2022-08-16 Overview ======== @@ -178,7 +178,7 @@ logging functions, will do nothing. Passing **NULL** as the logger to the loggi nothing happening (NOT an error). There are various other functions provided by include/vasq/logger.h, such as a hex dumper (which prints at -the DEBUG level) and wrappers around **malloc**, **fork**, and **perror**. +the DEBUG level) and a wrapper around **assert**. Logging messages are emitted in a signal-safe manner. In addition, logging preserves the value of **errno**. @@ -231,7 +231,8 @@ optimization and build the libraries with debugging symbols. You can also include Vanilla Squad in a larger project by including make.mk. Before doing so, however, the **VASQ_DIR** variable must be set to the location of the Vanilla Squad directory. You can also tell make where to place the shared and static libraries by defining the **VASQ_LIB_DIR** variable (defaults to -**VASQ_DIR**). +**VASQ_DIR**). Similarly, you can define the **VASQ_OBJ_DIR** variable which tells make where to place the +object files (defaults to **VASQ_DIR**/source). make.mk adds a target to the **CLEAN_TARGETS** variable. This is so that implementing diff --git a/changelog b/changelog index bf4eea1..fb03b52 100644 --- a/changelog +++ b/changelog @@ -1,3 +1,7 @@ +6.0.3.: + - Deprecated various logging wrapper functions such as vasqMalloc. + - Added the use of LDFLAGS and VASQ_OBJ_DIR to make.mk. + 6.0.2: - Fixed a typo in the vasqHexDump output. diff --git a/include/vasq/definitions.h b/include/vasq/definitions.h index 8b91704..1df1670 100644 --- a/include/vasq/definitions.h +++ b/include/vasq/definitions.h @@ -9,7 +9,7 @@ /** * @brief Current version of the library. */ -#define VASQ_VERSION "6.0.2" +#define VASQ_VERSION "6.0.3" #ifndef NO_OP #define NO_OP ((void)0) diff --git a/make.mk b/make.mk index d1541f1..f09e6e4 100644 --- a/make.mk +++ b/make.mk @@ -1,9 +1,11 @@ VASQ_LIB_DIR ?= $(VASQ_DIR) +VASQ_OBJ_DIR ?= $(VASQ_DIR)/source + VASQ_SHARED_LIBRARY := $(VASQ_LIB_DIR)/libvanillasquad.so VASQ_STATIC_LIBRARY := $(VASQ_LIB_DIR)/libvanillasquad.a VASQ_SOURCE_FILES := $(wildcard $(VASQ_DIR)/source/*.c) -VASQ_OBJECT_FILES := $(patsubst %.c,%.o,$(VASQ_SOURCE_FILES)) +VASQ_OBJECT_FILES := $(patsubst $(VASQ_DIR)/source/%.c,$(VASQ_OBJ_DIR)/%.o,$(VASQ_SOURCE_FILES)) VASQ_HEADER_FILES := $(wildcard $(VASQ_DIR)/include/vasq/*.h) VASQ_INCLUDE_FLAGS := -I$(VASQ_DIR)/include @@ -17,7 +19,7 @@ ifneq ($(MAKECMDGOALS),clean) $(VASQ_DEPS_FILE): $(VASQ_SOURCE_FILES) $(VASQ_HEADER_FILES) rm -f $@ for file in $(VASQ_SOURCE_FILES); do \ - echo "$(VASQ_DIR)/source/`$(CC) $(VASQ_INCLUDE_FLAGS) -MM $$file`" >> $@ && \ + echo "$(VASQ_OBJ_DIR)/`$(CC) $(VASQ_INCLUDE_FLAGS) -MM $$file`" >> $@ && \ echo '\t$$(CC) $$(CFLAGS) -fpic -ffunction-sections $(VASQ_INCLUDE_FLAGS) -c $$< -o $$@' >> $@; \ done include $(VASQ_DEPS_FILE)