From 288cad1c2e401e5dfbd029b95f62ca05c85d3d61 Mon Sep 17 00:00:00 2001 From: pancake Date: Mon, 14 Jan 2008 11:25:08 +0100 Subject: * Up to 0.3.2 * Add HAVE_USB to config.mk - Now is possible to build a usb-less version of the flasher (only for unpacking and so, offline operations) * Refactor varname. Avoid portability problems: - reboot -> moboreboot --- src/Makefile | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'src/Makefile') diff --git a/src/Makefile b/src/Makefile index 1ac4058..de2ba2e 100644 --- a/src/Makefile +++ b/src/Makefile @@ -1,14 +1,16 @@ -VERSION=0.3 +include ../config.mk OBJ=main.o fiasco.o hexdump.o dump.o flash.o serial.o OBJ+=hash.o fpid.o query.o pieces.o utils.o devices.o console.o BIN=0xFFFF +#LIBS=`${HAVE_USB} && echo -- '-lusb'` +LIBS=`if [ "${HAVE_USB}" = 1 ]; then echo '-lusb'; fi` CFLAGS+=-DVERSION=\"${VERSION}\" -Wall -g -I . -CFLAGS+=-pedantic -std=c99 +CFLAGS+=-pedantic -std=c99 -DHAVE_USB=${HAVE_USB} USBOBJ=../libusb/error.o ../libusb/usb.o ../libusb/descriptors.o USBOBJ+=../libusb/linux.o ## XXX not portable all: ${OBJ} - ${CC} ${LDFLAGS} -o ${BIN} ${OBJ} -lusb + ${CC} ${LDFLAGS} -o ${BIN} ${OBJ} ${LIBS} allusb: ${OBJ} ${CC} ${LDFLAGS} -o ${BIN} ${OBJ} ${USBOBJ} -- cgit v1.2.3