blob: 35b351ae5025049bf90411fb472b5fe1eddd7c82 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
|
CXX = g++
CXXFLAGS = -Wall -Wextra -O2 -std=c++17
INSTALL_DIR = $(HOME)/prefix/bin
BINS = brightness gbrightness
.PHONY: all clean install
all: $(BINS)
clean:
rm -f $(BINS)
install:
sudo install -o root brightness $(INSTALL_DIR)
sudo chmod +s $(INSTALL_DIR)/brightness
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
|