#!/usr/bin/make -f
# Sample debian.rules file - for GNU Hello (1.3).
# Copyright 1994,1995 by Ian Jackson.

# Modified to be rules for rbootd by Alan Bain 1998

# I hereby give you perpetual unlimited permission to copy,
# modify and relicense this file, provided that you do not remove
# my name from the file itself.  (I assert my moral right of
# paternity under the Copyright, Designs and Patents Act 1988.)
# This file may have to be extensively modified

export DEB_BUILD_MAINT_OPTIONS = hardening=+all

package=rbootd

include /usr/share/dpkg/buildtools.mk

CFLAGS = $(shell dpkg-buildflags --get CFLAGS)
CFLAGS += $(shell dpkg-buildflags --get CPPFLAGS)
CFLAGS += $(shell getconf LFS_CFLAGS)

ifeq (,$(findstring nostrip,$(DEB_BUILD_OPTIONS)))
STRIP_OPT = -s --strip-program=$(STRIP)
endif

export BASEDIR=$(shell pwd)/debian/tmp

## Note must use the special makefile to avoid needing BSD make

%:
	dh $@

override_dh_auto_build:
	$(MAKE) CC="$(CC)" CFLAGS="$(CFLAGS)" rbootd

override_dh_auto_install:
	true

