aboutsummaryrefslogtreecommitdiffstats
path: root/Makefile
blob: 7de3dbc740b9d4e700ae93704a49a4fd55339a60 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
# kj-youtube-dl - GTK3 GUI wrapper for yt-dlp
# See LICENSE file for copyright and license details.

include src/config.mk

SRC = src/main.c
OBJ = src/main.o

all: bin/kj-youtube-dl

src/main.o: src/main.c
	$(CC) $(CFLAGS) $(INCS) -c $< -o $@

bin/kj-youtube-dl: $(OBJ)
	mkdir -p bin
	$(CC) -o $@ $(OBJ) $(LDFLAGS) $(LIBS)

clean:
	rm -f bin/kj-youtube-dl $(OBJ)

install: all
	mkdir -p $(DESTDIR)$(PREFIX)/bin
	cp -f bin/kj-youtube-dl $(DESTDIR)$(PREFIX)/bin
	chmod 755 $(DESTDIR)$(PREFIX)/bin/kj-youtube-dl
	mkdir -p $(DESTDIR)$(PREFIX)/share/applications
	cp -f kj-youtube-dl.desktop $(DESTDIR)$(PREFIX)/share/applications

uninstall:
	rm -f $(DESTDIR)$(PREFIX)/bin/kj-youtube-dl
	rm -f $(DESTDIR)$(PREFIX)/share/applications/kj-youtube-dl.desktop

.PHONY: all clean install uninstall