#!/usr/bin/make -f

SRCDIR=$(CURDIR)
include /usr/share/postgresql-common/pgxs_debian_control.mk
#PATH=/usr/lib/postgresql/9.4-bdr/bin/:$PATH
clean: debian/control
.PHONY: debian/control

override_dh_auto_configure:
	./autogen.sh
	+pg_buildext configure $(SRCDIR) build-%v
#	./configure
#	make


override_dh_auto_build:
#	./autogen.sh
	+pg_buildext build $(SRCDIR) build-%v "$(CFLAGS)"
#	./configure
#	make

override_dh_auto_clean:
	+pg_buildext clean $(SRCDIR) build-%v
#	make additional-maintainer-clean

override_dh_auto_install:
	+pg_buildext install $(SRCDIR) build-%v postgresql-%v-plugin 
#	make install

#override_dh_installdocs:
#	dh_installdocs --all README.ip4r

%:
	/usr/bin/dh $@
