#!/usr/bin/make -f
# -*- makefile -*-
# Sample debian/rules that uses debhelper.
# GNU copyright 1997 to 1999 by Joey Hess.

# Uncomment this to turn on verbose mode.
#export DH_VERBOSE=1
CFLAGS:=$(shell dpkg-buildflags --get CFLAGS) -Wall -g
CPPFLAGS:=$(shell dpkg-buildflags --get CPPFLAGS)
LDFLAGS:=$(shell dpkg-buildflags --get LDFLAGS)

ifeq (,$(findstring nostrip,$(DEB_BUILD_OPTIONS)))
	INSTALL_PROGRAM += -s
endif

%:
	dh $@
	
override_dh_installdirs:
	dh_installdirs
	$(MAKE) install DESTDIR=$(CURDIR)/debian/lwatch

override_dh_auto_configure:
	dh_auto_configure
	sed -i -e "s,$(CURDIR),BUILDPATH,g" src/config.h
