xref: /openbsd/usr.bin/mg/Makefile (revision 3c2c8acb)
1# $OpenBSD: Makefile,v 1.35 2019/07/18 05:57:48 lum Exp $
2
3PROG=	mg
4
5LDADD+=	-lcurses -lutil
6DPADD+=	${LIBCURSES} ${LIBUTIL}
7
8# (Common) compile-time options:
9#
10#	REGEX		-- create regular expression functions.
11#	STARTUPFILE	-- look for and handle initialization file.
12#	MGLOG		-- debug mg internals to a log file.
13#
14CFLAGS+=-Wall -DREGEX
15
16SRCS=	autoexec.c basic.c bell.c buffer.c cinfo.c dir.c display.c \
17	echo.c extend.c file.c fileio.c funmap.c help.c kbd.c keymap.c \
18	line.c macro.c main.c match.c modes.c paragraph.c \
19	re_search.c region.c search.c spawn.c tty.c ttyio.c ttykbd.c \
20	undo.c util.c version.c window.c word.c yank.c
21
22#
23# More or less standalone extensions.
24#
25SRCS+=	cmode.c cscope.c dired.c grep.c interpreter.c tags.c
26
27#
28# -DMGLOG source file.
29#
30#SRCS+=	log.c
31
32afterinstall:
33	${INSTALL} -d -o root -g wheel ${DESTDIR}${DOCDIR}/mg
34	${INSTALL} ${INSTALL_COPY} -o ${DOCOWN} -g ${DOCGRP} -m ${DOCMODE} \
35	    ${.CURDIR}/tutorial ${DESTDIR}${DOCDIR}/mg
36
37.include <bsd.prog.mk>
38