1PACKAGE= clibs 2SHLIBDIR?= /lib 3 4.include <src.opts.mk> 5 6.include "${.CURDIR:H}/config.mk" 7 8LIB= ncursesw 9SHLIB_MAJOR= 9 10 11NO_LINT= 12 13GENSRCS= \ 14 expanded.c \ 15 lib_gen.c 16 17SRCS= ${GENSRCS} 18 19.PATH: ${NCURSES_DIR}/ncurses/base 20SRCS+= \ 21 new_pair.c \ 22 lib_dft_fgbg.c \ 23 legacy_coding.c \ 24 lib_addch.c \ 25 lib_addstr.c \ 26 lib_beep.c \ 27 lib_bkgd.c \ 28 lib_box.c \ 29 lib_chgat.c \ 30 lib_clear.c \ 31 lib_clearok.c \ 32 lib_clrbot.c \ 33 lib_clreol.c \ 34 lib_color.c \ 35 lib_colorset.c \ 36 lib_delch.c \ 37 lib_delwin.c \ 38 lib_echo.c \ 39 lib_endwin.c \ 40 lib_erase.c \ 41 lib_flash.c \ 42 lib_getch.c \ 43 lib_getstr.c \ 44 lib_hline.c \ 45 lib_immedok.c \ 46 lib_inchstr.c \ 47 lib_initscr.c \ 48 lib_insch.c \ 49 lib_insdel.c \ 50 lib_insnstr.c \ 51 lib_instr.c \ 52 lib_isendwin.c \ 53 lib_leaveok.c \ 54 lib_mouse.c \ 55 lib_move.c \ 56 lib_mvwin.c \ 57 lib_newterm.c \ 58 lib_newwin.c \ 59 lib_nl.c \ 60 lib_overlay.c \ 61 lib_pad.c \ 62 lib_print.c \ 63 lib_printw.c \ 64 lib_redrawln.c \ 65 lib_refresh.c \ 66 lib_restart.c \ 67 lib_scanw.c \ 68 lib_screen.c \ 69 lib_scroll.c \ 70 lib_scrollok.c \ 71 lib_scrreg.c \ 72 lib_set_term.c \ 73 lib_slk.c \ 74 lib_slkatr_set.c \ 75 lib_slkatrof.c \ 76 lib_slkatron.c \ 77 lib_slkatrset.c \ 78 lib_slkattr.c \ 79 lib_slkclear.c \ 80 lib_slkcolor.c \ 81 lib_slkinit.c \ 82 lib_slklab.c \ 83 lib_slkrefr.c \ 84 lib_slkset.c \ 85 lib_slktouch.c \ 86 lib_touch.c \ 87 lib_ungetch.c \ 88 lib_vline.c \ 89 lib_wattroff.c \ 90 lib_wattron.c \ 91 lib_winch.c \ 92 lib_window.c \ 93 nc_panel.c \ 94 resizeterm.c \ 95 safe_sprintf.c \ 96 vsscanf.c \ 97 wresize.c \ 98 lib_freeall.c \ 99 100.PATH: ${NCURSES_DIR}/ncurses/tinfo 101SRCS+= \ 102 use_screen.c \ 103 use_window.c 104 105.PATH: ${NCURSES_DIR}/ncurses/trace 106SRCS+= \ 107 varargs.c 108 109# DONE 110.PATH: ${NCURSES_DIR}/ncurses/tty 111SRCS+= \ 112 hardscroll.c \ 113 hashmap.c \ 114 lib_mvcur.c \ 115 lib_tstp.c \ 116 lib_vidattr.c \ 117 tty_update.c 118 119.PATH: ${NCURSES_DIR}/ncurses/widechar 120SRCS+= \ 121 charable.c \ 122 lib_add_wch.c \ 123 lib_box_set.c \ 124 lib_cchar.c \ 125 lib_erasewchar.c \ 126 lib_get_wch.c \ 127 lib_get_wstr.c \ 128 lib_hline_set.c \ 129 lib_in_wch.c \ 130 lib_in_wchnstr.c \ 131 lib_ins_wch.c \ 132 lib_inwstr.c \ 133 lib_key_name.c \ 134 lib_pecho_wchar.c \ 135 lib_slk_wset.c \ 136 lib_unget_wch.c \ 137 lib_vid_attr.c \ 138 lib_vline_set.c \ 139 lib_wacs.c \ 140 lib_wunctrl.c 141 142# Currently unused, for debugging libncurses itself. 143DBGSRCS= \ 144 varargs.c 145 146CLEANFILES= ${GENSRCS} 147 148CWARNFLAGS.lib_set_term.c= ${NO_WUNUSED_BUT_SET_VARIABLE} 149 150.if ${MK_INSTALLLIB} != "no" 151SYMLINKS+= libncursesw.a ${LIBDIR}/libcursesw.a 152# backward compat 153SYMLINKS+= libncursesw.a ${LIBDIR}/libncurses.a 154SYMLINKS+= libncursesw.a ${LIBDIR}/libcurses.a 155.endif 156.if !defined(NO_PIC) 157# no need for major at all, it's an ld-time redirection only 158SYMLINKS+= libncursesw.so ${LIBDIR}/libcursesw.so 159# backward compat 160SYMLINKS+= libncursesw.so ${LIBDIR}/libncurses.so 161SYMLINKS+= libncursesw.so ${LIBDIR}/libcurses.so 162.endif 163 164LIBADD+= tinfow 165SHLIB_LDSCRIPT= libncursesw.ldscript 166STATIC_LDSCRIPT= libncursesw.aldscript 167CLEANFILES+= libncursesw.ald 168# Keep this for a while to ensure the file is removed during make clean 169CLEANFILES+= libncursesw.a 170 171libncursesw.ald: ${.CURDIR}/${STATIC_LDSCRIPT} 172 sed -e 's,@@LIB@@,${LIB},g' \ 173 -e 's,@@STATICLIB_SUFFIX@@,${_STATICLIB_SUFFIX},g' \ 174 ${.ALLSRC} > ${.TARGET} 175 176lib_gen.c: MKlib_gen.sh ${TINFO_OBJDIR}/curses.h ncurses_dll.h 177 LC_ALL=C sh ${NCURSES_DIR}/ncurses/base/MKlib_gen.sh "${CPP:N${CCACHE_BIN}} ${CFLAGS}" \ 178 "${AWK}" generated < ${TINFO_OBJDIR}/curses.h >$@ 179 180expanded.c: MKexpanded.sh 181 sh ${NCURSES_DIR}/ncurses/tty/MKexpanded.sh "${CC:N${CCACHE_BIN}} -E" ${CFLAGS} >expanded.c 182 183all: ${STATIC_LDSCRIPT} libncursesw.ald 184 185install-libncursesw.a: libncursesw.ald 186 ${INSTALL} ${TAG_ARGS:D${TAG_ARGS},dev} -S -C -o ${LIBOWN} -g ${LIBGRP} -m ${LIBMODE} \ 187 ${_INSTALLFLAGS} libncursesw.ald ${DESTDIR}${_LIBDIR}/lib${LIB}.a 188 189realinstall: install-libncursesw.a 190 191 192.include <bsd.lib.mk> 193