1
0
mirror of git://projects.qi-hardware.com/xburst-tools.git synced 2024-11-01 18:31:54 +02:00
xburst-tools/usbboot/debian/rules
Jonathan Nieder 81adfd188d Do not build firmware on buildds
There is no mipsel cross-compiler packaged for Debian, so building
the firmware on arbitrary build machines is not possible.

So let packagers build firmware when generating the source package.
The built firmware is kept in the debian/ directory and then
copied verbatim to <staging directory>/usr/share/xburst-tools
at the appropriate time.

The commands to prepare the firmware are in a script named
debian/autogen.sh, which could be taught to do other things (such as
generate a changelog) later.

Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
2010-04-05 14:58:29 +08:00

50 lines
1.2 KiB
Makefile
Executable File

#!/usr/bin/make -f
# This file is in the public domain.
# You may freely use, modify, distribute, and relicense it.
build clean install binary-arch binary-indep binary:
+dh --parallel $(opt_no_act) $@
override_dh_auto_clean:
test -e debian/xburst_stage1.bin || { \
echo >&2 see debian/README.source; \
exit 1; \
}
dh_auto_clean
sh debian/clean.sh
override_dh_auto_configure: configure
dh_auto_configure -- $(opt_optimize) $(opt_quiet) \
--disable-firmware LDFLAGS=-Wl,-z,defs
override_dh_auto_install:
dh_auto_install
: install firmware from source package
dh_install debian/xburst_stage1.bin usr/share/xburst-tools/
dh_install debian/xburst_stage2.bin usr/share/xburst-tools/
opt_optimize = CFLAGS="-g -O2"
opt_no_act =
opt_quiet =
ifneq (,$(filter noopt,$(DEB_BUILD_OPTIONS)))
opt_optimize = CFLAGS="-g -O0"
endif
ifneq (,$(findstring n,$(MAKEFLAGS)))
opt_no_act = --no-act
endif
ifneq (,$(filter quiet,$(DEB_BUILD_OPTIONS)))
opt_quiet = --quiet
MAKEFLAGS += --quiet
endif
configure: configure.ac
AUTOMAKE="automake --foreign" autoreconf -is
firmware: configure
./configure --enable-firmware
$(MAKE) -C src ../xburst_stage1/xburst_stage1.bin \
../xburst_stage2/xburst_stage2.bin