summaryrefslogtreecommitdiff
path: root/Makefile
blob: 6a2e08e586372b7cc862956ef37fde2dc508060e (plain)
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
33
34
35
36
# queryt - youtube query tool
# See LICENSE file for copyright and license details.

# Source Code
SRC = queryt.c src/utils.c src/video.c libs/curl.c libs/string.c libs/json.c

# Libraries
LIBS = -lcurl -ljson-c

## Uncomment for OpenBSD
# LIBS = -lcurl -ljson-c -I/usr/local/include -L/usr/local/lib

# Compiled Code
CLEAN = queryt queryt_debug

# MakeOPTS
build: clean
	cc -o queryt ${SRC} ${LIBS}

debug: clean
	cc -g -o queryt_debug ${SRC} ${LIBS}

clean:
	rm -rf ${CLEAN}

install: build
	mkdir -p /usr/local/bin
	cp -f queryt /usr/local/bin
	chmod 755 /usr/local/bin
	mkdir -p /usr/local/share/man/man1
	cp -f queryt.1 /usr/local/share/man/man1
	chmod 644 /usr/local/share/man/man1/queryt.1

uninstall:
	rm -rf /usr/local/bin/queryt
	rm -f /usr/local/share/man/man1/queryt.1