#!/usr/bin/make -f
#
# debian.rules file - for symlinks
# Copyright 1996-1998 by Bernd Eckenfels
#

package=symlinks

build:
	$(checkdir)
	$(MAKE) CFLAGS="-O2 -Wall -g" prefix=/usr LDFLAGS="-s"
	touch build

clean:
	$(checkdir)
	-rm -f build
	-$(MAKE) clean
	-rm -rf *~ debian/tmp debian/*~ debian/files* debian/substvars core */core
	dh_clean

binary-indep:	checkroot build
	$(checkdir)
# There are no architecture-independent files to be uploaded
# generated by this package.  If there were any they would be
# made here.

binary-arch:	checkroot build
	$(checkdir)
	-rm -rf debian/tmp
	dh_installdirs
	dh_installdocs symlinks.lsm
	dh_installchangelogs
	cp symlinks debian/tmp/usr/bin/
	cp symlinks.8 debian/tmp/usr/share/man/man1/symlinks.1
	dh_strip
	dh_compress
	dh_fixperms
	dh_shlibdeps
	dh_gencontrol -- -isp
	dh_installdeb
	dh_md5sums
	dh_builddeb

define checkdir
	test -f $(package).c -a -f debian/rules
endef

# Below here is fairly generic really

binary:		binary-indep binary-arch

source diff:
	@echo >&2 'source and diff are obsolete - use dpkg-source -b'; false

checkroot:
	$(checkdir)
	test root = "`whoami`"

.PHONY: binary binary-arch binary-indep clean checkroot
