summaryrefslogtreecommitdiff
path: root/Makefile
blob: 8317a0b716393ee6217d5a571c0061b0995beef2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
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 $@