Debian Codegraph @

src/modules/pua_json/Makefile

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