| 1 |
# |
| 2 |
# jsonrpcc module makefile |
| 3 |
# |
| 4 |
# |
| 5 |
# WARNING: do not run this directly, it should be run by the main Makefile |
| 6 |
|
| 7 |
include ../../Makefile.defs |
| 8 |
auto_gen= |
| 9 |
NAME=jsonrpcc.so |
| 10 |
LIBS=-lm |
| 11 |
JLIB=json |
| 12 |
|
| 13 |
BUILDER = $(shell which pkg-config) |
| 14 |
ifeq ($(BUILDER),) |
| 15 |
JSONC=$(shell ls $(SYSBASE)/include/lib/libjson*.so $(LOCALBASE)/lib/libjson*.so 2>/dev/null | grep json-c) |
| 16 |
else |
| 17 |
JSONC=$(shell pkg-config --libs json-c 2>/dev/null | grep json-c) |
| 18 |
endif |
| 19 |
|
| 20 |
ifneq ($(JSONC),) |
| 21 |
JLIB=json-c |
| 22 |
endif |
| 23 |
|
| 24 |
ifeq ($(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) |
| 28 |
else |
| 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) |
| 33 |
endif |
| 34 |
|
| 35 |
include ../../Makefile.modules |