summaryrefslogtreecommitdiff
path: root/Makefile
blob: 8584d48755a87365848f51bd78360d0b06625e6b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
CXX = g++
CXXFLAGS = -Wall -Wextra -O2 -std=c++11
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.cpp $(wildcard *.h)
	$(CXX) $(CXXFLAGS) $(filter %.cpp,$^) -o $@