0 # FreeBSD makefile

1 SHELL?= /bin/sh

2

3 PREFIX = /usr/local

4 CC?= cc

5 CFLAGS+= -O2 -Wall -Wpedantic -Wextra -I/usr/local/include -I./include

6 LDFLAGS+= -s -L./lib -lcasper -lcap_net -L/usr/local/lib -ltls -lcrypto \

7 -lpthread -lm -lssl

8 FLAGS = -DTERMINAL_IMG_VIEWER -DHIDE_HOME

9 SRC = ${:!ls src/*.c!}

10 OBJ = ${SRC:.c=.o}

11

12 .c.o:

13 ${CC} -c ${CFLAGS} ${FLAGS} {body}lt; -o ${<:.c=.o}

14

15 vgmi: ${OBJ}

16 ${CC} -o $@ ${OBJ} ${LDFLAGS}

17

18 install:

19 cp vgmi ${PREFIX}/bin

20 chmod 755 ${PREFIX}/bin/vgmi

21

22 uninstall:

23 rm ${PREFIX}/bin/vgmi

24

25 clean:

26 rm -f vgmi

27 rm ${OBJ}

28