1 # $DragonFly: src/lib/libncurses/libncurses/Makefile,v 1.11 2005/12/06 02:22:23 corecode Exp $
5 .include "../Makefile.inc"
7 NCURSESBASEDIR=${NCURSESDIR}/ncurses/base
8 NCURSESSERIALDIR=${NCURSESDIR}/ncurses/tty
9 NCURSESTINFODIR=${NCURSESDIR}/ncurses/tinfo
10 NCURSESTRACEDIR=${NCURSESDIR}/ncurses/trace
11 NCURSESWCHARDIR=${NCURSESDIR}/ncurses/widechar
12 .PATH: ${NCURSESBASEDIR} ${NCURSESSERIALDIR} ${NCURSESTINFODIR} \
13 ${NCURSESTRACEDIR} ${NCURSESWCHARDIR} ${.OBJDIR} ${.CURDIR}/../include \
14 ${NCURSESDIR}/include/
16 CFLAGS+= -I${NCURSESDIR}/ncurses/
19 TERMINFO_CAPS= ${NCURSESDIR}/include/Caps
21 sh ${NCURSESDIR}/include/MKncurses_def.sh ${NCURSESDIR}/include/ncurses_defs > ${.TARGET}
22 curses.h: $(TERMINFO_CAPS) \
24 ${NCURSESDIR}/include/curses.tail \
25 ${NCURSESDIR}/include//MKkey_defs.sh
26 cat ${.CURDIR}/../include/curses.head >$@
27 AWK=awk sh ${NCURSESDIR}/include/MKkey_defs.sh $(TERMINFO_CAPS) >>$@
28 sh -c 'if test "cchar_t" = "cchar_t" ; then cat ${NCURSESDIR}/include/curses.wide >>$@ ; fi'
29 cat ${NCURSESDIR}/include/curses.tail >>$@
31 #curses.h: curses.head curses.tail
32 # cat ${.CURDIR}/../include/curses.head >$@
33 # sh ${NCURSESDIR}/include/MKkey_defs.sh $(TERMINFO_CAPS) >>$@
34 # cat ${NCURSESDIR}/include/curses.wide >>$@
35 # cat ${NCURSESDIR}/include/curses.tail >>$@
36 term.h: MKterm.h.awk ncurses_cfg.h
37 awk -f ${.CURDIR}/../include/MKterm.h.awk ${TERMINFO_CAPS} > $@
38 sh ${NCURSESDIR}/include/edit_cfg.sh ${.CURDIR}/../include/ncurses_cfg.h $@
40 sh ${NCURSESDIR}/include/MKhashsize.sh ${TERMINFO_CAPS} >$@
42 sh ${NCURSESDIR}/include/MKparametrized.sh ${TERMINFO_CAPS} >$@
43 init_keytry.h: make_keys keys.list
44 ./make_keys keys.list > $@
46 make_keys: ${NCURSESTINFODIR}/make_keys.c names.c ncurses_def.h
47 ${NXCC} ${NXCFLAGS} ${NXLDFLAGS} ${NCURSESTINFODIR}/make_keys.c ${NXLDLIBS} -o ${.TARGET}
50 sh ${NCURSESTINFODIR}/MKkeys_list.sh ${TERMINFO_CAPS} | sort > $@
52 names.c: ${NCURSESTINFODIR}/MKnames.awk
53 awk -f ${NCURSESTINFODIR}/MKnames.awk bigstrings=$(USE_BIG_STRINGS) ${TERMINFO_CAPS} >$@
54 #cat namehdr boolnames boolfnames numnames numfnames strnames strfnames nameftr >names.c
55 #cat namehdr boolcodes numcodes strcodes codeftr >codes.c
56 codes.c: ${NCURSESTINFODIR}/MKcodes.awk
57 awk -f ${NCURSESTINFODIR}/MKcodes.awk bigstrings=$(USE_BIG_STRINGS) ${TERMINFO_CAPS} >$@
58 comp_captab.c: make_hash
59 sh -e ${NCURSESTINFODIR}/MKcaptab.sh awk 0 ${NCURSESTINFODIR}/MKcaptab.awk ${TERMINFO_CAPS} > $@
61 make_hash: ${NCURSESTINFODIR}/comp_hash.c
62 ${NXCC} ${NXCFLAGS} ${NXLDFLAGS} -DMAIN_PROGRAM ${NXLDLIBS} -o ${.TARGET} ${NCURSESTINFODIR}/comp_hash.c
64 make_hash: hashsize.h ncurses_def.h curses.h
67 sh ${NCURSESSERIALDIR}/MKexpanded.sh "${CC}" -E ${CFLAGS} > $@
69 sh ${NCURSESTINFODIR}/MKfallback.sh /usr/share/terminfo ${NCURSESDIR}/misc/terminfo.src >$@
71 sh ${NCURSESBASEDIR}/MKlib_gen.sh "${CC} -E ${CFLAGS}" awk generated <curses.h >$@
72 lib_keyname.c: keys.list
73 awk -f ${NCURSESBASEDIR}/MKkeyname.awk keys.list > $@
75 echo | awk -f ${NCURSESBASEDIR}/MKunctrl.awk >$@
77 CLEANFILES= curses.h ncurses_def.h term.h hashsize.h parametrized.h comp_captab.c
78 CLEANFILES+= namehdr boolnames boolfnames numnames numfnames strnames strfnames nameftr
79 CLEANFILES+= codes.c init_keytry.h numcodes strcodes boolcodes codeftr make_keys names.c
80 CLEANFILES+= make_hash expanded.c fallback.c lib_gen.c lib_keyname.c unctrl.c keys.list
283 # Use instead of read_termcap.c.
284 # From our old libtermcap.
287 SYMLINKS+=libncurses.a ${LIBDIR}/libcurses.a
288 SYMLINKS+=libncurses.a ${LIBDIR}/libtinfo.a
289 SYMLINKS+=libncurses.a ${LIBDIR}/libmytinfo.a
290 SYMLINKS+=libncurses.a ${LIBDIR}/libtermlib.a
291 SYMLINKS+=libncurses.a ${LIBDIR}/libtermcap.a
293 # no need for major at all, it's an ld-time redirection only
294 SYMLINKS+=libncurses.so ${SHLIBDIR}/libcurses.so
295 SYMLINKS+=libncurses.so ${SHLIBDIR}/libtermcap.so
296 SYMLINKS+=libncurses.so ${SHLIBDIR}/libtermlib.so
297 SYMLINKS+=libncurses.so ${SHLIBDIR}/libmytinfo.so
298 SYMLINKS+=libncurses.so ${SHLIBDIR}/libtinfo.so
300 .if !defined(NOPROFILE)
301 SYMLINKS+=libncurses.a ${PROFLIBDIR}/libcurses.a
302 SYMLINKS+=libncurses.a ${PROFLIBDIR}/libtermcap.a
303 SYMLINKS+=libncurses.a ${PROFLIBDIR}/libtermlib.a
304 SYMLINKS+=libncurses.a ${PROFLIBDIR}/libmytinfo.a
305 SYMLINKS+=libncurses.a ${PROFLIBDIR}/libtinfo.aa
308 INCS= term.h ${.CURDIR}/../include/termcap.h \
309 ${.CURDIR}/../include/unctrl.h curses.h \
310 ${NCURSESDIR}/include/ncurses_dll.h
311 INCSLINKS=curses.h ${INCLUDEDIR}/ncurses.h
313 .include <bsd.lib.mk>