X-Git-Url: https://git.gag.com/?a=blobdiff_plain;f=debian%2Frules;h=01210e1b7493e00c60a668abb1464af9b4fd97f5;hb=ca97207f24e28146e0dc79ca90a5cd8ac6bb9630;hp=9913097f7f809bfc828f9c4cc19f025a939ed91e;hpb=9cdab02e31f9c3cada74eeec48b75e9f2d8cf6cd;p=debian%2Fcc1111 diff --git a/debian/rules b/debian/rules index 9913097..01210e1 100755 --- a/debian/rules +++ b/debian/rules @@ -1,6 +1,5 @@ #!/usr/bin/make -f -include /usr/share/quilt/quilt.make export DH_VERBOSE=1 # These are used for cross-compiling and for saving the configure script @@ -10,6 +9,11 @@ DEB_BUILD_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE) export HOME=$(CURDIR)/build +CFLAGS = `dpkg-buildflags --get CFLAGS` +CFLAGS += -Wall -Wno-comment +LDFLAGS = `dpkg-buildflags --get LDFLAGS` +CPPFLAGS = `dpkg-buildflags --get CPPFLAGS` + ifneq (,$(findstring debug,$(DEB_BUILD_OPTIONS))) CFLAGS += -g -O0 export STRIP=true @@ -18,8 +22,7 @@ ifeq (,$(findstring nostrip,$(DEB_BUILD_OPTIONS))) INSTALL_PROGRAM += -s endif -clean: clean-patched unpatch -clean-patched: +clean: dh_testdir dh_testroot # Clean up files that Makefile should have cleaned @@ -54,7 +57,7 @@ clean-patched: dh_clean configure: configure-stamp -configure-stamp: $(QUILT_STAMPFN) +configure-stamp: dh_testdir mkdir -p $(CURDIR)/build cp /usr/share/misc/config.sub sim/ucsim/config.sub @@ -78,11 +81,13 @@ configure-stamp: $(QUILT_STAMPFN) --disable-z80-port touch $@ -build: build-stamp -build-stamp: configure-stamp +build: build-arch build-indep +build-arch: build-stamp +build-indep: build-stamp +build-stamp: configure-stamp dh_testdir $(MAKE) - cd doc && lyx -e ps sdccman.lyx +# cd doc && lyx -e ps sdccman.lyx touch $@ install: install-stamp @@ -93,11 +98,10 @@ install-stamp: build dh_prep $(MAKE) install prefix=$(CURDIR)/debian/tmp/usr mkdir -p debian/tmp/usr/share/doc/cc1111 - install -o root -g root -m 644 doc/sdccman.ps debian/tmp/usr/share/doc/cc1111 +# install -o root -g root -m 644 doc/sdccman.ps debian/tmp/usr/share/doc/cc1111 mv debian/tmp/usr/share/doc/sdcc/* debian/tmp/usr/share/doc/cc1111/ # Add some scripts mkdir -p debian/tmp/usr/share/sdcc/scripts - install -o root -g root -m 755 support/scripts/inc2h-pic16.pl debian/tmp/usr/share/sdcc/scripts install -o root -g root -m 755 support/scripts/inc2h.pl debian/tmp/usr/share/sdcc/scripts install -o root -g root -m 755 support/scripts/keil2sdcc.pl debian/tmp/usr/share/sdcc/scripts @@ -117,6 +121,23 @@ install-stamp: build $(CURDIR)/debian/cc1111/usr/share/lintian/overrides/cc1111 # Install examples cp -a device/examples $(CURDIR)/debian/cc1111/usr/share/doc/cc1111 + rm -rf $(CURDIR)/debian/cc1111/usr/share/doc/cc1111/examples/ds400 + rm -rf $(CURDIR)/debian/cc1111/usr/share/doc/cc1111/examples/ds390 + rm -rf $(CURDIR)/debian/cc1111/usr/share/doc/cc1111/examples/xa51 + # clean up things cc1111 doesn't need + rm -rf $(CURDIR)/debian/cc1111/usr/share/sdcc/lib/src/pic + rm -rf $(CURDIR)/debian/cc1111/usr/share/sdcc/lib/src/pic16 + rm -rf $(CURDIR)/debian/cc1111/usr/share/sdcc/lib/src/ds400 + rm -rf $(CURDIR)/debian/cc1111/usr/share/sdcc/lib/src/hc08 + rm -rf $(CURDIR)/debian/cc1111/usr/share/sdcc/lib/src/z80 + rm -rf $(CURDIR)/debian/cc1111/usr/share/sdcc/lib/src/ds390 + rm -rf $(CURDIR)/debian/cc1111/usr/share/sdcc/lib/src/gbz80 + rm -rf $(CURDIR)/debian/cc1111/usr/share/sdcc/include/ds400rom.h + rm -rf $(CURDIR)/debian/cc1111/usr/share/sdcc/include/*390* + rm -rf $(CURDIR)/debian/cc1111/usr/share/sdcc/include/asm/pic + rm -rf $(CURDIR)/debian/cc1111/usr/share/sdcc/include/asm/pic16 + rm -rf $(CURDIR)/debian/cc1111/usr/share/sdcc/include/asm/z80 + rm -rf $(CURDIR)/debian/cc1111/usr/share/sdcc/include/asm/gbz80 touch $@ # Must not depend on anything. This is to be called by binary-arch/binary-indep @@ -147,4 +168,4 @@ binary-arch: install $(MAKE) -f debian/rules DH_OPTIONS=-s binary-common binary: binary-arch binary-indep -.PHONY: build clean binary-indep binary-arch binary install install-arch install-indep +.PHONY: build-indep build-arch build clean binary-indep binary-arch binary install install-arch install-indep