patches from Kamal Mostafa <kamal@whence.com> for rules and gcc 4.6.3 issues
[debian/cc1111] / debian / rules
index f0a0ea22bc31573933e369562f5e3cd4140bdac7..171c82a56672df9e6e2f7811635800378dfdc144 100755 (executable)
@@ -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,10 +9,10 @@ DEB_BUILD_GNU_TYPE  ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)
 
 export HOME=$(CURDIR)/build
 
-CFLAGS = `dpkg-buildflags --get CFLAGS`
+CFLAGS = $(shell dpkg-buildflags --get CFLAGS)
 CFLAGS += -Wall -Wno-comment
-LDFLAGS = `dpkg-buildflags --get LDFLAGS`
-CPPFLAGS = `dpkg-buildflags --get CPPFLAGS`
+LDFLAGS = $(shell dpkg-buildflags --get LDFLAGS)
+CPPFLAGS = $(shell dpkg-buildflags --get CPPFLAGS)
 
 ifneq (,$(findstring debug,$(DEB_BUILD_OPTIONS)))
        CFLAGS += -g -O0
@@ -23,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
@@ -59,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
@@ -89,7 +87,7 @@ 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
@@ -100,7 +98,7 @@ 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
@@ -134,6 +132,12 @@ install-stamp: build
        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