]>
Commit | Line | Data |
---|---|---|
05e1bfcd | 1 | #Add -DFORCE_PC3_IDENT to CFLAGS to force the identification of |
2 | #a Parallel Cable III | |
adb51cf1 MG |
3 | #Add -DNO_USB_RESET to disable the hard reset of the cable when |
4 | #opening the device | |
bbc3baea | 5 | CFLAGS=-Wall -fPIC -DUSB_DRIVER_VERSION="\"$(shell stat -c '%y' usb-driver.c |cut -d\. -f1)\"" #-DFORCE_PC3_IDENT -DNO_USB_RESET |
2c2119eb | 6 | |
69a88eeb MG |
7 | LIBS=-ldl -lusb -lpthread |
8 | ||
9 | SRC=usb-driver.c parport.c config.c jtagmon.c | |
10 | HEADER=usb-driver.h parport.h jtagkey.h config.h jtagmon.h | |
11 | ||
d59d5fb4 | 12 | ifeq ($(LIBVER),32) |
7517e9fe MG |
13 | CFLAGS += -m32 |
14 | endif | |
15 | ||
19b2e286 | 16 | FTDI := $(shell libftdi-config --libs 2>/dev/null) |
17 | ifneq ($(FTDI),) | |
69a88eeb | 18 | SRC += jtagkey.c |
19b2e286 | 19 | CFLAGS += -DJTAGKEY |
69a88eeb | 20 | LIBS += $(FTDI) |
19b2e286 | 21 | endif |
22 | ||
05e1bfcd | 23 | SOBJECTS=libusb-driver.so libusb-driver-DEBUG.so |
cdc9c5bf | 24 | |
25 | all: $(SOBJECTS) | |
d59d5fb4 | 26 | @file libusb-driver.so | grep x86-64 >/dev/null && echo Built library is 64 bit. Run \`make lib32\' to build a 32 bit version || true |
7216ce6c | 27 | |
69a88eeb MG |
28 | libusb-driver.so: $(SRC) $(HEADER) Makefile |
29 | $(CC) $(CFLAGS) $(SRC) -o $@ $(LIBS) -shared | |
cdc9c5bf | 30 | |
69a88eeb MG |
31 | libusb-driver-DEBUG.so: $(SRC) $(HEADER) Makefile |
32 | $(CC) -DDEBUG $(CFLAGS) $(SRC) -o $@ $(LIBS) -shared | |
7517e9fe MG |
33 | |
34 | lib32: | |
d59d5fb4 | 35 | $(MAKE) LIBVER=32 clean all |
cdc711dc | 36 | |
37 | clean: | |
cdc9c5bf | 38 | rm -f $(SOBJECTS) |
2c0c1255 | 39 | |
69a88eeb | 40 | .PHONY: clean all lib32 |