summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorTom Smeding <tom.smeding@gmail.com>2019-02-05 13:59:25 +0100
committerTom Smeding <tom.smeding@gmail.com>2019-02-05 14:08:46 +0100
commit6412e6fd0f9f306b6b488191623c3ad0c6ea553c (patch)
treef51afd19a22db0a4d77ff3d69d10758325681859 /Makefile
Initial
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 $@