summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--INSTALL13
-rw-r--r--Makefile12
-rw-r--r--src/Makefile8
3 files changed, 31 insertions, 2 deletions
diff --git a/INSTALL b/INSTALL
index cb1c382..983d3d2 100644
--- a/INSTALL
+++ b/INSTALL
@@ -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)
diff --git a/Makefile b/Makefile
index 7dafa38..2d0869b 100644
--- a/Makefile
+++ b/Makefile
@@ -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}