]> cvs.zerfleddert.de Git - usb-driver/blame_incremental - Makefile
Describe how to enable the native libusb-support in ISE Design Suite 10.1
[usb-driver] / Makefile
... / ...
CommitLineData
1#Add -DFORCE_PC3_IDENT to CFLAGS to force the identification of
2#a Parallel Cable III
3CFLAGS=-Wall -fPIC -DUSB_DRIVER_VERSION="\"$(shell stat -c '%y' usb-driver.c |cut -d\. -f1)\"" #-DFORCE_PC3_IDENT
4
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
10ifeq ($(LIBVER),32)
11CFLAGS += -m32
12endif
13
14FTDI := $(shell libftdi-config --libs 2>/dev/null)
15ifneq ($(FTDI),)
16SRC += jtagkey.c
17CFLAGS += -DJTAGKEY
18LIBS += $(FTDI)
19endif
20
21SOBJECTS=libusb-driver.so libusb-driver-DEBUG.so
22
23all: $(SOBJECTS)
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
25
26libusb-driver.so: $(SRC) $(HEADER) Makefile
27 $(CC) $(CFLAGS) $(SRC) -o $@ $(LIBS) -shared
28
29libusb-driver-DEBUG.so: $(SRC) $(HEADER) Makefile
30 $(CC) -DDEBUG $(CFLAGS) $(SRC) -o $@ $(LIBS) -shared
31
32lib32:
33 $(MAKE) LIBVER=32 clean all
34
35clean:
36 rm -f $(SOBJECTS)
37
38.PHONY: clean all lib32
Impressum, Datenschutz