1# $DragonFly: src/lib/libncurses/libncurses/Makefile,v 1.8 2005/09/23 09:42:17 asmodai Exp $ 2 3LIB= ncurses 4 5.include "../Makefile.inc" 6 7NCURSESBASEDIR=${NCURSESDIR}/ncurses/base 8NCURSESSERIALDIR=${NCURSESDIR}/ncurses/tty 9NCURSESTINFODIR=${NCURSESDIR}/ncurses/tinfo 10NCURSESTRACEDIR=${NCURSESDIR}/ncurses/trace 11NCURSESWCHARDIR=${NCURSESDIR}/ncurses/widechar 12.PATH: ${NCURSESBASEDIR} ${NCURSESSERIALDIR} ${NCURSESTINFODIR} \ 13 ${NCURSESTRACEDIR} ${NCURSESWCHARDIR} ${.OBJDIR} ${NCURSESDIR}/include/ 14 15CFLAGS+= -I${NCURSESDIR}/ncurses/ 16CFLAGS+= -DTRACE 17 18TERMINFO_CAPS= ${NCURSESDIR}/include/Caps 19ncurses_def.h: 20 ${NCURSESDIR}/include/MKncurses_def.sh ${NCURSESDIR}/include/ncurses_defs > ${.TARGET} 21curses.h: 22 cat ${.CURDIR}/../include/curses.head >$@ 23 ${NCURSESDIR}/include/MKkey_defs.sh $(TERMINFO_CAPS) >>$@ 24 cat ${NCURSESDIR}/include/curses.wide >>$@ 25 cat ${NCURSESDIR}/include/curses.tail >>$@ 26term.h: 27 awk -f ${.CURDIR}/../include/MKterm.h.awk ${TERMINFO_CAPS} > $@ 28 ${NCURSESDIR}/include/edit_cfg.sh ${.CURDIR}/../include/ncurses_cfg.h $@ 29hashsize.h: 30 ${NCURSESDIR}/include/MKhashsize.sh ${TERMINFO_CAPS} >$@ 31parametrized.h: 32 ${NCURSESDIR}/include/MKparametrized.sh ${TERMINFO_CAPS} >$@ 33init_keytry.h: make_keys keys.list 34 ./make_keys keys.list > $@ 35 36make_keys: make_keys.c 37 ${NXCC} ${NXCFLAGS} ${NXLDFLAGS} ${NCURSESTINFODIR}/make_keys.c ${NXLDLIBS} -o ${.TARGET} 38make_keys.c: names.c ncurses_def.h 39 40keys.list: 41 ${NCURSESTINFODIR}/MKkeys_list.sh ${TERMINFO_CAPS} | sort > $@ 42 43names.c codes.c: 44 awk -f ${NCURSESTINFODIR}/MKnames.awk ${TERMINFO_CAPS} 45 cat namehdr boolnames boolfnames numnames numfnames strnames strfnames nameftr >names.c 46 cat namehdr boolcodes numcodes strcodes codeftr >codes.c 47comp_captab.c: make_hash 48 sh ${NCURSESTINFODIR}/MKcaptab.awk awk ${TERMINFO_CAPS} > $@ 49 50make_hash: ${NCURSESTINFODIR}/comp_hash.c 51 ${NXCC} ${NXCFLAGS} ${NXLDFLAGS} -DMAIN_PROGRAM ${NXLDLIBS} -o ${.TARGET} ${NCURSESTINFODIR}/comp_hash.c 52 53make_hash: hashsize.h ncurses_def.h curses.h 54 55expanded.c: 56 sh ${NCURSESSERIALDIR}/MKexpanded.sh "${CC}" -E ${CFLAGS} > $@ 57fallback.c: 58 sh ${NCURSESTINFODIR}/MKfallback.sh /usr/share/terminfo ${NCURSESDIR}/misc/terminfo.src >$@ 59lib_gen.c: curses.h 60 sh ${NCURSESBASEDIR}/MKlib_gen.sh "${CC} -E ${CFLAGS}" awk generated <curses.h >$@ 61lib_keyname.c: keys.list 62 awk -f ${NCURSESBASEDIR}/MKkeyname.awk keys.list > $@ 63unctrl.c: 64 echo | awk -f ${NCURSESBASEDIR}/MKunctrl.awk >$@ 65 66CLEANFILES= curses.h ncurses_def.h term.h hashsize.h parametrized.h comp_captab.c 67CLEANFILES+= namehdr boolnames boolfnames numnames numfnames strnames strfnames nameftr 68CLEANFILES+= codes.c init_keytry.h numcodes strcodes boolcodes codeftr make_keys names.c 69CLEANFILES+= make_hash expanded.c fallback.c lib_gen.c lib_keyname.c unctrl.c keys.list 70 71SRCS= \ 72 curses.h \ 73 ncurses_def.h \ 74 term.h \ 75 hashsize.h \ 76 parametrized.h \ 77 init_keytry.h 78 79# Base 80SRCS+= \ 81 define_key.c \ 82 key_defined.c \ 83 keybound.c \ 84 keyok.c \ 85 lib_addch.c \ 86 lib_addstr.c \ 87 lib_beep.c \ 88 lib_bkgd.c \ 89 lib_box.c \ 90 lib_chgat.c \ 91 lib_clear.c \ 92 lib_clearok.c \ 93 lib_clrbot.c \ 94 lib_clreol.c \ 95 lib_color.c \ 96 lib_colorset.c \ 97 lib_delch.c \ 98 lib_delwin.c \ 99 lib_dft_fgbg.c \ 100 lib_echo.c \ 101 lib_endwin.c \ 102 lib_erase.c \ 103 lib_flash.c \ 104 lib_freeall.c \ 105 lib_getch.c \ 106 lib_getstr.c \ 107 lib_hline.c \ 108 lib_immedok.c \ 109 lib_inchstr.c \ 110 lib_initscr.c \ 111 lib_insch.c \ 112 lib_insdel.c \ 113 lib_instr.c \ 114 lib_isendwin.c \ 115 lib_leaveok.c \ 116 lib_mouse.c \ 117 lib_move.c \ 118 lib_mvwin.c \ 119 lib_newterm.c \ 120 lib_newwin.c \ 121 lib_nl.c \ 122 lib_overlay.c \ 123 lib_pad.c \ 124 lib_printw.c \ 125 lib_redrawln.c \ 126 lib_refresh.c \ 127 lib_restart.c \ 128 lib_scanw.c \ 129 lib_screen.c \ 130 lib_scroll.c \ 131 lib_scrollok.c \ 132 lib_scrreg.c \ 133 lib_set_term.c \ 134 lib_slk.c \ 135 lib_slkatr_set.c \ 136 lib_slkatrof.c \ 137 lib_slkatron.c \ 138 lib_slkatrset.c \ 139 lib_slkattr.c \ 140 lib_slkclear.c \ 141 lib_slkcolor.c \ 142 lib_slkinit.c \ 143 lib_slklab.c \ 144 lib_slkrefr.c \ 145 lib_slkset.c \ 146 lib_slktouch.c \ 147 lib_touch.c \ 148 lib_ungetch.c \ 149 lib_vline.c \ 150 lib_wattroff.c \ 151 lib_wattron.c \ 152 lib_winch.c \ 153 lib_window.c \ 154 memmove.c \ 155 nc_panel.c \ 156 resizeterm.c \ 157 safe_sprintf.c \ 158 tries.c \ 159 version.c \ 160 vsscanf.c \ 161 wresize.c 162 163# Serial 164SRCS+= \ 165 hardscroll.c \ 166 hashmap.c \ 167 lib_mvcur.c \ 168 lib_tstp.c \ 169 lib_twait.c \ 170 lib_vidattr.c \ 171 tty_update.c 172 173# Tinfo 174SRCS+= \ 175 access.c \ 176 add_tries.c \ 177 alloc_entry.c \ 178 alloc_ttype.c \ 179 captoinfo.c \ 180 comp_error.c \ 181 comp_expand.c \ 182 comp_hash.c \ 183 comp_parse.c \ 184 comp_scan.c \ 185 doalloc.c \ 186 free_ttype.c \ 187 getenv_num.c \ 188 home_terminfo.c \ 189 init_keytry.c \ 190 lib_acs.c \ 191 lib_baudrate.c \ 192 lib_cur_term.c \ 193 lib_data.c \ 194 lib_has_cap.c \ 195 lib_kernel.c \ 196 lib_longname.c \ 197 lib_napms.c \ 198 lib_options.c \ 199 lib_print.c \ 200 lib_raw.c \ 201 lib_setup.c \ 202 lib_termcap.c \ 203 lib_termname.c \ 204 lib_tgoto.c \ 205 lib_ti.c \ 206 lib_tparm.c \ 207 lib_tputs.c \ 208 lib_ttyflags.c \ 209 name_match.c \ 210 parse_entry.c \ 211 read_entry.c \ 212 setbuf.c \ 213 strings.c \ 214 write_entry.c 215 216# Trace 217SRCS+= \ 218 lib_trace.c \ 219 lib_traceatr.c \ 220 lib_tracebits.c \ 221 lib_tracechr.c \ 222 lib_tracedmp.c \ 223 lib_tracemse.c \ 224 trace_buf.c \ 225 trace_tries.c \ 226 trace_xnames.c \ 227 varargs.c \ 228 visbuf.c \ 229 230# Widechar 231SRCS+= \ 232 charable.c \ 233 lib_add_wch.c \ 234 lib_box_set.c \ 235 lib_cchar.c \ 236 lib_erasewchar.c \ 237 lib_get_wch.c \ 238 lib_get_wstr.c \ 239 lib_hline_set.c \ 240 lib_in_wch.c \ 241 lib_in_wchnstr.c \ 242 lib_ins_wch.c \ 243 lib_inwstr.c \ 244 lib_pecho_wchar.c \ 245 lib_slk_wset.c \ 246 lib_unget_wch.c \ 247 lib_vid_attr.c \ 248 lib_vline_set.c \ 249 lib_wacs.c \ 250 lib_wunctrl.c 251 252# Generated 253SRCS+= \ 254 codes.c \ 255 comp_captab.c \ 256 expanded.c \ 257 fallback.c \ 258 lib_gen.c \ 259 lib_keyname.c \ 260 names.c \ 261 unctrl.c 262 263# Use instead of read_termcap.c. 264# From our old libtermcap. 265SRCS+= termcap.c 266 267SYMLINKS+=libncurses.a ${LIBDIR}/libcurses.a 268SYMLINKS+=libncurses.a ${LIBDIR}/libtinfo.a 269SYMLINKS+=libncurses.a ${LIBDIR}/libmytinfo.a 270SYMLINKS+=libncurses.a ${LIBDIR}/libtermlib.a 271SYMLINKS+=libncurses.a ${LIBDIR}/libtermcap.a 272.if !defined(NOPIC) 273# no need for major at all, it's an ld-time redirection only 274SYMLINKS+=libncurses.so ${SHLIBDIR}/libcurses.so 275SYMLINKS+=libncurses.so ${SHLIBDIR}/libtermcap.so 276SYMLINKS+=libncurses.so ${SHLIBDIR}/libtermlib.so 277SYMLINKS+=libncurses.so ${SHLIBDIR}/libmytinfo.so 278SYMLINKS+=libncurses.so ${SHLIBDIR}/libtinfo.so 279.endif 280.if !defined(NOPROFILE) 281SYMLINKS+=libncurses.a ${PROFLIBDIR}/libcurses.a 282SYMLINKS+=libncurses.a ${PROFLIBDIR}/libtermcap.a 283SYMLINKS+=libncurses.a ${PROFLIBDIR}/libtermlib.a 284SYMLINKS+=libncurses.a ${PROFLIBDIR}/libmytinfo.a 285SYMLINKS+=libncurses.a ${PROFLIBDIR}/libtinfo.aa 286.endif 287 288INCS= term.h ${.CURDIR}/../include/termcap.h \ 289 ${.CURDIR}/../include/unctrl.h curses.h 290INCSLINKS=curses.h ${INCLUDEDIR}/ncurses.h 291 292.include <bsd.lib.mk> 293