summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorTom Smeding <t.j.smeding@uu.nl>2022-08-30 16:00:36 +0200
committerTom Smeding <t.j.smeding@uu.nl>2022-08-30 16:00:36 +0200
commitf81c9e531fba1831397e4c319ba352c07b24f564 (patch)
treeebc7b4f38753d738fbcd327f539f04075103ba09 /Makefile
parent989334821826bc16adf8d3c93a5a9d6be813b796 (diff)
gbrightnessHEADmaster
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile15
1 files changed, 10 insertions, 5 deletions
diff --git a/Makefile b/Makefile
index 8584d48..35b351a 100644
--- a/Makefile
+++ b/Makefile
@@ -1,20 +1,25 @@
CXX = g++
-CXXFLAGS = -Wall -Wextra -O2 -std=c++11
+CXXFLAGS = -Wall -Wextra -O2 -std=c++17
INSTALL_DIR = $(HOME)/prefix/bin
-BIN = brightness
+BINS = brightness gbrightness
.PHONY: all clean install
-all: $(BIN)
+all: $(BINS)
clean:
- rm -f $(BIN)
+ rm -f $(BINS)
install:
sudo install -o root brightness $(INSTALL_DIR)
sudo chmod +s $(INSTALL_DIR)/brightness
-$(BIN): brightness.cpp $(wildcard *.h)
+brightness: brightness.cpp
$(CXX) $(CXXFLAGS) $(filter %.cpp,$^) -o $@
+
+UTILS = $(patsubst %,got-gui/%,gui.cpp gui.h xutil.cpp xutil.h command.cpp command.h)
+
+gbrightness: gbrightness.cpp $(UTILS)
+ $(CXX) $(CXXFLAGS) $(filter %.cpp,$^) -o $@ -lX11