Revert "Remove crunchgen(8)."
[dragonfly.git] / usr.bin / vi / Makefile
1 #
2 # $FreeBSD: head/usr.bin/vi/Makefile 254225 2013-08-11 20:03:12Z peter $
3 #
4
5 .include <bsd.own.mk>
6
7 SRCDIR=         ${.CURDIR}/../../contrib/nvi
8 SUBDIR+=        catalog
9
10 .if defined(RELEASE_CRUNCH)
11 # When building `vi' for the fixit floppy, don't include any of the
12 # API stuff.
13 APISTUFF=       ex_notcl.c ex_noperl.c
14
15 .else
16
17 APISTUFF=       ex_tcl.c ex_perl.c
18
19 .endif
20
21 WARNS?= 0       # some warn issues on 32 bit machines
22
23 VI=     nvi
24 EX=     nex
25 VIEW=   nview
26
27 PROG=   nvi
28
29 CFLAGS+=        -D__REGEX_PRIVATE
30
31 LINKS=  ${BINDIR}/${VI} ${BINDIR}/${EX} ${BINDIR}/${VI} ${BINDIR}/${VIEW}
32 LINKS+= ${BINDIR}/${VI} ${BINDIR}/vi ${BINDIR}/${EX} ${BINDIR}/ex
33 LINKS+= ${BINDIR}/${VI} ${BINDIR}/view
34
35 MAN=    ${SRCDIR}/docs/USD.doc/vi.man/vi.1
36 MLINKS+=vi.1 ex.1 vi.1 view.1
37 MLINKS+=vi.1 nex.1 vi.1 nview.1 vi.1 nvi.1
38
39 .PATH:  ${SRCDIR}/common
40 .PATH:  ${SRCDIR}/ex
41 .PATH:  ${SRCDIR}/cl
42 .PATH:  ${SRCDIR}/vi
43 .PATH:  ${SRCDIR}/regex
44
45 CFLAGS+=-I${.CURDIR} -I${SRCDIR} -I${SRCDIR}/regex -I${SRCDIR}/vi
46
47 DPADD=          ${LIBUTIL}
48 LDADD=          -lutil
49
50 CFLAGS+=        -DUSE_WIDECHAR
51 DPADD+=         ${LIBNCURSESW}
52 LDADD+=         -lncursesw
53 CFLAGS+=        -DUSE_ICONV
54
55 CLEANFILES+=${EX}
56 # Vi curses sources
57 SRCS+=  cl_funcs.c cl_main.c cl_read.c cl_screen.c cl_term.c
58
59 # General sources.
60 SRCS+=  conv.c cut.c delete.c encoding.c exf.c key.c line.c log.c main.c mark.c msg.c options.c \
61         options_f.c put.c recover.c screen.c search.c seq.c util.c
62
63 # Ex source.
64 SRCS+=  ex.c ex_abbrev.c ex_append.c ex_args.c ex_argv.c ex_at.c ex_bang.c \
65         ex_cd.c ex_cmd.c ex_cscope.c ex_delete.c ex_display.c \
66         ex_edit.c ex_equal.c ex_file.c ex_filter.c ex_global.c \
67         ex_init.c ex_join.c ex_map.c ex_mark.c ex_mkexrc.c ex_move.c \
68         ex_open.c ex_preserve.c ex_print.c ex_put.c ex_quit.c \
69         ex_read.c ex_screen.c ex_script.c ex_set.c ex_shell.c \
70         ex_shift.c ex_source.c ex_stop.c ex_subst.c ex_tag.c \
71         ex_txt.c ex_undo.c ex_usage.c ex_util.c ex_version.c ex_visual.c \
72         ex_write.c ex_yank.c ex_z.c
73
74 # Vi source.
75 SRCS+=  getc.c v_at.c v_ch.c v_cmd.c v_delete.c v_ex.c v_increment.c v_init.c \
76         v_itxt.c v_left.c v_mark.c v_match.c v_paragraph.c v_put.c v_redraw.c \
77         v_replace.c v_right.c v_screen.c v_scroll.c v_search.c v_section.c \
78         v_sentence.c v_status.c v_txt.c v_ulcase.c v_undo.c \
79         v_util.c v_word.c v_xchar.c v_yank.c v_z.c v_zexit.c vi.c
80
81 # Vi screen source.
82 SRCS+=  vs_line.c vs_msg.c vs_refresh.c vs_relative.c vs_smap.c vs_split.c
83
84 # Wide char regex
85 SRCS+=  regcomp.c regerror.c regexec.c regfree.c
86
87
88 # Clean up files from version 1.71 (remove at Release 3.8)
89 # They will overwrite the versions in contrib, breaking the build
90 beforedepend:
91         @rm -f ${.OBJDIR}/ex_write.c ${.OBJDIR}/v_ex.c
92
93 .include <bsd.prog.mk>