From c3e90c168567c7792b21620e54736294cd5b0ab0 Mon Sep 17 00:00:00 2001 From: Attila Kovacs Date: Sat, 14 Sep 2024 11:39:40 +0200 Subject: [PATCH] Makefiles tweaks --- CHANGELOG.md | 2 +- README.md | 2 +- build.mk | 6 +++--- config.mk | 10 +++++----- 4 files changed, 10 insertions(+), 10 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 542d4f8..fbf0b55 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,6 @@ # Changelog -All notable changes to the RedisX [Smithsonian/redisx](https://github.com/Smithsonian/redisx) library will be +All notable changes to the [Smithsonian/redisx](https://github.com/Smithsonian/redisx) library will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/), and this project adheres to diff --git a/README.md b/README.md index 7699d4d..22d8a46 100644 --- a/README.md +++ b/README.md @@ -912,7 +912,7 @@ Then activate it as: ```c Redis *redis = ... - redisSetTransmitErrorHandler(redis, my_error_handler); + redisxSetTransmitErrorHandler(redis, my_error_handler); ``` After that, every time there is an error with sending or receiving packets over the network to any of the Redis diff --git a/build.mk b/build.mk index 9493f32..546e25e 100644 --- a/build.mk +++ b/build.mk @@ -19,7 +19,7 @@ $(LIB)/lib%.so: @rm -f $@ ln -sr $< $@ -# Static library: novas.a +# Static library: *.a $(LIB)/%.a: ar -rc $@ $^ ranlib $@ @@ -51,7 +51,7 @@ distclean: distclean-local .PHONY: check check: @echo " [check]" - @cppcheck -I$(INC) $(CHECKOPTS) src + @cppcheck $(CPPFLAGS) $(CHECKOPTS) src # Doxygen documentation (HTML and man pages) under apidocs/ .PHONY: dox @@ -63,7 +63,7 @@ dox: README.md Doxyfile | apidoc $(SRC) $(INC) .PRECIOUS: dep/%.d dep/%.d: %.c dep @echo " > $@" \ - && $(CC) $(CPPFLAGS) -I$(INC) -MM -MG $< > $@.$$$$ \ + && $(CC) $(CPPFLAGS) -MM -MG $< > $@.$$$$ \ && sed 's|\w*\.o[ :]*| $(OBJ)/&|g' < $@.$$$$ > $@; \ rm -f $@.$$$$ diff --git a/config.mk b/config.mk index 243dcdf..f09bb76 100644 --- a/config.mk +++ b/config.mk @@ -23,12 +23,12 @@ BIN ?= bin # Compiler: use gcc by default CC ?= gcc +# Add include/ directory +CPPFLAGS += -I$(INC) + # Base compiler options (if not defined externally...) CFLAGS ?= -Os -Wall -# Add include/ directory -CFLAGS += -I$(INC) - # Extra warnings (not supported on all compilers) #CFLAGS += -Wextra @@ -37,8 +37,8 @@ LDFLAGS ?= -lm # Compile and link against a specific xchange library (if defined) ifdef XCHANGE - CFLAGS += -I$(XCHANGE)/include - LDFLAGS = -L$(XCHANGE)/lib + CPPFLAGS += -I$(XCHANGE)/include + LDFLAGS += -L$(XCHANGE)/lib LD_LIBRARY_PATH = $(XCHANGE)/lib:$(LD_LIBRARY_PATH) endif