From 6412e6fd0f9f306b6b488191623c3ad0c6ea553c Mon Sep 17 00:00:00 2001 From: Tom Smeding Date: Tue, 5 Feb 2019 13:59:25 +0100 Subject: Initial --- Makefile | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 Makefile (limited to 'Makefile') diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..8317a0b --- /dev/null +++ b/Makefile @@ -0,0 +1,20 @@ +CC = gcc +CFLAGS = -Wall -Wextra -O2 -std=c11 -fwrapv +INSTALL_DIR = $(HOME)/prefix/bin + +BIN = brightness + +.PHONY: all clean install + +all: $(BIN) + +clean: + rm -f $(BIN) + +install: + sudo install -o root brightness $(INSTALL_DIR) + sudo chmod +s $(INSTALL_DIR)/brightness + + +$(BIN): brightness.c $(wildcard *.h) + $(CC) $(CFLAGS) $(filter %.c,$^) -o $@ -- cgit v1.2.3-70-g09d2