aboutsummaryrefslogtreecommitdiff
path: root/Makefile
blob: 96276ef12c3e6026e0b8a9bbaa8d80a429e1caa5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
# Copied directly from dragon https://github.com/mwh/dragon on 2021-07-22
PREFIX = $(HOME)/.local
MANPREFIX = $(PREFIX)/share/man
NAME = dragon

all: $(NAME)

$(NAME): dragon.c
	$(CC) --std=c99 -Wall $(DEFINES) dragon.c -o $(NAME) `pkg-config --cflags gtk+-3.0` `pkg-config --libs gtk+-3.0`

install: $(NAME)
	mkdir -p $(DESTDIR)$(PREFIX)/bin
	cp -f $(NAME) $(DESTDIR)$(PREFIX)/bin
	chmod 755 $(DESTDIR)$(PREFIX)/bin/$(NAME)
	mkdir -p $(DESTDIR)$(MANPREFIX)/man1
	sed -e "s/dragon/$(NAME)/g" dragon.1 > $(DESTDIR)$(MANPREFIX)/man1/$(NAME).1
	chmod 644 $(DESTDIR)$(MANPREFIX)/man1/$(NAME).1

uninstall:
	rm -f $(DESTDIR)$(PREFIX)/bin/$(NAME) $(DESTDIR)$(MANPREFIX)/man1/$(NAME).1
bgstack15