relay-switch/Makefile

22 lines
359 B
Makefile
Raw Permalink Normal View History

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/