Skip to content

Commit

Permalink
config.mk: Add LIB to LD_LIBRARY_PATH as needed.
Browse files Browse the repository at this point in the history
  • Loading branch information
attipaci committed Sep 25, 2024
1 parent 7e135db commit e17633c
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions config.mk
Original file line number Diff line number Diff line change
Expand Up @@ -92,32 +92,37 @@ ifeq ($(SYSTEMD),1)
LDFLAGS += -lsystemd
endif

# Search for libraries under LIB
ifneq ($(findstring $(LIB),$(LD_LIBRARY_PATH)),$LIB)
LD_LIBRARY_PATH := $(LIB):$(LD_LIBRARY_PATH)
endif

# Compile and link against a specific PostgreSQL library (if defined)
ifdef PGDIR
CPPFLAGS += -I$(PGDIR)/include
LDFLAGS += -L$(PGDIR)/lib
LD_LIBRARY_PATH = $(PGDIR)/lib:$(LD_LIBRARY_PATH)
LD_LIBRARY_PATH := $(PGDIR)/lib:$(LD_LIBRARY_PATH)
endif

# Compile and link against a specific smax library (if defined)
ifdef SMAXLIB
CPPFLAGS += -I$(SMAXLIB)/include
LDFLAGS += -L$(SMAXLIB)/lib
LD_LIBRARY_PATH = $(SMAXLIB)/lib:$(LD_LIBRARY_PATH)
LD_LIBRARY_PATH := $(SMAXLIB)/lib:$(LD_LIBRARY_PATH)
endif

# Compile and link against a specific redisx library (if defined)
ifdef REDISX
CPPFLAGS += -I$(REDISX)/include
LDFLAGS += -L$(REDISX)/lib
LD_LIBRARY_PATH = $(REDISX)/lib:$(LD_LIBRARY_PATH)
LD_LIBRARY_PATH := $(REDISX)/lib:$(LD_LIBRARY_PATH)
endif

# Compile and link against a specific xchange library (if defined)
ifdef XCHANGE
CPPFLAGS += -I$(XCHANGE)/include
LDFLAGS += -L$(XCHANGE)/lib
LD_LIBRARY_PATH = $(XCHANGE)/lib:$(LD_LIBRARY_PATH)
LD_LIBRARY_PATH := $(XCHANGE)/lib:$(LD_LIBRARY_PATH)
endif


Expand Down

0 comments on commit e17633c

Please sign in to comment.