Files

21 lines
407 B
Makefile
Raw Permalink Normal View History

CFLAGS += -Wall -Wextra -O2 -Wno-unused-result $(shell pkg-config --cflags hidapi-hidraw)
LDFLAGS += $(shell pkg-config --libs hidapi-hidraw)
TARGET = kbd
SRC = src/main.c
.PHONY: all clean install
all: $(TARGET)
$(TARGET): $(SRC)
$(CC) $(CFLAGS) -o $@ $< $(LDFLAGS)
2026-06-27 16:00:56 +08:00
PREFIX ?= /usr/local
install: $(TARGET)
2026-06-27 16:00:56 +08:00
install -D -m 0755 $(TARGET) $(DESTDIR)$(PREFIX)/bin/$(TARGET)
clean:
rm -f $(TARGET)