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 $@