relay-switch: Initial commit

Signed-off-by: Thomas Klaehn <tkl@blackfinn.de>
This commit is contained in:
2018-01-16 20:24:01 +01:00
commit b746a9907c
5 changed files with 144 additions and 0 deletions

21
Makefile Normal file
View File

@@ -0,0 +1,21 @@
DEPENDENCIES := -lpthread -lrt
CFLAGS := -Wall -Wextra -Iftdi
CC ?= gcc
BUILDDIR := build
APP = $(BUILDDIR)/relay-switch
all: $(APP)
$(APP): src/main.c
@mkdir -p $(BUILDDIR)
$(CC) src/main.c -o $(APP) $(CFLAGS) -lftdi $(DEPENDENCIES)
clean:
-rm -f $(APP)
install: all
install -m 755 $(APP) /usr/local/bin/
install -m 644 udev/* /etc/udev/rules.d/