2006-10-08 16:30:17 +00:00
|
|
|
#!/usr/bin/make -f
|
|
|
|
# Sample debian/rules that uses debhelper.
|
|
|
|
# This file is public domain software, originally written by Joey Hess.
|
|
|
|
|
|
|
|
# Uncomment this to turn on verbose mode.
|
|
|
|
|
|
|
|
DEB_BUILD_ARCH ?= $(shell dpkg-architecture -qDEB_BUILD_ARCH)
|
2006-10-09 11:13:05 +00:00
|
|
|
HOST=$(shell uname -m)
|
|
|
|
ifeq ($(HOST),i686)
|
|
|
|
ifeq ($(DEB_BUILD_ARCH),i386)
|
|
|
|
HOST=i386
|
|
|
|
endif
|
|
|
|
endif
|
|
|
|
|
2006-10-09 09:20:51 +00:00
|
|
|
ifeq ($(DEB_BUILD_ARCH),$(HOST))
|
2006-10-09 21:28:59 +00:00
|
|
|
CROSS_COMPILE=
|
2006-10-08 16:30:17 +00:00
|
|
|
else
|
2006-10-09 11:13:05 +00:00
|
|
|
CROSS_COMPILE=$(DEB_BUILD_ARCH)-linux-
|
2006-10-08 16:30:17 +00:00
|
|
|
endif
|
|
|
|
|
2006-10-09 11:13:05 +00:00
|
|
|
ifeq ($(HOST),m68k)
|
2006-10-09 21:28:59 +00:00
|
|
|
M68K_CROSS_COMPILE=
|
|
|
|
target=all
|
|
|
|
target_install=install
|
2006-10-09 11:13:05 +00:00
|
|
|
else
|
|
|
|
M68K_CROSS_COMPILE=m68k-linux-
|
2006-10-09 21:28:59 +00:00
|
|
|
M68K_GCC_PATH=$(shell $(M68K_CROSS_COMPILE)gcc -dumpversion)
|
|
|
|
ifeq ($(M68K_GCC_PATH),)
|
|
|
|
target=docs tools
|
|
|
|
target_install=tools-install docs-install
|
|
|
|
CHMOD_BOOT=0
|
|
|
|
else
|
|
|
|
target=all
|
|
|
|
target_install=install
|
|
|
|
CHMOD_BOOT=1
|
|
|
|
endif
|
2006-10-09 11:13:05 +00:00
|
|
|
endif
|
|
|
|
|
2006-10-08 16:30:17 +00:00
|
|
|
build: build-stamp
|
|
|
|
build-stamp:
|
|
|
|
dh_testdir
|
|
|
|
# Add here commands to compile the package.
|
2006-10-09 11:13:05 +00:00
|
|
|
$(MAKE) M68K_CROSS_COMPILE="$(M68K_CROSS_COMPILE)" CROSS_COMPILE="$(CROSS_COMPILE)" $(target)
|
2006-10-08 16:30:17 +00:00
|
|
|
|
|
|
|
touch build-stamp
|
|
|
|
|
|
|
|
clean:
|
|
|
|
dh_testdir
|
|
|
|
dh_testroot
|
|
|
|
rm -f build-stamp
|
|
|
|
|
|
|
|
# Add here commands to clean up after the build process.
|
|
|
|
-$(MAKE) clean
|
|
|
|
|
|
|
|
dh_clean
|
|
|
|
|
|
|
|
install: build
|
|
|
|
dh_testdir
|
|
|
|
dh_testroot
|
|
|
|
dh_clean -k
|
|
|
|
dh_installdirs
|
|
|
|
|
|
|
|
# Add here commands to install the package into debian/<packagename>
|
2006-10-09 21:28:59 +00:00
|
|
|
$(MAKE) DESTDIR=`pwd`/debian/tmp $(target_install)
|
|
|
|
if test -d `pwd`/debian/tmp/boot/emile/; then chmod -x `pwd`/debian/tmp/boot/emile/*; fi
|
|
|
|
if test -d `pwd`/debian/tmp/lib/emile/; then chmod -x `pwd`/debian/tmp/lib/emile/*; fi
|
|
|
|
|
2006-10-08 16:30:17 +00:00
|
|
|
|
|
|
|
# Build architecture-independent files here.
|
|
|
|
binary-indep: build install
|
|
|
|
dh_testroot -i
|
|
|
|
dh_installchangelogs -i
|
|
|
|
dh_installdocs -i
|
|
|
|
dh_installexamples -i
|
|
|
|
dh_install --sourcedir=debian/tmp -i
|
|
|
|
dh_installman -i
|
|
|
|
dh_link -i
|
|
|
|
dh_strip -i
|
|
|
|
dh_compress -i
|
|
|
|
dh_fixperms -i
|
|
|
|
dh_installdeb -i
|
|
|
|
dh_shlibdeps -i
|
|
|
|
dh_gencontrol -i
|
|
|
|
dh_md5sums -i
|
|
|
|
dh_builddeb -i
|
|
|
|
|
|
|
|
# Build architecture-dependent files here.
|
|
|
|
binary-arch: build install
|
|
|
|
dh_testdir -a
|
|
|
|
dh_testroot -a
|
|
|
|
dh_installchangelogs -a
|
|
|
|
dh_installdocs -a
|
|
|
|
dh_installexamples -a
|
|
|
|
dh_install --sourcedir=debian/tmp -a
|
|
|
|
dh_installman -a
|
|
|
|
dh_link -a
|
|
|
|
dh_strip -a
|
|
|
|
dh_compress -a
|
|
|
|
dh_fixperms -a
|
|
|
|
dh_installdeb -a
|
|
|
|
dh_shlibdeps -a
|
|
|
|
dh_gencontrol -a
|
|
|
|
dh_md5sums -a
|
|
|
|
dh_builddeb -a
|
|
|
|
|
|
|
|
binary: binary-indep binary-arch
|
|
|
|
.PHONY: build clean binary-indep binary-arch binary install
|