Debian Codegraph @

contrib/jsonb_plperl/Makefile

raw
1 # contrib/jsonb_plperl/Makefile
2
3 MODULE_big = jsonb_plperl
4 OBJS = \
5 $(WIN32RES) \
6 jsonb_plperl.o
7 PGFILEDESC = "jsonb_plperl - jsonb transform for plperl"
8
9 PG_CPPFLAGS = -I$(top_srcdir)/src/pl/plperl
10
11 EXTENSION = jsonb_plperlu jsonb_plperl
12 DATA = jsonb_plperlu--1.0.sql jsonb_plperl--1.0.sql
13
14 REGRESS = jsonb_plperl jsonb_plperlu
15
16 SHLIB_LINK += $(filter -lm, $(LIBS))
17
18 ifdef USE_PGXS
19 PG_CONFIG = pg_config
20 PGXS := $(shell $(PG_CONFIG) --pgxs)
21 include $(PGXS)
22 else
23 subdir = contrib/jsonb_plperl
24 top_builddir = ../..
25 include $(top_builddir)/src/Makefile.global
26 include $(top_srcdir)/contrib/contrib-global.mk
27 endif
28
29 # We must link libperl explicitly
30 ifeq ($(PORTNAME), win32)
31 # these settings are the same as for plperl
32 override CPPFLAGS += -DPLPERL_HAVE_UID_GID -Wno-comment
33 # ... see silliness in plperl Makefile ...
34 SHLIB_LINK_INTERNAL += $(sort $(wildcard ../../src/pl/plperl/libperl*.a))
35 else
36 rpathdir = $(perl_archlibexp)/CORE
37 SHLIB_LINK += $(perl_embed_ldflags)
38 endif
39
40 # As with plperl we need to include the perl_includespec directory last.
41 override CPPFLAGS := $(CPPFLAGS) $(perl_embed_ccflags) $(perl_includespec)