]> git.zerfleddert.de Git - usb-driver/blob - Makefile
only close the parallel port when it was really openend
[usb-driver] / Makefile
1 #Add -DFORCE_PC3_IDENT to CFLAGS to force the identification of
2 #a Parallel Cable III
3 CFLAGS=-Wall -fPIC -DUSB_DRIVER_VERSION="\"$(shell stat -c '%y' usb-driver.c |cut -d\. -f1)\"" #-DFORCE_PC3_IDENT
4
5 LIBS=-ldl -lusb -lpthread
6
7 SRC=usb-driver.c parport.c config.c jtagmon.c
8 HEADER=usb-driver.h parport.h jtagkey.h config.h jtagmon.h
9
10 ifeq ($(LIBVER),32)
11 CFLAGS += -m32
12 endif
13
14 FTDI := $(shell libftdi-config --libs 2>/dev/null)
15 ifneq ($(FTDI),)
16 SRC += jtagkey.c
17 CFLAGS += -DJTAGKEY
18 LIBS += $(FTDI)
19 endif
20
21 SOBJECTS=libusb-driver.so libusb-driver-DEBUG.so
22
23 all: $(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
26 libusb-driver.so: $(SRC) $(HEADER) Makefile
27 $(CC) $(CFLAGS) $(SRC) -o $@ $(LIBS) -shared
28
29 libusb-driver-DEBUG.so: $(SRC) $(HEADER) Makefile
30 $(CC) -DDEBUG $(CFLAGS) $(SRC) -o $@ $(LIBS) -shared
31
32 lib32:
33 $(MAKE) LIBVER=32 clean all
34
35 clean:
36 rm -f $(SOBJECTS)
37
38 .PHONY: clean all lib32
Impressum, Datenschutz