]> cvs.zerfleddert.de Git - usb-driver/blame - Makefile
ignore bus-id on XILINX_USB_DEV setting missing a device-id
[usb-driver] / Makefile
CommitLineData
05e1bfcd 1#Add -DFORCE_PC3_IDENT to CFLAGS to force the identification of
2#a Parallel Cable III
81cf3658 3CFLAGS=-Wall -fPIC -DUSB_DRIVER_VERSION="\"$(shell stat -c '%y' usb-driver.c |cut -d\. -f1)\"" #-DFORCE_PC3_IDENT
2c2119eb 4
69a88eeb
MG
5LIBS=-ldl -lusb -lpthread
6
7SRC=usb-driver.c parport.c config.c jtagmon.c
8HEADER=usb-driver.h parport.h jtagkey.h config.h jtagmon.h
9
d59d5fb4 10ifeq ($(LIBVER),32)
7517e9fe
MG
11CFLAGS += -m32
12endif
13
19b2e286 14FTDI := $(shell libftdi-config --libs 2>/dev/null)
15ifneq ($(FTDI),)
69a88eeb 16SRC += jtagkey.c
19b2e286 17CFLAGS += -DJTAGKEY
69a88eeb 18LIBS += $(FTDI)
19b2e286 19endif
20
05e1bfcd 21SOBJECTS=libusb-driver.so libusb-driver-DEBUG.so
cdc9c5bf 22
23all: $(SOBJECTS)
d59d5fb4 24 @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 25
69a88eeb
MG
26libusb-driver.so: $(SRC) $(HEADER) Makefile
27 $(CC) $(CFLAGS) $(SRC) -o $@ $(LIBS) -shared
cdc9c5bf 28
69a88eeb
MG
29libusb-driver-DEBUG.so: $(SRC) $(HEADER) Makefile
30 $(CC) -DDEBUG $(CFLAGS) $(SRC) -o $@ $(LIBS) -shared
7517e9fe
MG
31
32lib32:
d59d5fb4 33 $(MAKE) LIBVER=32 clean all
cdc711dc 34
35clean:
cdc9c5bf 36 rm -f $(SOBJECTS)
2c0c1255 37
69a88eeb 38.PHONY: clean all lib32
Impressum, Datenschutz