Skip to content

Commit

Permalink
Makefile tweaks
Browse files Browse the repository at this point in the history
  • Loading branch information
attipaci committed Jan 11, 2025
1 parent cc5a0e7 commit cae0b45
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 12 deletions.
8 changes: 5 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -49,16 +49,16 @@ static: $(LIB)/libredisx.a

# Command-line tools
.PHONY: tools
tools:
$(MAKE) -f tools.mk

# Link tools against the static or shared libs
# Link binaries against the static or shared libs
ifeq ($(STATICLINK),1)
tools: static
else
tools: shared
endif

# The actual tools to build
tools: $(BIN)/redisx-cli

# Examples
.PHONY: examples
Expand Down Expand Up @@ -111,6 +111,8 @@ $(LIB)/libredisx.so.$(SO_VERSION): $(SOURCES)
# Static library
$(LIB)/libredisx.a: $(OBJECTS)

# redisx-cli assitional link libraries...
$(BIN)/redisx-cli: LDFLAGS += -lreadline -lbsd

README-redisx.md: README.md
LINE=`sed -n '/\# /{=;q;}' $<` && tail -n +$$((LINE+2)) $< > $@
Expand Down
4 changes: 4 additions & 0 deletions build.mk
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,10 @@ $(BIN)/%: $(OBJ)/%.o
@$(MAKE) $(BIN)
$(CC) -o $@ $^ $(LDFLAGS)

# Link binaries against redisx lib
$(BIN)/%: LDFLAGS := -L$(LIB) $(LDFLAGS) -lredisx -lpopt
$(BIN)/%: LD_LIBRARY_PATH := $(LIB):$(LD_LIBRARY_PATH)

# Create sub-directories for build targets
dep $(OBJ) $(LIB) $(BIN) apidoc:
mkdir -p $@
Expand Down
1 change: 1 addition & 0 deletions src/redisx-tls.c
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
static int initialized = FALSE;

#if WITH_TLS

/**
* Clear TLS configuration settings, freeing resources used.
*
Expand Down
9 changes: 0 additions & 9 deletions tools.mk

This file was deleted.

0 comments on commit cae0b45

Please sign in to comment.