ncurses 5.9 - patch 20141115
[ncurses.git] / ncurses / Makefile.in
1 # $Id: Makefile.in,v 1.144 2014/11/15 13:54:00 tom Exp $
2 ##############################################################################
3 # Copyright (c) 1998-2013,2014 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           = /bin/sh
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 VERSIONED_SYMS  = @VERSIONED_SYMS@
138 MK_SHARED_LIB   = @MK_SHARED_LIB@
139
140 NCURSES_MAJOR   = @NCURSES_MAJOR@
141 NCURSES_MINOR   = @NCURSES_MINOR@
142 REL_VERSION     = @cf_cv_rel_version@
143 ABI_VERSION     = @cf_cv_abi_version@
144
145 RANLIB          = @LIB_PREP@
146
147 LIBRARIES       = @Libs_To_Make@
148
149 LINT            = @LINT@
150 LINT_OPTS       = @LINT_OPTS@
151 LINT_LIBS       = -lncurses @LIBS@
152
153 FALLBACK_LIST   = @FALLBACK_LIST@
154
155 USE_BIG_STRINGS = @USE_BIG_STRINGS@
156 TERMINFO_CAPS   = $(top_srcdir)/include/@TERMINFO_CAPS@
157
158 TERMINFO        = @TERMINFO@
159 TERMINFO_SRC    = @TERMINFO_SRC@
160 TIC_PATH        = @TIC_PATH@
161
162 AUTO_SRC = \
163         ./codes.c \
164         ./comp_captab.c \
165         ./expanded.c \
166         ./fallback.c \
167         ./lib_gen.c \
168         ./lib_keyname.c \
169         ./link_test.c \
170         ./names.c \
171         ./unctrl.c \
172         init_keytry.h \
173         keys.list
174
175 HEADER_DEPS     = \
176         $(srcdir)/curses.priv.h \
177         ../include/ncurses_dll.h \
178         ../include/ncurses_cfg.h \
179         ../include/curses.h \
180         $(INCDIR)/nc_panel.h \
181         ../include/term.h \
182         $(INCDIR)/term_entry.h \
183         $(INCDIR)/nc_tparm.h \
184         $(INCDIR)/nc_alloc.h \
185         $(INCDIR)/nc_mingw.h
186
187 TEST_DEPS       = ../lib/@LIB_PREFIX@ncurses@DFT_DEP_SUFFIX@
188 TEST_ARGS       = @LDFLAGS_STATIC@ @TEST_ARGS@ @LDFLAGS_SHARED@ 
189 TEST_LDFLAGS    = @LD_MODEL@ $(TEST_ARGS) @LIBS@ @LOCAL_LDFLAGS@ @LDFLAGS@
190
191 TEST_PROGS = \
192         captoinfo$x \
193         hardscroll$x \
194         link_test$x \
195         hashmap$x \
196         lib_mvcur$x
197
198 base     = $(srcdir)/base
199 serial   = $(srcdir)/tty
200 tinfo    = $(srcdir)/tinfo
201 trace    = $(srcdir)/trace
202 wide     = $(srcdir)/widechar
203 win32con = $(srcdir)/win32con
204
205 ################################################################################
206 all \
207 libs ::         $(AUTO_SRC) ../lib $(LIBRARIES)
208
209 sources:        $(AUTO_SRC)
210
211 $(DESTDIR)$(bindir) \
212 $(DESTDIR)$(libdir) :
213         mkdir -p $@
214
215 ../lib : ; mkdir $@
216
217 ./fallback.c : $(tinfo)/MKfallback.sh
218         sh -e $(tinfo)/MKfallback.sh $(TERMINFO) $(TERMINFO_SRC) $(TIC_PATH) $(FALLBACK_LIST) >$@
219
220 ./lib_gen.c : $(base)/MKlib_gen.sh ../include/curses.h
221         sh -e $(base)/MKlib_gen.sh "$(CPP) $(CPPFLAGS)" "$(AWK)" generated <../include/curses.h >$@
222
223 init_keytry.h: make_keys$(BUILD_EXEEXT) keys.list
224         ./make_keys$(BUILD_EXEEXT) keys.list > $@
225
226 keys.list :     $(tinfo)/MKkeys_list.sh
227         AWK=$(AWK) sh $(tinfo)/MKkeys_list.sh $(TERMINFO_CAPS) | sort >$@
228
229 make_keys$(BUILD_EXEEXT) : \
230                 $(tinfo)/make_keys.c \
231                 names.c
232         $(BUILD_CC) -o $@ $(BUILD_CPPFLAGS) $(BUILD_CCFLAGS) $(tinfo)/make_keys.c $(BUILD_LDFLAGS) $(BUILD_LIBS)
233
234 make_hash$(BUILD_EXEEXT) : \
235                 $(tinfo)/make_hash.c \
236                 ../include/hashsize.h
237         $(BUILD_CC) -o $@ $(BUILD_CPPFLAGS) $(BUILD_CCFLAGS) $(tinfo)/make_hash.c $(BUILD_LDFLAGS) $(BUILD_LIBS)
238
239 ./expanded.c : $(srcdir)/curses.priv.h $(serial)/MKexpanded.sh
240         sh -e $(serial)/MKexpanded.sh "$(CPP)" $(CPPFLAGS) > $@
241
242 ./comp_captab.c: \
243                 make_hash$(BUILD_EXEEXT) \
244                 ../include/hashsize.h \
245                 $(tinfo)/MKcaptab.sh \
246                 $(tinfo)/MKcaptab.awk
247         sh -e $(tinfo)/MKcaptab.sh $(AWK) $(USE_BIG_STRINGS) $(tinfo)/MKcaptab.awk $(srcdir)/../include/@TERMINFO_CAPS@ > $@
248
249 ./lib_keyname.c: keys.list $(base)/MKkeyname.awk
250         $(AWK) -f $(base)/MKkeyname.awk bigstrings=$(USE_BIG_STRINGS) keys.list > $@
251
252 ./codes.c: $(tinfo)/MKcodes.awk
253         $(AWK) -f $(tinfo)/MKcodes.awk bigstrings=$(USE_BIG_STRINGS) $(srcdir)/../include/@TERMINFO_CAPS@ >$@
254
255 ./names.c: $(tinfo)/MKnames.awk
256         $(AWK) -f $(tinfo)/MKnames.awk bigstrings=$(USE_BIG_STRINGS) $(srcdir)/../include/@TERMINFO_CAPS@ >$@
257
258 ./unctrl.c: $(base)/MKunctrl.awk
259         echo | $(AWK) -f $(base)/MKunctrl.awk bigstrings=$(USE_BIG_STRINGS) >$@
260
261 tags:
262         $(CTAGS) *.[ch] */*.[ch]
263
264 @MAKE_UPPER_TAGS@TAGS:
265 @MAKE_UPPER_TAGS@       $(ETAGS) *.[ch] */*.[ch]
266
267 ncurses.map : $(LIBRARIES)
268         $(NM) -p $(LIBRARIES) >$@
269
270 mostlyclean ::
271         -rm -f core tags TAGS *~ *.bak *.i *.ln *.atac trace
272         -rm -f $(TEST_PROGS)
273
274 clean :: mostlyclean
275         -rm -f $(AUTO_SRC)
276         -rm -f make_keys$(BUILD_EXEEXT)
277         -rm -f make_hash$(BUILD_EXEEXT)
278         -rm -rf .libs *.dSYM *.map
279
280 distclean :: clean
281         -rm -f Makefile
282
283 realclean :: distclean
284
285 # These rules are used to allow "make -n" to work on a clean directory-tree
286 ../include/hashsize.h \
287 ../include/parametrized.h \
288 ../include/term.h :
289         cd ../include; $(MAKE) $(CF_MFLAGS)
290
291 # These rules build test-programs for the modules that have test-drivers
292 test_progs : $(TEST_PROGS)
293
294 ./link_test.c : $(base)/MKlib_gen.sh ../include/curses.h
295         sh -e $(base)/MKlib_gen.sh "$(CPP) $(CPPFLAGS)" "$(AWK)" implemented <../include/curses.h >$@
296
297 captoinfo$x : $(tinfo)/captoinfo.c $(TEST_DEPS)
298         @ECHO_LD@ $(LIBTOOL_LINK) -o $@ $(CFLAGS_DEFAULT) -DMAIN $(tinfo)/captoinfo.c $(TEST_LDFLAGS)
299
300 hardscroll$x : $(serial)/hardscroll.c $(TEST_DEPS)
301         @ECHO_LD@ $(LIBTOOL_LINK) -o $@ $(CFLAGS_DEFAULT) -DSCROLLDEBUG $(serial)/hardscroll.c $(TEST_LDFLAGS)
302
303 hashmap$x : $(serial)/hashmap.c $(serial)/hardscroll.c $(TEST_DEPS)
304         @ECHO_LD@ $(LIBTOOL_LINK) -o $@ $(CFLAGS_DEFAULT) -DHASHDEBUG $(serial)/hashmap.c $(serial)/hardscroll.c $(TEST_LDFLAGS)
305
306 lib_mvcur$x : $(serial)/lib_mvcur.c $(TEST_DEPS) \
307                 ../@DFT_OBJ_SUBDIR@/dump_entry$o
308         @ECHO_LD@ $(LIBTOOL_LINK) -o $@ $(CFLAGS_DEFAULT) -DNCURSES_TEST -I$(serial)/../../progs $(serial)/lib_mvcur.c ../@DFT_OBJ_SUBDIR@/dump_entry$o $(TEST_LDFLAGS)
309
310 link_test$x : ./link_test.c $(TEST_DEPS) \
311                 ../@DFT_OBJ_SUBDIR@/link_test$o
312         @ECHO_LD@ $(CC) -o $@ $(CFLAGS_DEFAULT) ../@DFT_OBJ_SUBDIR@/link_test$o $(TEST_LDFLAGS)
313
314 ../@DFT_OBJ_SUBDIR@/dump_entry$o:
315         cd ../progs && $(MAKE) ../@DFT_OBJ_SUBDIR@/dump_entry$o
316
317 ###############################################################################
318 # The remainder of this file is automatically generated during configuration
319 ###############################################################################