mlockall.2: Point out MCL_CURRENT is not yet implemented (refs #1921).
[dragonfly.git] / lib / libncurses / Makefile.sources
1 # All ncurses, ncursesw, panel, panelw, tic details
2
3 ############ Legend ##############
4 # B - bootstrap tic specific
5 # N - ncurses standard lib
6 # P - libpanel
7 # W - ncurses wide lib
8 # T - reserved for future libtinfo
9 # t - specific to -DTRACE
10 ##################################
11
12 GENHDRS_NWP+=   curses.h
13 GENHDRS_NWB+=   hashsize.h
14 GENHDRS_NWB+=   init_keytry.h
15 GENHDRS_NWP+=   ncurses_def.h
16 GENHDRS_NWB+=   parametrized.h
17 GENHDRS_NWP+=   term.h
18
19 GENSRCS_NWB+=   codes.c
20 GENSRCS_NWB+=   comp_captab.c
21 GENSRCS_NW+=    expanded.c
22 GENSRCS_NWB+=   fallback.c
23 GENSRCS_NW+=    lib_gen.c
24 GENSRCS_NWB+=   lib_keyname.c
25 GENSRCS_NWB+=   names.c
26 GENSRCS_NWB+=   unctrl.c
27
28 # Headers to install
29 .if defined(ZNCURSES) || defined(ZTIC)
30 HEADERS=        curses.h term.h termcap.h unctrl.h
31 SRCHDRS=        ncurses_dll.h
32 .endif
33
34 # Generators
35 # Careful! Some of contrib scripts may invoke make_hash and make_keys internally.
36 ncurses_def.h:  MKncurses_def.sh ncurses_defs
37         AWK=awk sh ${NCURSESDIR}/include/MKncurses_def.sh \
38         ${NCURSESDIR}/include/ncurses_defs > ${.TARGET}
39
40 curses.h: $(TERMINFO_CAPS) curses.head curses.tail MKkey_defs.sh
41         cat ${.CURDIR}/../include/curses.head | \
42         sed -e 's|SET_NEED_WCHAR_H|${SW_WIDEC}|' \
43             -e 's|SET_NCURSES_CH_T|${SW_TYPE}|' > ${.TARGET}.new
44         AWK=awk sh ${NCURSESDIR}/include/MKkey_defs.sh $(TERMINFO_CAPS) >> ${.TARGET}.new
45 .if defined(ENABLE_WIDEC)
46         cat ${NCURSESDIR}/include/curses.wide >> ${.TARGET}.new
47 .endif
48         cat ${NCURSESDIR}/include/curses.tail >> ${.TARGET}.new
49         mv -f ${.TARGET}.new ${.TARGET}
50
51 term.h: MKterm.h.awk edit_cfg.sh Caps
52         awk -f ${.CURDIR}/../include/MKterm.h.awk ${TERMINFO_CAPS} > ${.TARGET}.new
53         sh ${NCURSESDIR}/include/edit_cfg.sh ${.CURDIR}/../include/ncurses_cfg.h ${.TARGET}.new
54         mv -f ${.TARGET}.new ${.TARGET}
55
56 .if defined(ZNCURSES) || defined(ZTIC)
57 hashsize.h: MKhashsize.sh Caps
58         sh ${NCURSESDIR}/include/MKhashsize.sh ${TERMINFO_CAPS} > ${.TARGET}
59
60 parametrized.h: MKparametrized.sh Caps
61         sh ${NCURSESDIR}/include/MKparametrized.sh ${TERMINFO_CAPS} > ${.TARGET}
62
63 init_keytry.h: make_keys keys.list
64         ./make_keys keys.list > ${.TARGET}
65
66 make_keys: make_keys.c names.c ncurses_def.h ${VERSION_MAP} ${HEADERS}
67         ${NXCC} ${NXCFLAGS:N-flto:N-W*} -static ${NCURSESTINFODIR}/make_keys.c ${NXLDLIBS} -o ${.TARGET}
68
69 keys.list: MKkeys_list.sh Caps
70         sh ${NCURSESTINFODIR}/MKkeys_list.sh ${TERMINFO_CAPS} | LC_ALL=C sort > ${.TARGET}
71
72 names.c: MKnames.awk Caps
73         awk -f ${NCURSESTINFODIR}/MKnames.awk bigstrings=1 ${TERMINFO_CAPS} > ${.TARGET}
74
75 codes.c: MKcodes.awk Caps
76         awk -f ${NCURSESTINFODIR}/MKcodes.awk bigstrings=1 ${TERMINFO_CAPS} > ${.TARGET}
77
78 comp_captab.c: make_hash MKcaptab.sh MKcaptab.awk Caps
79         sh -e ${NCURSESTINFODIR}/MKcaptab.sh awk 1 ${NCURSESTINFODIR}/MKcaptab.awk ${TERMINFO_CAPS} > ${.TARGET}
80
81 make_hash: make_hash.c hashsize.h ncurses_def.h ${HEADERS}
82         ${NXCC} ${NXCFLAGS:N-flto:N-W*} -static -DMAIN_PROGRAM ${NCURSESTINFODIR}/make_hash.c ${NXLDLIBS} -o ${.TARGET}
83
84 expanded.c: MKexpanded.sh ${GENHDRS_NWP}
85         ${NXENV} sh ${NCURSESSERIALDIR}/MKexpanded.sh "${CC}" -E ${NXCFLAGS:N-W*} > ${.TARGET}
86
87 fallback.c: MKfallback.sh
88         sh ${NCURSESTINFODIR}/MKfallback.sh /usr/share/terminfo ${NCURSESDIR}/misc/terminfo.src > ${.TARGET}
89
90 lib_gen.c: MKlib_gen.sh curses.h ncurses_def.h term.h
91         ${NXENV} sh ${NCURSESBASEDIR}/MKlib_gen.sh "${CC} -E ${NXCFLAGS:N-W*}" awk generated <curses.h > ${.TARGET}
92
93 lib_keyname.c: MKkeyname.awk keys.list
94         awk -f ${NCURSESBASEDIR}/MKkeyname.awk bigstrings=1 keys.list > ${.TARGET}
95
96 unctrl.c: MKunctrl.awk
97         echo | awk -f ${NCURSESBASEDIR}/MKunctrl.awk bigstrings=1 > ${.TARGET}
98 .endif
99
100 # Generated
101 SRCS_ALL+=      ${GENHDRS_NWP}
102 .if defined(ZNCURSES) || defined(ZTIC)
103 SRCS_ALL+=      ${GENHDRS_NWB} ${GENSRCS_NWB}
104 CLEANFILES+=    ${GENHDRS_NWB} ${GENSRCS_NWB}
105 CLEANFILES+=    make_keys make_hash keys.list
106 .endif
107 .if defined(ZNCURSES)
108 SRCS_ALL+=      ${GENSRCS_NW} ${GENHDRS_NW}
109 CLEANFILES+=    ${GENSRCS_NW} ${GENHDRS_NW}
110 .endif
111 CLEANFILES+=    ${GENHDRS_NWP} term.h.new curses.h.new
112
113 # Base
114 SRCS_NW+=       define_key.c
115 SRCS_NWB+=      key_defined.c
116 SRCS_NWB+=      keybound.c
117 SRCS_NW+=       keyok.c
118 SRCS_NW+=       legacy_coding.c
119 SRCS_NW+=       lib_addch.c
120 SRCS_NW+=       lib_addstr.c
121 SRCS_NW+=       lib_beep.c
122 SRCS_NW+=       lib_bkgd.c
123 SRCS_NW+=       lib_box.c
124 SRCS_NW+=       lib_chgat.c
125 SRCS_NW+=       lib_clear.c
126 SRCS_NW+=       lib_clearok.c
127 SRCS_NW+=       lib_clrbot.c
128 SRCS_NW+=       lib_clreol.c
129 SRCS_NW+=       lib_color.c
130 SRCS_NW+=       lib_colorset.c
131 SRCS_NW+=       lib_delch.c
132 SRCS_NW+=       lib_delwin.c
133 SRCS_NW+=       lib_dft_fgbg.c
134 SRCS_NW+=       lib_echo.c
135 SRCS_NW+=       lib_endwin.c
136 SRCS_NW+=       lib_erase.c
137 SRCS_NW+=       lib_flash.c
138 SRCS_NW+=       lib_freeall.c
139 SRCS_NW+=       lib_getch.c
140 SRCS_NW+=       lib_getstr.c
141 SRCS_NW+=       lib_hline.c
142 SRCS_NW+=       lib_immedok.c
143 SRCS_NW+=       lib_inchstr.c
144 SRCS_NW+=       lib_initscr.c
145 SRCS_NW+=       lib_insch.c
146 SRCS_NW+=       lib_insdel.c
147 SRCS_NW+=       lib_insnstr.c
148 SRCS_NW+=       lib_instr.c
149 SRCS_NW+=       lib_isendwin.c
150 SRCS_NW+=       lib_leaveok.c
151 SRCS_NW+=       lib_mouse.c
152 SRCS_NW+=       lib_move.c
153 SRCS_NW+=       lib_mvwin.c
154 SRCS_NW+=       lib_newterm.c
155 SRCS_NW+=       lib_newwin.c
156 SRCS_NW+=       lib_nl.c
157 SRCS_NW+=       lib_overlay.c
158 SRCS_NW+=       lib_pad.c
159 SRCS_NW+=       lib_printw.c
160 SRCS_NW+=       lib_redrawln.c
161 SRCS_NW+=       lib_refresh.c
162 SRCS_NW+=       lib_restart.c
163 SRCS_NW+=       lib_scanw.c
164 SRCS_NW+=       lib_screen.c
165 SRCS_NW+=       lib_scroll.c
166 SRCS_NW+=       lib_scrollok.c
167 SRCS_NW+=       lib_scrreg.c
168 SRCS_NW+=       lib_set_term.c
169 SRCS_NW+=       lib_slk.c
170 SRCS_NW+=       lib_slkatr_set.c
171 SRCS_NW+=       lib_slkatrof.c
172 SRCS_NW+=       lib_slkatron.c
173 SRCS_NW+=       lib_slkatrset.c
174 SRCS_NW+=       lib_slkattr.c
175 SRCS_NW+=       lib_slkclear.c
176 SRCS_NW+=       lib_slkcolor.c
177 SRCS_NW+=       lib_slkinit.c
178 SRCS_NW+=       lib_slklab.c
179 SRCS_NW+=       lib_slkrefr.c
180 SRCS_NW+=       lib_slkset.c
181 SRCS_NW+=       lib_slktouch.c
182 SRCS_NW+=       lib_touch.c
183 SRCS_NW+=       lib_ungetch.c
184 SRCS_NW+=       lib_vline.c
185 SRCS_NW+=       lib_wattroff.c
186 SRCS_NW+=       lib_wattron.c
187 SRCS_NW+=       lib_winch.c
188 SRCS_NW+=       lib_window.c
189 SRCS_NW+=       nc_panel.c
190 SRCS_NW+=       new_pair.c
191 SRCS_NW+=       resizeterm.c
192 SRCS_NW+=       safe_sprintf.c
193 SRCS_NWB+=      tries.c
194 SRCS_NW+=       use_window.c
195 SRCS_NWB+=      version.c
196 SRCS_NW+=       vsscanf.c
197 SRCS_NW+=       wresize.c
198
199 # Serial
200 SRCS_NW+=       hardscroll.c
201 SRCS_NW+=       hashmap.c
202 SRCS_NW+=       lib_mvcur.c
203 SRCS_NW+=       lib_tstp.c
204 SRCS_NW+=       lib_twait.c
205 SRCS_NW+=       lib_vidattr.c
206 SRCS_NW+=       tty_update.c
207
208 # Tinfo
209 SRCS_NWB+=      access.c
210 SRCS_NWB+=      add_tries.c
211 SRCS_NWB+=      alloc_entry.c
212 SRCS_NWB+=      alloc_ttype.c
213 SRCS_NWB+=      captoinfo.c
214 SRCS_NWB+=      comp_error.c
215 SRCS_NWB+=      comp_expand.c
216 SRCS_NWB+=      comp_hash.c
217 SRCS_NWB+=      comp_parse.c
218 SRCS_NWB+=      comp_scan.c
219 SRCS_NWB+=      comp_userdefs.c
220 SRCS_NWB+=      db_iterator.c
221 SRCS_NWB+=      doalloc.c
222 SRCS_NWB+=      entries.c
223 SRCS_NWB+=      free_ttype.c
224 SRCS_NWB+=      getenv_num.c
225 SRCS_NW+=       hashed_db.c
226 SRCS_NWB+=      home_terminfo.c
227 SRCS_NWB+=      init_keytry.c
228 SRCS_NW+=       lib_acs.c
229 SRCS_NWB+=      lib_baudrate.c
230 SRCS_NWB+=      lib_cur_term.c
231 SRCS_NWB+=      lib_data.c
232 SRCS_NWB+=      lib_has_cap.c
233 SRCS_NW+=       lib_kernel.c
234 SRCS_NW+=       lib_longname.c
235 SRCS_NWB+=      lib_napms.c
236 SRCS_NWB+=      lib_options.c
237 SRCS_NW+=       lib_print.c
238 SRCS_NWB+=      lib_raw.c
239 SRCS_NWB+=      lib_setup.c
240 SRCS_NWB+=      lib_termcap.c
241 SRCS_NW+=       lib_termname.c
242 SRCS_NWB+=      lib_tgoto.c
243 SRCS_NWB+=      lib_ti.c
244 SRCS_NWB+=      lib_tparm.c
245 SRCS_NWB+=      lib_tputs.c
246 SRCS_NWB+=      lib_ttyflags.c
247 SRCS_NWB+=      name_match.c
248 SRCS_NW+=       obsolete.c
249 SRCS_NWB+=      parse_entry.c
250 SRCS_NWB+=      read_entry.c
251 SRCS_NWB+=      read_termcap.c
252 SRCS_NWB+=      strings.c
253 SRCS_NWB+=      trim_sgr0.c
254 SRCS_NW+=       use_screen.c
255 SRCS_NWB+=      write_entry.c
256
257 # Trace
258 SRCS_NWB+=      lib_trace.c
259 SRCS_NWt+=      lib_traceatr.c
260 SRCS_NWt+=      lib_tracebits.c
261 SRCS_NWt+=      lib_tracechr.c
262 SRCS_NWt+=      lib_tracedmp.c
263 SRCS_NWt+=      lib_tracemse.c
264 SRCS_NWt+=      trace_buf.c
265 SRCS_NWt+=      trace_tries.c
266 SRCS_NWt+=      trace_xnames.c
267 SRCS_NWt+=      varargs.c
268 SRCS_NWB+=      visbuf.c
269
270 # Widechar
271 SRCS_W+=        charable.c
272 SRCS_W+=        lib_add_wch.c
273 SRCS_W+=        lib_box_set.c
274 SRCS_W+=        lib_cchar.c
275 SRCS_W+=        lib_erasewchar.c
276 SRCS_W+=        lib_get_wch.c
277 SRCS_W+=        lib_get_wstr.c
278 SRCS_W+=        lib_hline_set.c
279 SRCS_W+=        lib_in_wch.c
280 SRCS_W+=        lib_in_wchnstr.c
281 SRCS_W+=        lib_ins_wch.c
282 SRCS_W+=        lib_inwstr.c
283 SRCS_W+=        lib_key_name.c
284 SRCS_W+=        lib_pecho_wchar.c
285 SRCS_W+=        lib_slk_wset.c
286 SRCS_W+=        lib_unget_wch.c
287 SRCS_W+=        lib_vid_attr.c
288 SRCS_W+=        lib_vline_set.c
289 SRCS_W+=        lib_wacs.c
290 SRCS_W+=        lib_wunctrl.c
291
292 # Panel
293 SRCS_P+=        p_above.c
294 SRCS_P+=        p_below.c
295 SRCS_P+=        p_bottom.c
296 SRCS_P+=        p_delete.c
297 SRCS_P+=        p_hidden.c
298 SRCS_P+=        p_hide.c
299 SRCS_P+=        p_move.c
300 SRCS_P+=        p_new.c
301 SRCS_P+=        p_replace.c
302 SRCS_P+=        p_show.c
303 SRCS_P+=        p_top.c
304 SRCS_P+=        p_update.c
305 SRCS_P+=        p_user.c
306 SRCS_P+=        p_win.c
307 # only when TRACE
308 #SRCS_P+=       panel.c
309
310 # Sources to compile
311 .if defined(ZTIC)
312 SRCS_ALL+=      ${SRCS_NWB}
313 .endif
314 .if defined(ZTRACE)
315 SRCS_ALL+=      ${SRCS_NWt}
316 .endif
317 .if defined(ZNCURSES)
318 SRCS_ALL+=      ${SRCS_NWB}
319 SRCS_ALL+=      ${SRCS_NW}
320 .endif
321 .if defined(ZNCURSES) && defined(ENABLE_WIDEC)
322 SRCS_ALL+=      ${SRCS_W}
323 .endif
324 .if defined(ZPANEL)
325 SRCS_ALL+=      ${SRCS_P}
326 .endif
327
328 # Sort objects for reproducible libs
329 SRCS+=  ${SRCS_ALL:O}