From 16399fab9e592cf1e12f1fd56c11f12ae9bc575f Mon Sep 17 00:00:00 2001 From: Jan Wolff Date: Thu, 8 Jul 2021 20:31:34 +0200 Subject: initial commit --- Makefile | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 Makefile (limited to 'Makefile') diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..7055763 --- /dev/null +++ b/Makefile @@ -0,0 +1,24 @@ +CC ?= gcc +CFLAGS ?= -std=c99 -Wall -Werror +OBJ = wakeup.o +BIN = wakeup +PREFIX ?= /usr + +prog: $(OBJ) + $(CC) $(CFLAGS) $(OBJ) -o $(BIN) + +%.o: %.c + $(CC) $(CFLAGS) -c $< + +install: prog + mkdir -p ${PREFIX}/bin + install -m 755 -o root -g root -s ${BIN} ${PREFIX}/bin + +format: + clang-format -i *.c + +clean: + rm *.o + rm $(BIN) + +.PHONY: install format clean -- cgit v1.2.3