Do not segfault when no device is present
[pub/pl2303-ft232-gpio.git] / Makefile
1 CFLAGS = $(shell pkg-config --cflags libusb-1.0)
2 LDFLAGS = $(shell pkg-config --libs libusb-1.0)
3
4 PREFIX?=/usr/local
5
6 all: pl2303gpio
7
8 OBJS=usb.c main.c
9 pl2303gpio: $(OBJS)
10 $(CC) $(CFLAGS) -Wall -Werror -I"../include" -o $(@) $(^) $(LDFLAGS) -lusb
11
12 clean:
13 -rm pl2303gpio
14
15 install: pl2303gpio
16 cp pl2303gpio $(PREFIX)/bin
17 cp 10-pl2303userspace.rules /etc/udev/rules.d