diff --git a/usbboot/src/Makefile.am b/usbboot/src/Makefile.am index 90e256a..a26f03b 100644 --- a/usbboot/src/Makefile.am +++ b/usbboot/src/Makefile.am @@ -1,4 +1,4 @@ -AM_CFLAGS = -pedantic -Wall -W -O1 -g3 -std=gnu99 -lusb -lconfuse +AM_CFLAGS = -pedantic -Wall -W -O1 -g3 -std=gnu99 -lusb -lconfuse -DCFGDIR=\"$(cfgdir)\" xburst-tools_version.h: echo -e '#ifndef XBURST_TOOLS_VERSION' \ @@ -10,15 +10,14 @@ bin_PROGRAMS = usbboot usbboot_SOURCES = cmd.c command_line.c ingenic_cfg.c \ ingenic_usb.c main.c -prefix = /usr -datadir = /usr/share/xburst-tools -data_DATA = ../xburst_stage1/xburst_stage1.bin \ +pkgdatadir = $(datadir)/xburst-tools +pkgdata_DATA = ../xburst_stage1/xburst_stage1.bin \ ../xburst_stage2/xburst_stage2.bin -cfgdir = /etc/xburst-tools +cfgdir = $(sysconfdir)/xburst-tools cfg_DATA = ../doc/usbboot.cfg -EXTRA_DIST = $(datadir) $(cfgdir) +EXTRA_DIST = $(pkgdatadir) $(cfgdir) ../xburst_stage1/xburst_stage1.bin: $(MAKE) CROSS_COMPILE=mipsel-openwrt-linux- -C ../xburst_stage1 diff --git a/usbboot/src/main.c b/usbboot/src/main.c index d34f583..5197059 100644 --- a/usbboot/src/main.c +++ b/usbboot/src/main.c @@ -26,7 +26,7 @@ #include "ingenic_usb.h" #include "ingenic_cfg.h" -#define CONFIG_FILE_PATH "/etc/xburst-tools/usbboot.cfg" +#define CONFIG_FILE_PATH (CFGDIR "xburst-tools/usbboot.cfg") extern struct ingenic_dev ingenic_dev; extern struct hand hand;