summarylogtreecommitdiffstats
path: root/Makefile
blob: f3ee8360d017c3b673794fb70de097acaf8c0438 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
CC = gcc
CFLAGS = -Wall -Wextra -pedantic -std=c99
TARGET = hyprpad
PREFIX = /usr
CONFIG_DIR = /etc

all: $(TARGET)

$(TARGET): hyprpad.c
	$(CC) $(CFLAGS) -o $(TARGET) hyprpad.c

install: $(TARGET)
	install -Dm755 $(TARGET) $(DESTDIR)$(PREFIX)/bin/$(TARGET)
	if [ -f hyprpad.conf ]; then \
		install -Dm644 hyprpad.conf $(DESTDIR)$(CONFIG_DIR)/hyprpad.conf; \
	fi

uninstall:
	rm -f $(DESTDIR)$(PREFIX)/bin/$(TARGET)
	rm -f $(DESTDIR)$(CONFIG_DIR)/hyprpad.conf

clean:
	rm -f $(TARGET)