#!/usr/bin/make -f
# -*- makefile -*-

export DH_VERBOSE=1
#export DEB_BUILD_OPTIONS = noopt

#CFLAGS += -DSYSLOG -ggdb
#CXXFLAGS += -DSYSLOG -ggdb
#CPPFLAGS += -DSYSLOG

%:
	#dh $@ --with systemd,quilt --buildsystem=cmake --parallel
	dh $@ ---with quilt --buildsystem=cmake

override_dh_auto_configure:
	dh_auto_configure -- \
		-DCMAKE_BUILD_TYPE=Release \
		-DPostgreSQL_INCLUDE_DIR=/usr/include/postgresql \
		-DPostgreSQL_LIBRARY_DIR=/usr/lib/x86_64-linux-gnu \
		-DPostgreSQL_TYPE_INCLUDE_DIR=/usr/include/postgresql/9.6/server

override_dh_auto_build:
	cd obj-x86_64-linux-gnu ; make fred-logger-services-iface-static
	dh_auto_build

# https://lists.debian.org/debian-mentors/2015/09/msg00606.html
#override_dh_installinit:
#	dh_installinit --noscripts
