blob: e42c5e3b271ecf13be2f0ad526f1c4496f21beea [file] [log] [blame]
Steve Kondikae271bc2015-11-15 02:50:53 +01001# $Id: Makefile.in,v 1.147 2015/08/05 23:15:41 tom Exp $
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +05302##############################################################################
Steve Kondikae271bc2015-11-15 02:50:53 +01003# Copyright (c) 1998-2014,2015 Free Software Foundation, Inc. #
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +05304# #
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
Steve Kondikae271bc2015-11-15 02:50:53 +010048SHELL = @SHELL@
49VPATH = @srcdir@
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053050THIS = Makefile
51
52CF_MFLAGS = @cf_cv_makeflags@
53@SET_MAKE@
54
55x = @EXEEXT@
56o = .@OBJEXT@
57
58MODEL = @DFT_LWR_MODEL@
59DESTDIR = @DESTDIR@
60top_srcdir = @top_srcdir@
61srcdir = @srcdir@
62prefix = @prefix@
63exec_prefix = @exec_prefix@
64bindir = @bindir@
65libdir = @libdir@
66includedir = @includedir@
Steve Kondikae271bc2015-11-15 02:50:53 +010067datarootdir = @datarootdir@
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053068datadir = @datadir@
Steve Kondikae271bc2015-11-15 02:50:53 +010069includesubdir = @includesubdir@
70
71INCLUDEDIR = $(DESTDIR)$(includedir)$(includesubdir)
72
73PACKAGE = @PACKAGE@
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053074
75LIBTOOL = @LIBTOOL@
Steve Kondikae271bc2015-11-15 02:50:53 +010076LIBTOOL_OPTS = @LIBTOOL_OPTS@ @EXPORT_SYMS@
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053077LIBTOOL_CLEAN = @LIB_CLEAN@
78LIBTOOL_COMPILE = @LIB_COMPILE@
79LIBTOOL_LINK = @LIB_LINK@
80LIBTOOL_INSTALL = @LIB_INSTALL@
81LIBTOOL_UNINSTALL = @LIB_UNINSTALL@
Steve Kondikae271bc2015-11-15 02:50:53 +010082LT_UNDEF = @LT_UNDEF@
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053083
84INSTALL = @INSTALL@
85INSTALL_LIB = @INSTALL@ @INSTALL_LIB@
86INSTALL_PROG = @INSTALL_PROGRAM@
87INSTALL_DATA = @INSTALL_DATA@
88
89AR = @AR@
Steve Kondikae271bc2015-11-15 02:50:53 +010090ARFLAGS = @ARFLAGS@
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053091AWK = @AWK@
92LD = @LD@
93LN_S = @LN_S@
Steve Kondikae271bc2015-11-15 02:50:53 +010094NM = @NM@
95
96CTAGS = @CTAGS@
97ETAGS = @ETAGS@
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053098
99CC = @CC@
100CPP = @CPP@
101CFLAGS = @CFLAGS@
102
103INCDIR = $(srcdir)/../include
Steve Kondikae271bc2015-11-15 02:50:53 +0100104CPPFLAGS = -DHAVE_CONFIG_H @CPPFLAGS@
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +0530105
106CCFLAGS = $(CPPFLAGS) $(CFLAGS)
107
Steve Kondikae271bc2015-11-15 02:50:53 +0100108BUILD_CPPFLAGS = -DHAVE_CONFIG_H -DUSE_BUILD_CC -I../ncurses -I$(srcdir) -I../include -I$(INCDIR) @BUILD_CPPFLAGS@
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +0530109BUILD_CC = @BUILD_CC@
Steve Kondikae271bc2015-11-15 02:50:53 +0100110BUILD_CCFLAGS = @BUILD_CFLAGS@
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +0530111BUILD_LDFLAGS = @BUILD_LDFLAGS@
112BUILD_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
117BUILD_EXEEXT = @BUILD_EXEEXT@
Steve Kondikae271bc2015-11-15 02:50:53 +0100118x = @EXEEXT@
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +0530119
120CFLAGS_LIBTOOL = $(CCFLAGS)
121CFLAGS_NORMAL = $(CCFLAGS)
122CFLAGS_DEBUG = $(CCFLAGS) @CC_G_OPT@ -DTRACE
123CFLAGS_PROFILE = $(CCFLAGS) -pg
124CFLAGS_SHARED = $(CCFLAGS) @CC_SHARED_OPTS@
125
126CFLAGS_DEFAULT = $(CFLAGS_@DFT_UPR_MODEL@)
127
128LINK = $(LIBTOOL)
129LDFLAGS = @LDFLAGS@ @LD_MODEL@ @LIBS@
130
131SHLIB_DIRS = -L../lib
132SHLIB_LIST = $(SHLIB_DIRS) @SHLIB_LIST@
133TINFO_LIST = $(SHLIB_DIRS) @TINFO_LIST@
134TICS_LIST = $(SHLIB_DIRS) @TICS_LIST@
135
Steve Kondikae271bc2015-11-15 02:50:53 +0100136RPATH_LIST = @RPATH_LIST@
137RESULTING_SYMS = @RESULTING_SYMS@
138VERSIONED_SYMS = @VERSIONED_SYMS@
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +0530139MK_SHARED_LIB = @MK_SHARED_LIB@
140
141NCURSES_MAJOR = @NCURSES_MAJOR@
142NCURSES_MINOR = @NCURSES_MINOR@
143REL_VERSION = @cf_cv_rel_version@
144ABI_VERSION = @cf_cv_abi_version@
145
146RANLIB = @LIB_PREP@
147
Steve Kondikae271bc2015-11-15 02:50:53 +0100148LIBRARIES = @Libs_To_Make@
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +0530149
150LINT = @LINT@
151LINT_OPTS = @LINT_OPTS@
152LINT_LIBS = -lncurses @LIBS@
153
154FALLBACK_LIST = @FALLBACK_LIST@
155
156USE_BIG_STRINGS = @USE_BIG_STRINGS@
157TERMINFO_CAPS = $(top_srcdir)/include/@TERMINFO_CAPS@
158
Steve Kondikae271bc2015-11-15 02:50:53 +0100159TERMINFO = @TERMINFO@
160TERMINFO_SRC = @TERMINFO_SRC@
161TIC_PATH = @TIC_PATH@
162
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +0530163AUTO_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
Steve Kondikae271bc2015-11-15 02:50:53 +0100176HEADER_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
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +0530188TEST_DEPS = ../lib/@LIB_PREFIX@ncurses@DFT_DEP_SUFFIX@
189TEST_ARGS = @LDFLAGS_STATIC@ @TEST_ARGS@ @LDFLAGS_SHARED@
190TEST_LDFLAGS = @LD_MODEL@ $(TEST_ARGS) @LIBS@ @LOCAL_LDFLAGS@ @LDFLAGS@
191
192TEST_PROGS = \
193 captoinfo$x \
194 hardscroll$x \
195 link_test$x \
196 hashmap$x \
197 lib_mvcur$x
198
Steve Kondikae271bc2015-11-15 02:50:53 +0100199base = $(srcdir)/base
200serial = $(srcdir)/tty
201tinfo = $(srcdir)/tinfo
202trace = $(srcdir)/trace
203wide = $(srcdir)/widechar
204win32con = $(srcdir)/win32con
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +0530205
206################################################################################
207all \
208libs :: $(AUTO_SRC) ../lib $(LIBRARIES)
209
210sources: $(AUTO_SRC)
211
212$(DESTDIR)$(bindir) \
213$(DESTDIR)$(libdir) :
Steve Kondikae271bc2015-11-15 02:50:53 +0100214 mkdir -p $@
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +0530215
216../lib : ; mkdir $@
217
218./fallback.c : $(tinfo)/MKfallback.sh
Steve Kondikae271bc2015-11-15 02:50:53 +0100219 $(SHELL) -e $(tinfo)/MKfallback.sh $(TERMINFO) $(TERMINFO_SRC) $(TIC_PATH) $(FALLBACK_LIST) >$@
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +0530220
221./lib_gen.c : $(base)/MKlib_gen.sh ../include/curses.h
Steve Kondikae271bc2015-11-15 02:50:53 +0100222 $(SHELL) -e $(base)/MKlib_gen.sh "$(CPP) $(CPPFLAGS)" "$(AWK)" generated <../include/curses.h >$@
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +0530223
224init_keytry.h: make_keys$(BUILD_EXEEXT) keys.list
225 ./make_keys$(BUILD_EXEEXT) keys.list > $@
226
227keys.list : $(tinfo)/MKkeys_list.sh
Steve Kondikae271bc2015-11-15 02:50:53 +0100228 AWK=$(AWK) $(SHELL) $(tinfo)/MKkeys_list.sh $(TERMINFO_CAPS) | sort >$@
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +0530229
230make_keys$(BUILD_EXEEXT) : \
231 $(tinfo)/make_keys.c \
232 names.c
Steve Kondikae271bc2015-11-15 02:50:53 +0100233 $(BUILD_CC) -o $@ $(BUILD_CPPFLAGS) $(BUILD_CCFLAGS) $(tinfo)/make_keys.c $(BUILD_LDFLAGS) $(BUILD_LIBS)
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +0530234
235make_hash$(BUILD_EXEEXT) : \
Steve Kondikae271bc2015-11-15 02:50:53 +0100236 $(tinfo)/make_hash.c \
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +0530237 ../include/hashsize.h
Steve Kondikae271bc2015-11-15 02:50:53 +0100238 $(BUILD_CC) -o $@ $(BUILD_CPPFLAGS) $(BUILD_CCFLAGS) $(tinfo)/make_hash.c $(BUILD_LDFLAGS) $(BUILD_LIBS)
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +0530239
Steve Kondikae271bc2015-11-15 02:50:53 +0100240./expanded.c : $(srcdir)/curses.priv.h $(serial)/MKexpanded.sh
241 $(SHELL) -e $(serial)/MKexpanded.sh "$(CPP)" $(CPPFLAGS) > $@
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +0530242
243./comp_captab.c: \
244 make_hash$(BUILD_EXEEXT) \
245 ../include/hashsize.h \
246 $(tinfo)/MKcaptab.sh \
247 $(tinfo)/MKcaptab.awk
Steve Kondikae271bc2015-11-15 02:50:53 +0100248 $(SHELL) -e $(tinfo)/MKcaptab.sh $(AWK) $(USE_BIG_STRINGS) $(tinfo)/MKcaptab.awk $(srcdir)/../include/@TERMINFO_CAPS@ > $@
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +0530249
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
262tags:
Steve Kondikae271bc2015-11-15 02:50:53 +0100263 $(CTAGS) *.[ch] */*.[ch]
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +0530264
265@MAKE_UPPER_TAGS@TAGS:
Steve Kondikae271bc2015-11-15 02:50:53 +0100266@MAKE_UPPER_TAGS@ $(ETAGS) *.[ch] */*.[ch]
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +0530267
268mostlyclean ::
269 -rm -f core tags TAGS *~ *.bak *.i *.ln *.atac trace
270 -rm -f $(TEST_PROGS)
271
272clean :: mostlyclean
273 -rm -f $(AUTO_SRC)
274 -rm -f make_keys$(BUILD_EXEEXT)
275 -rm -f make_hash$(BUILD_EXEEXT)
Steve Kondikae271bc2015-11-15 02:50:53 +0100276 -rm -rf .libs *.dSYM *.map
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +0530277
278distclean :: clean
279 -rm -f Makefile
280
281realclean :: 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
290test_progs : $(TEST_PROGS)
291
292./link_test.c : $(base)/MKlib_gen.sh ../include/curses.h
Steve Kondikae271bc2015-11-15 02:50:53 +0100293 $(SHELL) -e $(base)/MKlib_gen.sh "$(CPP) $(CPPFLAGS)" "$(AWK)" implemented <../include/curses.h >$@
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +0530294
295captoinfo$x : $(tinfo)/captoinfo.c $(TEST_DEPS)
Steve Kondikae271bc2015-11-15 02:50:53 +0100296 @ECHO_LD@ $(LIBTOOL_LINK) -o $@ $(CFLAGS_DEFAULT) -DMAIN $(tinfo)/captoinfo.c $(TEST_LDFLAGS)
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +0530297
298hardscroll$x : $(serial)/hardscroll.c $(TEST_DEPS)
Steve Kondikae271bc2015-11-15 02:50:53 +0100299 @ECHO_LD@ $(LIBTOOL_LINK) -o $@ $(CFLAGS_DEFAULT) -DSCROLLDEBUG $(serial)/hardscroll.c $(TEST_LDFLAGS)
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +0530300
301hashmap$x : $(serial)/hashmap.c $(serial)/hardscroll.c $(TEST_DEPS)
Steve Kondikae271bc2015-11-15 02:50:53 +0100302 @ECHO_LD@ $(LIBTOOL_LINK) -o $@ $(CFLAGS_DEFAULT) -DHASHDEBUG $(serial)/hashmap.c $(serial)/hardscroll.c $(TEST_LDFLAGS)
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +0530303
304lib_mvcur$x : $(serial)/lib_mvcur.c $(TEST_DEPS) \
305 ../@DFT_OBJ_SUBDIR@/dump_entry$o
Steve Kondikae271bc2015-11-15 02:50:53 +0100306 @ECHO_LD@ $(LIBTOOL_LINK) -o $@ $(CFLAGS_DEFAULT) -DNCURSES_TEST -I$(serial)/../../progs $(serial)/lib_mvcur.c ../@DFT_OBJ_SUBDIR@/dump_entry$o $(TEST_LDFLAGS)
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +0530307
308link_test$x : ./link_test.c $(TEST_DEPS) \
309 ../@DFT_OBJ_SUBDIR@/link_test$o
Steve Kondikae271bc2015-11-15 02:50:53 +0100310 @ECHO_LD@ $(CC) -o $@ $(CFLAGS_DEFAULT) ../@DFT_OBJ_SUBDIR@/link_test$o $(TEST_LDFLAGS)
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +0530311
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###############################################################################