-
Notifications
You must be signed in to change notification settings - Fork 15
/
Makefile
32 lines (23 loc) · 852 Bytes
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
CFLAGS = $(shell pkg-config --cflags libusb-1.0)
LDFLAGS = $(shell pkg-config --libs libusb-1.0)
PREFIX?=/usr/local
all: pl2303gpio pl2303gcgpio cp2103gpio
OBJS=usb.c main.c
pl2303gpio: $(OBJS) pl2303.o
$(CC) $(CFLAGS) -Wall -Werror -I"../include" -o $(@) $(^) $(LDFLAGS)
pl2303gcgpio: $(OBJS) pl2303gc.o
$(CC) $(CFLAGS) -Wall -Werror -I"../include" -o $(@) $(^) $(LDFLAGS)
cp2103gpio: $(OBJS) cp2103.o
$(CC) $(CFLAGS) -Wall -Werror -I"../include" -o $(@) $(^) $(LDFLAGS)
clean:
-rm pl2303gpio pl2303gcgpio cp2103gpio
install: pl2303gpio cp2103gpio
cp pl2303gpio $(PREFIX)/bin
cp cp2103gpio $(PREFIX)/bin
install-rules:
cp 10-pl2303_cp210x_userspace.rules /etc/udev/rules.d
udevadm control --reload-rules
install-scripts:
cp extra/serverctl $(PREFIX)/bin/
cp extra/serverd.lua $(PREFIX)/bin/
cp etc/serverd.conf $(PREFIX)/etc/