1# 2# jsonrpcc module makefile 3# 4# 5# WARNING: do not run this directly, it should be run by the master Makefile 6 7include ../../Makefile.defs 8auto_gen= 9NAME=jsonrpcc.so 10LIBS=-lm 11JLIB=json 12 13BUILDER = $(shell which pkg-config) 14ifeq ($(BUILDER),) 15 JSONC=$(shell ls $(SYSBASE)/include/lib/libjson*.so $(LOCALBASE)/lib/libjson*.so 2>/dev/null | grep json-c) 16else 17 JSONC=$(shell pkg-config --libs json-c 2>/dev/null | grep json-c) 18endif 19 20ifneq ($(JSONC),) 21 JLIB=json-c 22endif 23 24ifeq ($(BUILDER),) 25 DEFS+=-I/usr/include/$(JLIB) -I$(LOCALBASE)/include/$(JLIB) \ 26 -I$(LOCALBASE)/include 27 LIBS+=-L$(SYSBASE)/include/lib -L$(LOCALBASE)/lib -levent -l$(JLIB) 28else 29 DEFS+= $(shell pkg-config --cflags $(JLIB)) 30 LIBS+= $(shell pkg-config --libs $(JLIB)) 31 DEFS+= $(shell pkg-config --cflags libevent) 32 LIBS+= $(shell pkg-config --libs libevent) 33endif 34 35include ../../Makefile.modules 36