#!/usr/bin/make -f include /usr/share/dpatch/dpatch.make PACKAGE=linux-libc-dev-armel-cross TARGET=arm # XXX Set architecture according to TARGET # Uncomment this to turn on verbose mode. #export DH_VERBOSE=1 TARFILE=linux-2.6.tar.bz2 SOURCE_DIR=src BUILD_DIR=build unpack: unpack-stamp unpack-stamp: ## mkdir -p $(SOURCE_DIR) ## cd $(SOURCE_DIR) && tar xj --strip-components=1 < $(CURDIR)/$(TARFILE) ln -sf /usr/src/linux-2.6 $(SOURCE_DIR) touch unpack-stamp ## configure: configure-stamp ## configure-stamp: unpack-stamp ## dh_testdir ## mkdir -p $(BUILD_DIR) ## cd $(BUILD_DIR) && env CC="gcc" $(CURDIR)/$(SOURCE_DIR)/configure $(CONFARGS) ## touch configure-stamp ## #build: configure-stamp build-stamp ## build: unpack-stamp build-stamp ## build-stamp: ## #patch-stamp ## dh_testdir ## touch build-stamp clean: unpatch dh_testdir dh_testroot rm -f build-stamp configure-stamp unpack-stamp rm -rf $(BUILD_DIR) $(SOURCE_DIR) dh_clean install: unpack dh_testdir dh_testroot dh_clean -k dh_installdirs cd $(SOURCE_DIR) && $(MAKE) ARCH=$(TARGET) \ INSTALL_HDR_PATH="$(CURDIR)/debian/$(PACKAGE)/usr/arm-linux-gnueabi" \ headers_install ## # Files also in main binutils pkg ## cd debian/$(PACKAGE)/usr && \ ## rm -rf lib/libiberty.* lib/libbfd.* lib/libopcodes* \ ## include/bfd.h include/ansidecl.h include/bfdlink.h \ ## share/locale share/man share/info include/symcat.h include/dis-asm.h \ ## info # other not strictly needed files #cd debian/$(PACKAGE)/usr && \ #rm -rf z80-unknown-coff i486-linux-gnu binary-indep: install binary-arch: install dh_testdir dh_testroot dh_installdocs -n dh_installman dh_undocumented dh_installchangelogs dh_link dh_strip dh_compress dh_fixperms dh_installdeb dh_shlibdeps dh_gencontrol dh_md5sums dh_builddeb binary: binary-indep binary-arch .PHONY: build clean binary-indep binary-arch binary install configure unpack