]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - lib/ncurses/ncurses/Makefile
sqlite3: Vendor import of sqlite3 3.37.2
[FreeBSD/FreeBSD.git] / lib / ncurses / ncurses / Makefile
1 # $FreeBSD$
2
3 PACKAGE=        clibs
4 SHLIBDIR?=      /lib
5
6 .include <src.opts.mk>
7
8 .include "${.CURDIR:H}/config.mk"
9
10 LIB=            ncursesw
11 SHLIB_MAJOR=    9
12
13 NO_LINT=
14
15 GENSRCS=        \
16         expanded.c \
17         lib_gen.c
18
19 SRCS=   ${GENSRCS}
20
21 .PATH: ${NCURSES_DIR}/ncurses/base
22 SRCS+=  \
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
103 SRCS+=  \
104         use_screen.c \
105         use_window.c
106
107 .PATH: ${NCURSES_DIR}/ncurses/trace
108 SRCS+=  \
109         varargs.c
110
111 # DONE
112 .PATH: ${NCURSES_DIR}/ncurses/tty
113 SRCS+=  \
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
122 SRCS+=  \
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.
145 DBGSRCS= \
146         varargs.c
147
148 CLEANFILES=     ${GENSRCS}
149
150 .if ${MK_INSTALLLIB} != "no"
151 SYMLINKS+=      libncursesw.a ${LIBDIR}/libcursesw.a
152 # backward compat
153 SYMLINKS+=      libncursesw.a ${LIBDIR}/libncurses.a
154 SYMLINKS+=      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
158 SYMLINKS+=      libncursesw.so ${LIBDIR}/libcursesw.so
159 # backward compat
160 SYMLINKS+=      libncursesw.so ${LIBDIR}/libncurses.so
161 SYMLINKS+=      libncursesw.so ${LIBDIR}/libcurses.so
162 .endif
163 .if ${MK_PROFILE} != "no"
164 SYMLINKS+=      libncursesw_p.a ${LIBDIR}/libcursesw_p.a
165 # backward compat
166 SYMLINKS+=      libncursesw_p.a ${LIBDIR}/libncurses_p.a
167 SYMLINKS+=      libncursesw_p.a ${LIBDIR}/libcurses_p.a
168 .endif
169
170 LIBADD+=        tinfow
171 SHLIB_LDSCRIPT= libncursesw.ldscript
172 STATIC_LDSCRIPT= libncursesw.aldscript
173 CLEANFILES+= libncursesw.ald
174 # Keep this for a while to ensure the file is removed during make clean
175 CLEANFILES+= libncursesw.a
176
177 libncursesw.ald: ${.CURDIR}/${STATIC_LDSCRIPT}
178         sed -e 's,@@LIB@@,${LIB},g' \
179             -e 's,@@STATICLIB_SUFFIX@@,${_STATICLIB_SUFFIX},g' \
180             ${.ALLSRC} > ${.TARGET}
181
182 lib_gen.c: MKlib_gen.sh ${.OBJDIR:H}/tinfo/curses.h ncurses_dll.h
183         LC_ALL=C sh ${NCURSES_DIR}/ncurses/base/MKlib_gen.sh "${CPP:N${CCACHE_BIN}} ${CFLAGS}" \
184                "${AWK}" generated < ${.OBJDIR:H}/tinfo/curses.h >$@
185
186 expanded.c: MKexpanded.sh
187         sh ${NCURSES_DIR}/ncurses/tty/MKexpanded.sh "${CC:N${CCACHE_BIN}} -E" ${CFLAGS} >expanded.c
188
189 all: ${STATIC_LDSCRIPT} libncursesw.ald
190
191 install-libncursesw.a: libncursesw.ald
192         ${INSTALL} ${TAG_ARGS:D${TAG_ARGS},dev} -S -C -o ${LIBOWN} -g ${LIBGRP} -m ${LIBMODE} \
193             ${_INSTALLFLAGS} libncursesw.ald ${DESTDIR}${_LIBDIR}/lib${LIB}.a
194
195 realinstall: install-libncursesw.a
196
197
198 .include <bsd.lib.mk>