diff --git a/usbboot/configure.ac b/usbboot/configure.ac index d7c7459..9253dd2 100644 --- a/usbboot/configure.ac +++ b/usbboot/configure.ac @@ -9,6 +9,18 @@ AM_CONFIG_HEADER([config.h]) AM_MAINTAINER_MODE +AC_ARG_ENABLE([firmware], + [AS_HELP_STRING([--disable-firmware], + [Do not build initialization code] + [(for example, because some other package contains it).])], + [ +case "$enableval" in +yes) firmware=true ;; +no) firmware=false ;; +*) AC_MSG_ERROR([bad value $enableval for --enable-firmware]) ;; +esac],[firmware=false]) +AM_CONDITIONAL([COND_FIRMWARE], [test "$firmware" = true]) + # Checks for programs. AC_PROG_CC AC_PROG_CXX diff --git a/usbboot/src/Makefile.am b/usbboot/src/Makefile.am index fb61303..e3e937d 100644 --- a/usbboot/src/Makefile.am +++ b/usbboot/src/Makefile.am @@ -12,8 +12,11 @@ usbboot_SOURCES = cmd.c command_line.c ingenic_cfg.c \ ingenic_usb.c main.c pkgdatadir = $(datadir)/xburst-tools/ + +if COND_FIRMWARE pkgdata_DATA = ../xburst_stage1/xburst_stage1.bin \ ../xburst_stage2/xburst_stage2.bin +endif cfgdir = $(sysconfdir)/xburst-tools/ cfg_DATA = ../doc/usbboot.cfg