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