Skip to content

Commit

Permalink
added VASQ_OBJ_DIR to make.mk; changed version to 6.0.3
Browse files Browse the repository at this point in the history
  • Loading branch information
nickeldan committed Aug 17, 2022
1 parent a4dcf6e commit dbaa895
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 7 deletions.
9 changes: 5 additions & 4 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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
========
Expand Down Expand Up @@ -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**.

Expand Down Expand Up @@ -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

Expand Down
4 changes: 4 additions & 0 deletions changelog
Original file line number Diff line number Diff line change
@@ -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.

Expand Down
2 changes: 1 addition & 1 deletion include/vasq/definitions.h
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
6 changes: 4 additions & 2 deletions make.mk
Original file line number Diff line number Diff line change
@@ -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

Expand All @@ -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)
Expand Down

0 comments on commit dbaa895

Please sign in to comment.