-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathMakefile
More file actions
35 lines (27 loc) · 740 Bytes
/
Makefile
File metadata and controls
35 lines (27 loc) · 740 Bytes
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
SHELL = /bin/sh
PREFIX = /usr/local
CC = cc
CFLAGS = -O2 -Wall -Wpedantic -Wextra -I/usr/local/include -I./include
LDFLAGS = -s -L./lib -L/usr/local/lib -ltls -lssl -lcrypto -lpthread -lm
FLAGS =
HEADERS != (ls src/*.h)
SRC != (ls src/*.c)
OBJ = ${SRC:.c=.o}
OS != (uname -s)
.if ${OS} == "FreeBSD"
LDFLAGS += -lcasper -lcap_net
.endif
.c.o: ${HEADERS}
${CC} -c ${CFLAGS} ${FLAGS} $< -o ${<:.c=.o}
vgmi: ${OBJ} stb_image/stb_image.o
${CC} -o $@ ${OBJ} stb_image/stb_image.o ${LDFLAGS}
stb_image/stb_image.o: stb_image/stb_image.c
${CC} -O2 -c -o stb_image/stb_image.o -I./include stb_image/stb_image.c
install:
cp vgmi ${PREFIX}/bin/
chmod 755 ${PREFIX}/bin/vgmi
uninstall:
rm ${PREFIX}/bin/vgmi
clean:
rm -f vgmi
rm ${OBJ}