Skip to content

Commit

Permalink
cnxcc: use pkg-config for hiredis lib compile flags
Browse files Browse the repository at this point in the history
(cherry picked from commit 162ccda)
  • Loading branch information
miconda committed Mar 28, 2016
1 parent b04d257 commit a45f580
Showing 1 changed file with 21 additions and 2 deletions.
23 changes: 21 additions & 2 deletions modules/cnxcc/Makefile
@@ -1,14 +1,33 @@
#
# cnxcc module makefile
#
#
#
# WARNING: do not run this directly, it should be run by the master Makefile

include ../../Makefile.defs
auto_gen=
NAME=cnxcc.so

LIBS=-lhiredis -levent
ifeq ($(CROSS_COMPILE),)
HIREDIS_BUILDER = $(shell \
if pkg-config --exists libcre; then \
echo 'pkg-config hiredis'; \
else \
which pcre-config; \
fi)
endif

ifeq ($(HIREDIS_BUILDER),)
HIREDISDEFS=-I$(LOCALBASE)/include
HIREDISLIBS=-L$(LOCALBASE)/lib -lhiredis
else
HIREDISDEFS = $(shell $(HIREDIS_BUILDER) --cflags)
HIREDISLIBS = $(shell $(HIREDIS_BUILDER) --libs)
endif

DEFS+=$(HIREDISDEFS)
LIBS=$(HIREDISLIBS) -levent

DEFS+=-DOPENSER_MOD_INTERFACE
SERLIBPATH=../../lib
SER_LIBS+=$(SERLIBPATH)/kmi/kmi
Expand Down

0 comments on commit a45f580

Please sign in to comment.