summaryrefslogtreecommitdiff
path: root/Makefile
blob: 836be0648f27c68fbb17fb0c40fcfd1396a53c01 (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

# Compiler Flags
FLAGS = -march=native -O3 -pipe -faggressive-loop-optimizations

# Libraries
LIBS = -lcurl -ljson-c

# Compiled Code
CLEAN = queryt queryt_debug

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

debug: clean
	cc -g -o queryt_debug ${FLAGS} ${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