diff options
author | pancake <pancake@dazo> | 2007-06-12 23:43:35 +0200 |
---|---|---|
committer | pancake <pancake@dazo> | 2007-06-12 23:43:35 +0200 |
commit | ed3cb1d3f8f21a067b30a9d6695515a791895c74 (patch) | |
tree | 870f7a4117da346d0a66cc4d497451fa93c417e6 | |
parent | ea97ac427eb9ff7ec48baf3a5ab7cc293fc34b70 (diff) | |
download | 0xFFFF-ed3cb1d3f8f21a067b30a9d6695515a791895c74.tar.bz2 |
* Finally integrate libusb in Makefiles. Use 'allusb' target to build a 0xFFFF binary without library dependencies (libusb)
* Add 'static' makefile target for building a statically linked 0xFFFF
* Documentate all makefile targets in INSTALL
-rw-r--r-- | INSTALL | 13 | ||||
-rw-r--r-- | Makefile | 12 | ||||
-rw-r--r-- | src/Makefile | 8 |
3 files changed, 31 insertions, 2 deletions
@@ -9,10 +9,21 @@ Just type: $ make +The most interesting targets for make are: + + all normal build + allusb builds 0xFFFF without libusb dependency (embedded) + static builds 0xFFFF statically (no need for libusb) + + install installs into /usr/local by default + + clean clean compilation objects and generated binaries + + The installation procedure is quite simple and you can define a new PREFIX manually from the command line: - $ make install PREFIX=/usr + $ sudo make install PREFIX=/usr The default one is /usr/local (not very userfriendly but standards are standards :P hehe) @@ -1,7 +1,17 @@ PREFIX?=/usr/local -all: +all: logot cd src && ${MAKE} all + +static: logot + cd libusb && ${MAKE} all + cd src && ${MAKE} static + +allusb: logot + cd libusb && ${MAKE} all + cd src && ${MAKE} allusb + +logot: cd logotool && ${MAKE} all clean: diff --git a/src/Makefile b/src/Makefile index 7f635d7..5d9203b 100644 --- a/src/Makefile +++ b/src/Makefile @@ -3,9 +3,17 @@ 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 CFLAGS+=-DVERSION=\"${VERSION}\" -Wall -g -I . +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 +allusb: ${OBJ} + ${CC} ${LDFLAGS} -o ${BIN} ${OBJ} ${USBOBJ} + +static: ${OBJ} + ${CC} ${LDFLAGS} -o ${BIN} -static ${OBJ} ${USBOBJ} + clean: -rm -f ${OBJ} ${BIN} |