Files
楼湘缘 c9f379df04 Add debian packaging (dpkg-buildpackage)
- debian/control, rules, changelog, copyright
- postinst/prerm for systemd service enable/disable
- Makefile: add PREFIX support for packaging
- .gitignore: exclude build artifacts
2026-06-27 16:00:56 +08:00

21 lines
407 B
Makefile

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)
PREFIX ?= /usr/local
install: $(TARGET)
install -D -m 0755 $(TARGET) $(DESTDIR)$(PREFIX)/bin/$(TARGET)
clean:
rm -f $(TARGET)