modify to work on etch, identify architecture host and build with dpkg-architecture

This commit is contained in:
Laurent Vivier 2007-03-22 15:59:06 +00:00
parent cdc94e3962
commit 99efa437be

18
debian/rules vendored
View File

@ -5,25 +5,20 @@
# Uncomment this to turn on verbose mode.
DEB_BUILD_ARCH ?= $(shell dpkg-architecture -qDEB_BUILD_ARCH)
HOST=$(shell uname -m)
ifeq ($(HOST),i686)
ifeq ($(DEB_BUILD_ARCH),i386)
HOST=i386
endif
endif
DEB_HOST_ARCH ?= $(shell dpkg-architecture -qDEB_HOST_ARCH)
ifeq ($(DEB_BUILD_ARCH),$(HOST))
ifeq ($(DEB_HOST_ARCH),$(DEB_BUILD_ARCH))
CROSS_COMPILE=
else
CROSS_COMPILE=$(DEB_BUILD_ARCH)-linux-
CROSS_COMPILE=$(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)-
endif
ifeq ($(HOST),m68k)
ifeq ($(DEB_BUILD_ARCH),m68k)
M68K_CROSS_COMPILE=
target=all
target_install=install
else
M68K_CROSS_COMPILE=m68k-linux-
M68K_CROSS_COMPILE=$(shell dpkg-architecture -qDEB_HOST_GNU_TYPE -am68k)-
M68K_GCC_PATH=$(shell $(M68K_CROSS_COMPILE)gcc -dumpversion)
ifeq ($(M68K_GCC_PATH),)
target=docs tools
@ -40,8 +35,7 @@ build: build-stamp
build-stamp:
dh_testdir
# Add here commands to compile the package.
$(MAKE) M68K_CROSS_COMPILE="$(M68K_CROSS_COMPILE)" CROSS_COMPILE="$(CROSS_COMPILE)" $(target)
$(MAKE) M68K_CROSS_COMPILE="$(M68K_CROSS_COMPILE)" CROSS_COMPILE="$(CROSS_COMPILE)" CC=$(CROSS_COMPILE)gcc AS=$(CROSS_COMPILE)as ld=$(CROSS_COMPILE)ld $(target)
touch build-stamp
clean: