summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile20
1 files changed, 20 insertions, 0 deletions
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 $@