src/modules/db_redis/Makefile
53e746b5
 #
 # WARNING: do not run this directly, it should be run by the master Makefile
 
 include ../../Makefile.defs
 auto_gen=
 NAME=db_redis.so
 
 ifeq ($(CROSS_COMPILE),)
 HIREDIS_BUILDER = $(shell \
 	if pkg-config --exists hiredis; then \
 		echo 'pkg-config hiredis'; \
 	fi)
 endif
 
 ifeq ($(HIREDIS_BUILDER),)
df3bd3b9
 	HIREDISDEFS=-I$(LOCALBASE)/include -I$(LOCALBASE)/include/hiredis -I/usr/include/hiredis
53e746b5
 	HIREDISLIBS=-L$(LOCALBASE)/lib -lhiredis
 else
616689bf
 	HIREDISDEFS = $(shell $(HIREDIS_BUILDER) --cflags)
53e746b5
 	HIREDISLIBS = $(shell $(HIREDIS_BUILDER) --libs)
0da66e70
 
616689bf
 ifeq (,$(findstring hiredis,$(HIREDISDEFS)))
 	DEFS+=-DWITH_HIREDIS_PATH
 endif
 
0da66e70
 ifeq ($(HIREDISLIBS),-L -lhiredis)
 		HIREDISDEFS = $(shell $(HIREDIS_BUILDER) --cflags) /opt/local/include
 		HIREDISLIBS = -L/opt/local/lib -lhiredis
 endif
 
53e746b5
 endif
 
 DEFS+=$(HIREDISDEFS)
 LIBS=$(HIREDISLIBS)
 
 SERLIBPATH=../../lib
 SER_LIBS=$(SERLIBPATH)/srdb2/srdb2 $(SERLIBPATH)/srdb1/srdb1
 
 include ../../Makefile.modules
e727ddce
 
 install-redis-scripts: $(bin_prefix)/$(bin_dir)
 	REDISON=yes $(MAKE) -C ../../../utils/kamctl/ install-modules
 
 install-scripts: install-redis-scripts