0 # NetBSD and OpenBSD makefile

1 SHELL = /bin/sh

2

3 PREFIX = /usr/local

4 CFLAGS = -O2 -Wall -Wpedantic -Wextra

5 CC = cc

6 FLAGS = -DTERMINAL_IMG_VIEWER -DHIDE_HOME

7 LIBSPATH = -L./lib -L/usr/local/lib -L/usr/pkg/lib

8 INCLUDES = -I./include -I/usr/local/include -I/usr/pkg/include

9 LIBS = -s -static -ltls -lcrypto -lssl -lpthread -lm

10 SRC = src/main.c src/cert.c src/display.c src/gemini.c src/img.c src/input.c src/wcwidth.c src/sandbox.c src/str.c src/url.c src/punycode.c src/xdg.c

11 # Uncomment to build on Illumos

12 #LIBS = -s -ltls -lcrypto -lssl -lpthread -lm -lsocket

13 #CC = gcc

14 #CFLAGS = -O2 -Wall -Wpedantic -Wextra -Wformat-truncation=0

15

16 vgmi: src/*

17 ${CC} ${SRC} ${FLAGS} ${CFLAGS} ${INCLUDES} ${LIBSPATH} ${LIBS} -o $@

18

19 install:

20 cp vgmi ${PREFIX}/bin

21 chmod 755 ${PREFIX}/bin/vgmi

22

23 uninstall:

24 rm ${PREFIX}/bin/vgmi

25

26 clean:

27 rm -f vgmi

28