* 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
This commit is contained in:
1 parent
ea97ac427e
commit
ed3cb1d3f8
3 files changed
+31
-2
No files matched your search
@@ -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:
|
||||
|
||||
@@ -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}
|
||||
Reference in new issue
Block a user