1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
|
# Copyright (C) 1997,1998 Free Software Foundation, Inc.
# This file is part of the GNU C Library.
# The GNU C Library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Library General Public License as
# published by the Free Software Foundation; either version 2 of the
# License, or (at your option) any later version.
# The GNU C Library is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
# Library General Public License for more details.
# You should have received a copy of the GNU Library General Public
# License along with the GNU C Library; see the file COPYING.LIB. If not,
# write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
# Boston, MA 02111-1307, USA.
#
# Makefile for ncurses part.
#
subdir := ncurses
ncurses-version = 4.2
form-version = $(ncurses-version)
menu-version = $(ncurses-version)
panel-version = $(ncurses-version)
extras := form menu ncurses panel
extra-libs = $(extras:%=lib%)
# These libraries will be built in the `others' pass rather than
# the `lib' pass, because they depend on libc.so being built already.
extra-libs-others = $(extra-libs)
# The sources are found in the appropriate subdir.
subdir-dirs = $(extras) progs test
vpath %.c $(subdir-dirs)
vpath %.h $(subdir-dirs)
libform-routines = \
fld_arg \
fld_attr \
fld_current \
fld_def \
fld_dup \
fld_ftchoice \
fld_ftlink \
fld_info \
fld_just \
fld_link \
fld_max \
fld_move \
fld_newftyp \
fld_opts \
fld_pad \
fld_page \
fld_stat \
fld_type \
fld_user \
frm_cursor \
frm_data \
frm_def \
frm_driver \
frm_hook \
frm_opts \
frm_page \
frm_post \
frm_req_name \
frm_scale \
frm_sub \
frm_user \
frm_win \
fty_alnum \
fty_alpha \
fty_enum \
fty_int \
fty_ipv4 \
fty_num \
fty_regex
libncurses-routines = \
base/define_key \
base/keybound \
base/keyok \
base/lib_addch \
base/lib_addstr \
base/lib_beep \
base/lib_bkgd \
base/lib_box \
base/lib_chgat \
base/lib_clear \
base/lib_clearok \
base/lib_clrbot \
base/lib_clreol \
base/lib_color \
base/lib_colorset \
base/lib_delch \
base/lib_delwin \
base/lib_dft_fgbg \
base/lib_echo \
base/lib_endwin \
base/lib_erase \
base/lib_flash \
base/lib_freeall \
base/lib_getch \
base/lib_getstr \
base/lib_hline \
base/lib_immedok \
base/lib_inchstr \
base/lib_initscr \
base/lib_insch \
base/lib_insdel \
base/lib_insstr \
base/lib_instr \
base/lib_isendwin \
base/lib_leaveok \
base/lib_mouse \
base/lib_move \
base/lib_mvwin \
base/lib_newterm \
base/lib_newwin \
base/lib_nl \
base/lib_overlay \
base/lib_pad \
base/lib_printw \
base/lib_redrawln \
base/lib_refresh \
base/lib_restart \
base/lib_scanw \
base/lib_screen \
base/lib_scroll \
base/lib_scrollok \
base/lib_scrreg \
base/lib_set_term \
base/lib_slk \
base/lib_slkatr_set \
base/lib_slkatrof \
base/lib_slkatron \
base/lib_slkatrset \
base/lib_slkattr \
base/lib_slkclear \
base/lib_slkcolor \
base/lib_slkinit \
base/lib_slklab \
base/lib_slkrefr \
base/lib_slkset \
base/lib_slktouch \
base/lib_touch \
base/lib_ungetch \
base/lib_vline \
base/lib_wattroff \
base/lib_wattron \
base/lib_winch \
base/lib_window \
base/memmove \
base/nc_panel \
base/resizeterm \
base/safe_sprintf \
base/sigaction \
base/tries \
base/version \
base/vsscanf \
base/wresize \
codes \
comp_captab \
expanded \
fallback \
lib_gen \
lib_keyname \
names \
tinfo/access \
tinfo/add_tries \
tinfo/alloc_entry \
tinfo/alloc_ttype \
tinfo/captoinfo \
tinfo/comp_error \
tinfo/comp_expand \
tinfo/comp_hash \
tinfo/comp_parse \
tinfo/comp_scan \
tinfo/doalloc \
tinfo/free_ttype \
tinfo/getenv_num \
tinfo/home_terminfo \
tinfo/init_keytry \
tinfo/lib_acs \
tinfo/lib_baudrate \
tinfo/lib_cur_term \
tinfo/lib_data \
tinfo/lib_has_cap \
tinfo/lib_kernel \
tinfo/lib_longname \
tinfo/lib_napms \
tinfo/lib_options \
tinfo/lib_print \
tinfo/lib_raw \
tinfo/lib_setup \
tinfo/lib_termcap \
tinfo/lib_termname \
tinfo/lib_tgoto \
tinfo/lib_ti \
tinfo/lib_tparm \
tinfo/lib_tputs \
tinfo/lib_ttyflags \
tinfo/name_match \
tinfo/parse_entry \
tinfo/read_entry \
tinfo/read_termcap \
tinfo/setbuf \
tinfo/strings \
tinfo/write_entry \
trace/lib_trace \
trace/lib_traceatr \
trace/lib_tracebits \
trace/lib_tracechr \
trace/lib_tracedmp \
trace/lib_tracemse \
trace/trace_buf \
trace/trace_tries \
trace/trace_xnames \
trace/varargs \
trace/visbuf \
tty/hardscroll \
tty/hashmap \
tty/lib_mvcur \
tty/lib_tstp \
tty/lib_twait \
tty/lib_vidattr \
tty/tty_update \
unctrl
libmenu-routines = \
m_attribs \
m_cursor \
m_driver \
m_format \
m_global \
m_hook \
m_item_cur \
m_item_nam \
m_item_new \
m_item_opt \
m_item_top \
m_item_use \
m_item_val \
m_item_vis \
m_items \
m_new \
m_opts \
m_pad \
m_pattern \
m_post \
m_req_name \
m_scale \
m_spacing \
m_sub \
m_userptr \
m_win
libpanel-routines = \
panel \
p_above \
p_below \
p_bottom \
p_delete \
p_hide \
p_hidden \
p_move \
p_new \
p_replace \
p_show \
p_top \
p_update \
p_user \
p_win
headers = curses.h eti.h form.h menu.h panel.h term.h termcap.h \
unctrl.h
others = clear infocmp tic toe tput tset
install-bin = $(others)
clear-objs = clear.o
infocmp-objs = infocmp.o dump_entry.o
tic-objs = tic.o dump_entry.o
toe-objs = toe.o dump_entry.o
tput-objs = tput.o
tset-objs = tset.o dump_entry.o
extra-objs = $(tic-objs) $(toe-objs) $(infocmp-objs) $(clear-objs) \
$(tput-objs) $(tset-objs)
test-srcs = blue bs cardfile ditto firework firstlast gdc hanoi hashtest knight \
lrtest ncurses newdemo rain tclock testaddch testcurs \
testscanw view worm xmas
include ../Rules
ifndef tabsetdir
tabsetdir = $(datadir)/tabset
endif
ifndef inst_tabsetdir
inst_tabsetdir = $(install_root)/$(tabsetdir)
endif
ifndef terminfodir
terminfodir = $(datadir)/terminfo
endif
ifndef inst_terminfodir
inst_terminfodir = $(install_root)/$(terminfodir)
endif
ifndef mandir
mandir = $(prefix)/man
endif
ifndef inst_mandir
inst_mandir = $(install_root)/$(mandir)
endif
CPPFLAGS += -DTERMINFO='"$(terminfodir)"' -Iinclude -Iform -Incurses \
-Imenu -Ipanel -Iprogs -Itest
ifneq ($(strip $(objpfx)),)
CPPFLAGS += -I$(objpfx)
endif
LDLIBS-tclock = math/libm
tests: $(test-srcs:%=$(objpfx)%)
$(objpfx)clear: $(addprefix $(objpfx),$(clear-objs))
$(objpfx)infocmp: $(addprefix $(objpfx),$(infocmp-objs))
$(objpfx)tic: $(addprefix $(objpfx),$(tic-objs))
$(objpfx)toe: $(addprefix $(objpfx),$(toe-objs))
$(objpfx)tput: $(addprefix $(objpfx),$(tput-objs))
$(objpfx)tset: $(addprefix $(objpfx),$(tset-objs))
ifeq ($(build-shared),yes)
$(others:%=$(objpfx)%): $(objpfx)libncurses.so
else
$(others:%=$(objpfx)%): $(objpfx)libncurses.a
endif
$(test-srcs:%=$(objpfx)%): $(objpfx)libform.a $(objpfx)libmenu.a \
$(objpfx)libpanel.a $(objpfx)libncurses.a
# Depend on libc.so so a DT_NEEDED is generated in the shared objects.
# This ensures they will load libc.so for needed symbols if loaded by
# a statically-linked program that hasn't already loaded it.
$(extras:%=$(objpfx)lib%.so): $(common-objpfx)libc.so
subdir_install: $(inst_libdir)/libtermcap.a $(inst_libdir)/libcurses.a \
$(inst_bindir)/reset $(inst_bindir)/captoinfo
$(inst_libdir)/libtermcap.a $(inst_libdir)/libcurses.a: \
$(inst_libdir)/libncurses.a
$(make-link)
$(inst_bindir)/reset: $(inst_bindir)/tset
$(make-link)
$(inst_bindir)/captoinfo: $(inst_bindir)/tic
$(make-link)
ifeq (yes,$(build-shared))
subdir_install: $(inst_libdir)/libtermcap.so $(inst_libdir)/libcurses.so
$(inst_libdir)/libtermcap.so $(inst_libdir)/libcurses.so: \
$(inst_libdir)/libncurses.so
$(make-link)
endif
subdir_install: $(inst_mandir)/man5/terminfo.5
$(inst_mandir)/man5/terminfo.5: $(objpfx)terminfo.5 $(wildcard man/*.[0-9]*)
$(make-target-directory)
sh $(edit_man-sh) $(prefix) $(inst_mandir) $(edit_man-sed) $^
subdir_install: $(inst_tabsetdir)/std
$(inst_tabsetdir)/std: \
$(filter-out misc/tabset/CVS, $(wildcard misc/tabset/*))
$(make-target-directory)
for f in $^; do \
echo installing $$f; \
$(INSTALL_DATA) $$f $(inst_tabsetdir); \
done
ifeq (no,$(cross-compiling))
subdir_install: $(inst_terminfodir)/v/vt100
$(inst_terminfodir)/v/vt100: misc/terminfo.src $(objpfx)tic
$(make-target-directory)
sh $(run_tic-sh) $(common-objpfx) misc $(terminfodir) \
$(install_root)
endif
subdir_distclean subdir_realclean:
-rm -f $(addprefix $(objpfx), MKterm.h.awk codes.c \
comp_captab.c confdefs.h config.log curses.h \
expanded.c fallback.c hashsize.h keys.tries \
lib_gen.c lib_keyname.c names.c ncurses_cfg.h \
nomacros.h parametrized.h term.h termcap.h \
terminfo.5 termsort.c unctrl.c unctrl.h)
|