ncurses 6.0 - patch 20150808
[ncurses.git] / ncurses / Makefile.in
1 # $Id: Makefile.in,v 1.147 2015/08/05 23:15:41 tom Exp $
2 ##############################################################################
3 # Copyright (c) 1998-2014,2015 Free Software Foundation, Inc.                #
4 #                                                                            #
5 # Permission is hereby granted, free of charge, to any person obtaining a    #
6 # copy of this software and associated documentation files (the "Software"), #
7 # to deal in the Software without restriction, including without limitation  #
8 # the rights to use, copy, modify, merge, publish, distribute, distribute    #
9 # with modifications, sublicense, and/or sell copies of the Software, and to #
10 # permit persons to whom the Software is furnished to do so, subject to the  #
11 # following conditions:                                                      #
12 #                                                                            #
13 # The above copyright notice and this permission notice shall be included in #
14 # all copies or substantial portions of the Software.                        #
15 #                                                                            #
16 # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR #
17 # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,   #
18 # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL    #
19 # THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER      #
20 # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING    #
21 # FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER        #
22 # DEALINGS IN THE SOFTWARE.                                                  #
23 #                                                                            #
24 # Except as contained in this notice, the name(s) of the above copyright     #
25 # holders shall not be used in advertising or otherwise to promote the sale, #
26 # use or other dealings in this Software without prior written               #
27 # authorization.                                                             #
28 ##############################################################################
29 #
30 # Author: Thomas E. Dickey 1996-on
31 #
32 # Makefile for ncurses source code.
33 #
34 # This makes the following:
35 #       programs
36 #       includes
37 #       libraries (normal/debug/profile/shared)
38 #
39 # The variable 'srcdir' refers to the source-distribution, and can be set with
40 # the configure script by "--srcdir=DIR".
41 #
42 # The rules are organized to produce the libraries for the configured models,
43 # and the programs with the configured default model.
44
45 # turn off _all_ suffix rules; we'll generate our own
46 .SUFFIXES:
47
48 SHELL           = @SHELL@
49 VPATH           = @srcdir@
50 THIS            = Makefile
51
52 CF_MFLAGS       = @cf_cv_makeflags@
53 @SET_MAKE@
54
55 x               = @EXEEXT@
56 o               = .@OBJEXT@
57
58 MODEL           = @DFT_LWR_MODEL@
59 DESTDIR         = @DESTDIR@
60 top_srcdir      = @top_srcdir@
61 srcdir          = @srcdir@
62 prefix          = @prefix@
63 exec_prefix     = @exec_prefix@
64 bindir          = @bindir@
65 libdir          = @libdir@
66 includedir      = @includedir@
67 datarootdir     = @datarootdir@
68 datadir         = @datadir@
69 includesubdir   = @includesubdir@
70
71 INCLUDEDIR      = $(DESTDIR)$(includedir)$(includesubdir)
72
73 PACKAGE         = @PACKAGE@
74
75 LIBTOOL         = @LIBTOOL@
76 LIBTOOL_OPTS    = @LIBTOOL_OPTS@ @EXPORT_SYMS@
77 LIBTOOL_CLEAN   = @LIB_CLEAN@
78 LIBTOOL_COMPILE = @LIB_COMPILE@
79 LIBTOOL_LINK    = @LIB_LINK@
80 LIBTOOL_INSTALL = @LIB_INSTALL@
81 LIBTOOL_UNINSTALL = @LIB_UNINSTALL@
82 LT_UNDEF        = @LT_UNDEF@
83
84 INSTALL         = @INSTALL@
85 INSTALL_LIB     = @INSTALL@ @INSTALL_LIB@
86 INSTALL_PROG    = @INSTALL_PROGRAM@
87 INSTALL_DATA    = @INSTALL_DATA@
88
89 AR              = @AR@
90 ARFLAGS         = @ARFLAGS@
91 AWK             = @AWK@
92 LD              = @LD@
93 LN_S            = @LN_S@
94 NM              = @NM@
95
96 CTAGS           = @CTAGS@
97 ETAGS           = @ETAGS@
98
99 CC              = @CC@
100 CPP             = @CPP@
101 CFLAGS          = @CFLAGS@
102
103 INCDIR          = $(srcdir)/../include
104 CPPFLAGS        = -DHAVE_CONFIG_H @CPPFLAGS@
105
106 CCFLAGS         = $(CPPFLAGS) $(CFLAGS)
107
108 BUILD_CPPFLAGS  = -DHAVE_CONFIG_H -DUSE_BUILD_CC -I../ncurses -I$(srcdir) -I../include -I$(INCDIR) @BUILD_CPPFLAGS@ 
109 BUILD_CC        = @BUILD_CC@
110 BUILD_CCFLAGS   = @BUILD_CFLAGS@
111 BUILD_LDFLAGS   = @BUILD_LDFLAGS@
112 BUILD_LIBS      = @BUILD_LIBS@
113
114 # The executables built in this directory are used for generating source that
115 # is compiled into the build, or are test-programs that are not installed.
116
117 BUILD_EXEEXT    = @BUILD_EXEEXT@
118 x               = @EXEEXT@
119
120 CFLAGS_LIBTOOL  = $(CCFLAGS)
121 CFLAGS_NORMAL   = $(CCFLAGS)
122 CFLAGS_DEBUG    = $(CCFLAGS) @CC_G_OPT@ -DTRACE
123 CFLAGS_PROFILE  = $(CCFLAGS) -pg
124 CFLAGS_SHARED   = $(CCFLAGS) @CC_SHARED_OPTS@
125
126 CFLAGS_DEFAULT  = $(CFLAGS_@DFT_UPR_MODEL@)
127
128 LINK            = $(LIBTOOL)
129 LDFLAGS         = @LDFLAGS@ @LD_MODEL@ @LIBS@
130
131 SHLIB_DIRS      = -L../lib
132 SHLIB_LIST      = $(SHLIB_DIRS) @SHLIB_LIST@
133 TINFO_LIST      = $(SHLIB_DIRS) @TINFO_LIST@
134 TICS_LIST       = $(SHLIB_DIRS) @TICS_LIST@
135
136 RPATH_LIST      = @RPATH_LIST@
137 RESULTING_SYMS  = @RESULTING_SYMS@
138 VERSIONED_SYMS  = @VERSIONED_SYMS@
139 MK_SHARED_LIB   = @MK_SHARED_LIB@
140
141 NCURSES_MAJOR   = @NCURSES_MAJOR@
142 NCURSES_MINOR   = @NCURSES_MINOR@
143 REL_VERSION     = @cf_cv_rel_version@
144 ABI_VERSION     = @cf_cv_abi_version@
145
146 RANLIB          = @LIB_PREP@
147
148 LIBRARIES       = @Libs_To_Make@
149
150 LINT            = @LINT@
151 LINT_OPTS       = @LINT_OPTS@
152 LINT_LIBS       = -lncurses @LIBS@
153
154 FALLBACK_LIST   = @FALLBACK_LIST@
155
156 USE_BIG_STRINGS = @USE_BIG_STRINGS@
157 TERMINFO_CAPS   = $(top_srcdir)/include/@TERMINFO_CAPS@
158
159 TERMINFO        = @TERMINFO@
160 TERMINFO_SRC    = @TERMINFO_SRC@
161 TIC_PATH        = @TIC_PATH@
162
163 AUTO_SRC = \
164         ./codes.c \
165         ./comp_captab.c \
166         ./expanded.c \
167         ./fallback.c \
168         ./lib_gen.c \
169         ./lib_keyname.c \
170         ./link_test.c \
171         ./names.c \
172         ./unctrl.c \
173         init_keytry.h \
174         keys.list
175
176 HEADER_DEPS     = \
177         $(srcdir)/curses.priv.h \
178         ../include/ncurses_dll.h \
179         ../include/ncurses_cfg.h \
180         ../include/curses.h \
181         $(INCDIR)/nc_panel.h \
182         ../include/term.h \
183         $(INCDIR)/term_entry.h \
184         $(INCDIR)/nc_tparm.h \
185         $(INCDIR)/nc_alloc.h \
186         $(INCDIR)/nc_mingw.h
187
188 TEST_DEPS       = ../lib/@LIB_PREFIX@ncurses@DFT_DEP_SUFFIX@
189 TEST_ARGS       = @LDFLAGS_STATIC@ @TEST_ARGS@ @LDFLAGS_SHARED@ 
190 TEST_LDFLAGS    = @LD_MODEL@ $(TEST_ARGS) @LIBS@ @LOCAL_LDFLAGS@ @LDFLAGS@
191
192 TEST_PROGS = \
193         captoinfo$x \
194         hardscroll$x \
195         link_test$x \
196         hashmap$x \
197         lib_mvcur$x
198
199 base     = $(srcdir)/base
200 serial   = $(srcdir)/tty
201 tinfo    = $(srcdir)/tinfo
202 trace    = $(srcdir)/trace
203 wide     = $(srcdir)/widechar
204 win32con = $(srcdir)/win32con
205
206 ################################################################################
207 all \
208 libs ::         $(AUTO_SRC) ../lib $(LIBRARIES)
209
210 sources:        $(AUTO_SRC)
211
212 $(DESTDIR)$(bindir) \
213 $(DESTDIR)$(libdir) :
214         mkdir -p $@
215
216 ../lib : ; mkdir $@
217
218 ./fallback.c : $(tinfo)/MKfallback.sh
219         $(SHELL) -e $(tinfo)/MKfallback.sh $(TERMINFO) $(TERMINFO_SRC) $(TIC_PATH) $(FALLBACK_LIST) >$@
220
221 ./lib_gen.c : $(base)/MKlib_gen.sh ../include/curses.h
222         $(SHELL) -e $(base)/MKlib_gen.sh "$(CPP) $(CPPFLAGS)" "$(AWK)" generated <../include/curses.h >$@
223
224 init_keytry.h: make_keys$(BUILD_EXEEXT) keys.list
225         ./make_keys$(BUILD_EXEEXT) keys.list > $@
226
227 keys.list :     $(tinfo)/MKkeys_list.sh
228         AWK=$(AWK) $(SHELL) $(tinfo)/MKkeys_list.sh $(TERMINFO_CAPS) | sort >$@
229
230 make_keys$(BUILD_EXEEXT) : \
231                 $(tinfo)/make_keys.c \
232                 names.c
233         $(BUILD_CC) -o $@ $(BUILD_CPPFLAGS) $(BUILD_CCFLAGS) $(tinfo)/make_keys.c $(BUILD_LDFLAGS) $(BUILD_LIBS)
234
235 make_hash$(BUILD_EXEEXT) : \
236                 $(tinfo)/make_hash.c \
237                 ../include/hashsize.h
238         $(BUILD_CC) -o $@ $(BUILD_CPPFLAGS) $(BUILD_CCFLAGS) $(tinfo)/make_hash.c $(BUILD_LDFLAGS) $(BUILD_LIBS)
239
240 ./expanded.c : $(srcdir)/curses.priv.h $(serial)/MKexpanded.sh
241         $(SHELL) -e $(serial)/MKexpanded.sh "$(CPP)" $(CPPFLAGS) > $@
242
243 ./comp_captab.c: \
244                 make_hash$(BUILD_EXEEXT) \
245                 ../include/hashsize.h \
246                 $(tinfo)/MKcaptab.sh \
247                 $(tinfo)/MKcaptab.awk
248         $(SHELL) -e $(tinfo)/MKcaptab.sh $(AWK) $(USE_BIG_STRINGS) $(tinfo)/MKcaptab.awk $(srcdir)/../include/@TERMINFO_CAPS@ > $@
249
250 ./lib_keyname.c: keys.list $(base)/MKkeyname.awk
251         $(AWK) -f $(base)/MKkeyname.awk bigstrings=$(USE_BIG_STRINGS) keys.list > $@
252
253 ./codes.c: $(tinfo)/MKcodes.awk
254         $(AWK) -f $(tinfo)/MKcodes.awk bigstrings=$(USE_BIG_STRINGS) $(srcdir)/../include/@TERMINFO_CAPS@ >$@
255
256 ./names.c: $(tinfo)/MKnames.awk
257         $(AWK) -f $(tinfo)/MKnames.awk bigstrings=$(USE_BIG_STRINGS) $(srcdir)/../include/@TERMINFO_CAPS@ >$@
258
259 ./unctrl.c: $(base)/MKunctrl.awk
260         echo | $(AWK) -f $(base)/MKunctrl.awk bigstrings=$(USE_BIG_STRINGS) >$@
261
262 tags:
263         $(CTAGS) *.[ch] */*.[ch]
264
265 @MAKE_UPPER_TAGS@TAGS:
266 @MAKE_UPPER_TAGS@       $(ETAGS) *.[ch] */*.[ch]
267
268 mostlyclean ::
269         -rm -f core tags TAGS *~ *.bak *.i *.ln *.atac trace
270         -rm -f $(TEST_PROGS)
271
272 clean :: mostlyclean
273         -rm -f $(AUTO_SRC)
274         -rm -f make_keys$(BUILD_EXEEXT)
275         -rm -f make_hash$(BUILD_EXEEXT)
276         -rm -rf .libs *.dSYM *.map
277
278 distclean :: clean
279         -rm -f Makefile
280
281 realclean :: distclean
282
283 # These rules are used to allow "make -n" to work on a clean directory-tree
284 ../include/hashsize.h \
285 ../include/parametrized.h \
286 ../include/term.h :
287         cd ../include; $(MAKE) $(CF_MFLAGS)
288
289 # These rules build test-programs for the modules that have test-drivers
290 test_progs : $(TEST_PROGS)
291
292 ./link_test.c : $(base)/MKlib_gen.sh ../include/curses.h
293         $(SHELL) -e $(base)/MKlib_gen.sh "$(CPP) $(CPPFLAGS)" "$(AWK)" implemented <../include/curses.h >$@
294
295 captoinfo$x : $(tinfo)/captoinfo.c $(TEST_DEPS)
296         @ECHO_LD@ $(LIBTOOL_LINK) -o $@ $(CFLAGS_DEFAULT) -DMAIN $(tinfo)/captoinfo.c $(TEST_LDFLAGS)
297
298 hardscroll$x : $(serial)/hardscroll.c $(TEST_DEPS)
299         @ECHO_LD@ $(LIBTOOL_LINK) -o $@ $(CFLAGS_DEFAULT) -DSCROLLDEBUG $(serial)/hardscroll.c $(TEST_LDFLAGS)
300
301 hashmap$x : $(serial)/hashmap.c $(serial)/hardscroll.c $(TEST_DEPS)
302         @ECHO_LD@ $(LIBTOOL_LINK) -o $@ $(CFLAGS_DEFAULT) -DHASHDEBUG $(serial)/hashmap.c $(serial)/hardscroll.c $(TEST_LDFLAGS)
303
304 lib_mvcur$x : $(serial)/lib_mvcur.c $(TEST_DEPS) \
305                 ../@DFT_OBJ_SUBDIR@/dump_entry$o
306         @ECHO_LD@ $(LIBTOOL_LINK) -o $@ $(CFLAGS_DEFAULT) -DNCURSES_TEST -I$(serial)/../../progs $(serial)/lib_mvcur.c ../@DFT_OBJ_SUBDIR@/dump_entry$o $(TEST_LDFLAGS)
307
308 link_test$x : ./link_test.c $(TEST_DEPS) \
309                 ../@DFT_OBJ_SUBDIR@/link_test$o
310         @ECHO_LD@ $(CC) -o $@ $(CFLAGS_DEFAULT) ../@DFT_OBJ_SUBDIR@/link_test$o $(TEST_LDFLAGS)
311
312 ../@DFT_OBJ_SUBDIR@/dump_entry$o:
313         cd ../progs && $(MAKE) ../@DFT_OBJ_SUBDIR@/dump_entry$o
314
315 ###############################################################################
316 # The remainder of this file is automatically generated during configuration
317 ###############################################################################