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