summaryrefslogtreecommitdiff
path: root/Makefile
blob: 0fdaec2f4f1e4a73c78c34e1158a17020af56868 (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
# makefile for uirc
# to configure install locations and compiler settings, see config.mk
include config.mk

SRC = uirc.c

uirc: ${SRC}
	${CC} -o uirc -O ${SRC}

install: uirc
	mkdir -p ${PREFIX}/bin
	cp -f uirc ${PREFIX}/bin
	chmod 755 ${PREFIX}/bin/uirc
	mkdir -p ${LIB_PREFIX}/uirc
	cp -f LICENSE ${LIB_PREFIX}/uirc

uninstall:
	rm ${PREFIX}/bin/uirc
	rm -r ${LIB_PREFIX}/uirc
	test -s ${INCLUDE_PREFIX}/uirc || rm -r ${INCLUDE_PREFIX}/uirc

stb:
	@echo "It is best to download the stb library from your system's package manager. 
	@echo "Press ENTER to manually install the stb headers needed. Otherwise, quit with ^C"
	@read
	mkdir -p ${INCLUDE_PREFIX}/uirc
	wget https://raw.githubusercontent.com/nothings/stb/master/stb_image.h -P /usr/include/uirc/stb_image.h

.PHONY: uirc install stb