commit 5ae24a666e1911031575f533e5ed2245739d7a69 parent 609fe47bb05d96eb9746ffc14e05fe744bd4d006 Author: Kyle Milz <krwmilz@gmail.com> Date: Sun, 29 Aug 2021 16:42:11 +0000 Add new simplified Makefile Use pkg-config to locate header files, libraries, and cflags. Tested working with BSD make and GNU make. Diffstat:
A | Makefile | | | 41 | +++++++++++++++++++++++++++++++++++++++++ |
1 file changed, 41 insertions(+), 0 deletions(-)
diff --git a/Makefile b/Makefile @@ -0,0 +1,41 @@ +PROG = wdvi + +SRCS = dvi-draw.c \ + dvi-init.c \ + events.c \ + filefind.c \ + font-open.c \ + ft.c \ + http.c \ + pk.c \ + popups.c \ + special.c \ + util.c \ + vf.c \ + xdvi.c + +PKGS = freetype2 openssl xaw7 +PKGS_CFLAGS != pkg-config --cflags ${PKGS} +PKGS_LDFLAGS != pkg-config --libs ${PKGS} + +CPPFLAGS += ${PKGS_CFLAGS} +CFLAGS += -Wall -g # -Wunused-parameter +LDFLAGS += -Xlinker --allow-multiple-definition -lm + +${PROG}: ${SRCS:.c=.o} + ${CC} -o ${PROG} ${SRCS:.c=.o} ${LDFLAGS} ${PKGS_LDFLAGS} + +depend: + cpp ${CPPFLAGS} -M ${SRCS} > .depend + +install: + @echo "Not yet." + +clean: + rm -f ${PROG} *.o + +analysis: + make clean + scan-build make + +-include .depend