1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58
|
#! /usr/bin/make -f
#export DEB_BUILD_MAINT_OPTIONS = hardening=+all
DPKG_EXPORT_BUILDFLAGS = 1
include /usr/share/dpkg/buildflags.mk
CFLAGS += -O2
ifneq ($(findstring debug,$(DEB_BUILD_OPTIONS)),)
CFLAGS += -g
endif
# The build system ignores CPPFLAGS, pass them through CFLAGS instead.
CFLAGS += $(CPPFLAGS)
clean:
dh_testdir
dh_testroot
dh_clean build.stamp
mv config.h.in .config.h.in
[ ! -f Makefile ] || $(MAKE) distclean
mv .config.h.in config.h.in
[ ! -f doc/Makefile ] || $(MAKE) -C doc spotless
rm -f `find -name Makefile`
build: build-arch build-indep
build-arch: build-stamp
build-indep: build-stamp
build-stamp:
dh_testdir
./configure --prefix=/usr --mandir=/usr/share/man
$(MAKE) all doc
> $@
binary: binary-arch binary-indep
binary-arch: build
dh_testdir
dh_testroot
dh_clean
dh_installdirs usr/bin usr/share/man/man1
$(MAKE) INSTALLROOT=$(CURDIR)/debian/nasm install install_rdf
dh_installdocs AUTHORS README TODO doc/html doc/nasmdoc.txt doc/nasmdoc.ps doc/nasmdoc.pdf
dh_installexamples misc/nasm.sl test/*
dh_installman debian/*.1
dh_installinfo doc/info/*
dh_installchangelogs CHANGES
dh_strip
dh_compress
dh_fixperms
dh_installdeb
dh_shlibdeps
dh_gencontrol
dh_md5sums
dh_builddeb
binary-indep: build
.PHONY: clean build binary binary-arch binary-indep
|