#!/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
export HOME=$(CURDIR)/build
+CPPFLAGS = $(shell dpkg-buildflags --get CPPFLAGS)
+CFLAGS = $(shell dpkg-buildflags --get CFLAGS)
+CXXFLAGS:=$(shell dpkg-buildflags --get CXXFLAGS)
+LDFLAGS = $(shell dpkg-buildflags --get LDFLAGS)
+
+CFLAGS += -Wall -Wno-comment
+
ifneq (,$(findstring debug,$(DEB_BUILD_OPTIONS)))
CFLAGS += -g -O0
export STRIP=true
INSTALL_PROGRAM += -s
endif
-clean: clean-patched unpatch
-clean-patched:
+clean:
dh_testdir
dh_testroot
# Clean up files that Makefile should have cleaned
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
--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
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
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
$(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