blob: ae198df675a4b5e8b87db3ccf1d17cbadb7f35e6 [file] [log] [blame]
micky3879b9f5e72025-07-08 18:04:53 -04001# $Id: Makefile.in,v 1.184 2024/01/19 12:00:00 tom Exp $
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +05302##############################################################################
micky3879b9f5e72025-07-08 18:04:53 -04003# Copyright 2018-2022,2024 Thomas E. Dickey #
4# Copyright 1998-2017,2018 Free Software Foundation, Inc. #
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +05305# #
6# Permission is hereby granted, free of charge, to any person obtaining a #
7# copy of this software and associated documentation files (the "Software"), #
8# to deal in the Software without restriction, including without limitation #
9# the rights to use, copy, modify, merge, publish, distribute, distribute #
10# with modifications, sublicense, and/or sell copies of the Software, and to #
11# permit persons to whom the Software is furnished to do so, subject to the #
12# following conditions: #
13# #
14# The above copyright notice and this permission notice shall be included in #
15# all copies or substantial portions of the Software. #
16# #
17# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR #
18# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, #
19# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL #
20# THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER #
21# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING #
22# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER #
23# DEALINGS IN THE SOFTWARE. #
24# #
25# Except as contained in this notice, the name(s) of the above copyright #
26# holders shall not be used in advertising or otherwise to promote the sale, #
27# use or other dealings in this Software without prior written #
28# authorization. #
29##############################################################################
30#
31# Author: Thomas E. Dickey 1996-on
32#
33# Makefile for ncurses source code.
34#
35# This makes the following:
36# programs
37# includes
38# libraries (normal/debug/profile/shared)
39#
40# The variable 'srcdir' refers to the source-distribution, and can be set with
41# the configure script by "--srcdir=DIR".
42#
43# The rules are organized to produce the libraries for the configured models,
44# and the programs with the configured default model.
45
46# turn off _all_ suffix rules; we'll generate our own
47.SUFFIXES:
48
Steve Kondikae271bc2015-11-15 02:50:53 +010049SHELL = @SHELL@
50VPATH = @srcdir@
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053051THIS = Makefile
52
micky3879b9f5e72025-07-08 18:04:53 -040053TOP_MFLAGS = @cf_cv_makeflags@ DESTDIR="$(DESTDIR)" RPATH_LIST="$(RPATH_LIST)"
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053054@SET_MAKE@
55
56x = @EXEEXT@
57o = .@OBJEXT@
58
59MODEL = @DFT_LWR_MODEL@
60DESTDIR = @DESTDIR@
61top_srcdir = @top_srcdir@
62srcdir = @srcdir@
63prefix = @prefix@
64exec_prefix = @exec_prefix@
65bindir = @bindir@
66libdir = @libdir@
67includedir = @includedir@
Steve Kondikae271bc2015-11-15 02:50:53 +010068datarootdir = @datarootdir@
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053069datadir = @datadir@
Steve Kondikae271bc2015-11-15 02:50:53 +010070includesubdir = @includesubdir@
71
72INCLUDEDIR = $(DESTDIR)$(includedir)$(includesubdir)
73
74PACKAGE = @PACKAGE@
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053075
76LIBTOOL = @LIBTOOL@
Steve Kondikae271bc2015-11-15 02:50:53 +010077LIBTOOL_OPTS = @LIBTOOL_OPTS@ @EXPORT_SYMS@
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053078LIBTOOL_CLEAN = @LIB_CLEAN@
79LIBTOOL_COMPILE = @LIB_COMPILE@
80LIBTOOL_LINK = @LIB_LINK@
81LIBTOOL_INSTALL = @LIB_INSTALL@
82LIBTOOL_UNINSTALL = @LIB_UNINSTALL@
Steve Kondikae271bc2015-11-15 02:50:53 +010083LT_UNDEF = @LT_UNDEF@
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053084
85INSTALL = @INSTALL@
86INSTALL_LIB = @INSTALL@ @INSTALL_LIB@
micky3879b9f5e72025-07-08 18:04:53 -040087INSTALL_PROG = @INSTALL_PROGRAM@ @INSTALL_OPT_S@
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053088INSTALL_DATA = @INSTALL_DATA@
89
90AR = @AR@
Steve Kondikae271bc2015-11-15 02:50:53 +010091ARFLAGS = @ARFLAGS@
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053092AWK = @AWK@
93LD = @LD@
94LN_S = @LN_S@
Steve Kondikae271bc2015-11-15 02:50:53 +010095NM = @NM@
96
97CTAGS = @CTAGS@
98ETAGS = @ETAGS@
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053099
100CC = @CC@
101CPP = @CPP@
micky3879b9f5e72025-07-08 18:04:53 -0400102CFLAGS = @CFLAGS@ @EXTRA_CFLAGS@
103LIBS = @LIBS@
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +0530104
105INCDIR = $(srcdir)/../include
micky3879b9f5e72025-07-08 18:04:53 -0400106CPPFLAGS = -DHAVE_CONFIG_H -DBUILDING_NCURSES -I../ncurses @CPPFLAGS@
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +0530107
108CCFLAGS = $(CPPFLAGS) $(CFLAGS)
109
micky3879b9f5e72025-07-08 18:04:53 -0400110BUILD_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 +0530111BUILD_CC = @BUILD_CC@
Steve Kondikae271bc2015-11-15 02:50:53 +0100112BUILD_CCFLAGS = @BUILD_CFLAGS@
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +0530113BUILD_LDFLAGS = @BUILD_LDFLAGS@
114BUILD_LIBS = @BUILD_LIBS@
115
116# The executables built in this directory are used for generating source that
117# is compiled into the build, or are test-programs that are not installed.
118
119BUILD_EXEEXT = @BUILD_EXEEXT@
Steve Kondikae271bc2015-11-15 02:50:53 +0100120x = @EXEEXT@
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +0530121
122CFLAGS_LIBTOOL = $(CCFLAGS)
micky3879b9f5e72025-07-08 18:04:53 -0400123CFLAGS_NORMAL = $(CCFLAGS) -DNCURSES_STATIC
124CFLAGS_DEBUG = $(CCFLAGS) -DNCURSES_STATIC @CC_G_OPT@ -DTRACE
125CFLAGS_PROFILE = $(CCFLAGS) -DNCURSES_STATIC -pg
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +0530126CFLAGS_SHARED = $(CCFLAGS) @CC_SHARED_OPTS@
127
128CFLAGS_DEFAULT = $(CFLAGS_@DFT_UPR_MODEL@)
129
130LINK = $(LIBTOOL)
micky3879b9f5e72025-07-08 18:04:53 -0400131LDFLAGS = @LDFLAGS@ @LD_MODEL@
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +0530132
133SHLIB_DIRS = -L../lib
micky3879b9f5e72025-07-08 18:04:53 -0400134SHLIB_LIST = $(SHLIB_DIRS) @SHLIB_LIST@ @LIBS@
135TINFO_LIST = $(SHLIB_DIRS) @TINFO_LIST@ @LIBS@
136TICS_LIST = $(SHLIB_DIRS) @TICS_LIST@ @LIBS@
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +0530137
Steve Kondikae271bc2015-11-15 02:50:53 +0100138RPATH_LIST = @RPATH_LIST@
139RESULTING_SYMS = @RESULTING_SYMS@
140VERSIONED_SYMS = @VERSIONED_SYMS@
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +0530141MK_SHARED_LIB = @MK_SHARED_LIB@
142
143NCURSES_MAJOR = @NCURSES_MAJOR@
144NCURSES_MINOR = @NCURSES_MINOR@
145REL_VERSION = @cf_cv_rel_version@
146ABI_VERSION = @cf_cv_abi_version@
147
148RANLIB = @LIB_PREP@
149
Steve Kondikae271bc2015-11-15 02:50:53 +0100150LIBRARIES = @Libs_To_Make@
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +0530151
152LINT = @LINT@
153LINT_OPTS = @LINT_OPTS@
154LINT_LIBS = -lncurses @LIBS@
155
156FALLBACK_LIST = @FALLBACK_LIST@
157
158USE_BIG_STRINGS = @USE_BIG_STRINGS@
159TERMINFO_CAPS = $(top_srcdir)/include/@TERMINFO_CAPS@
micky3879b9f5e72025-07-08 18:04:53 -0400160CAPLIST = $(TERMINFO_CAPS) $(top_srcdir)/include/Caps-ncurses
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +0530161
Steve Kondikae271bc2015-11-15 02:50:53 +0100162TERMINFO = @TERMINFO@
163TERMINFO_SRC = @TERMINFO_SRC@
micky3879b9f5e72025-07-08 18:04:53 -0400164TIC_PATH = @TIC@
165INFOCMP_PATH = @INFOCMP@
Steve Kondikae271bc2015-11-15 02:50:53 +0100166
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +0530167AUTO_SRC = \
168 ./codes.c \
169 ./comp_captab.c \
micky3879b9f5e72025-07-08 18:04:53 -0400170 ./comp_userdefs.c \
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +0530171 ./expanded.c \
172 ./fallback.c \
173 ./lib_gen.c \
174 ./lib_keyname.c \
175 ./link_test.c \
176 ./names.c \
177 ./unctrl.c \
178 init_keytry.h \
179 keys.list
180
micky3879b9f5e72025-07-08 18:04:53 -0400181HEADER_DEPS = @INTERNALS_HDR@ \
Steve Kondikae271bc2015-11-15 02:50:53 +0100182 ../include/ncurses_cfg.h \
micky3879b9f5e72025-07-08 18:04:53 -0400183 ../include/ncurses_def.h \
184 ../include/ncurses_dll.h \
Steve Kondikae271bc2015-11-15 02:50:53 +0100185 ../include/curses.h \
Steve Kondikae271bc2015-11-15 02:50:53 +0100186 ../include/term.h \
micky3879b9f5e72025-07-08 18:04:53 -0400187 ../include/unctrl.h \
Steve Kondikae271bc2015-11-15 02:50:53 +0100188 $(INCDIR)/nc_alloc.h \
micky3879b9f5e72025-07-08 18:04:53 -0400189 $(INCDIR)/nc_panel.h \
190 $(INCDIR)/nc_string.h \
191 $(INCDIR)/nc_termios.h \
192 $(INCDIR)/nc_tparm.h \
193 $(INCDIR)/nc_win32.h \
194 $(INCDIR)/term_entry.h \
195 $(srcdir)/curses.priv.h \
196 $(srcdir)/new_pair.h \
197 $(srcdir)/term.priv.h
Steve Kondikae271bc2015-11-15 02:50:53 +0100198
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +0530199TEST_DEPS = ../lib/@LIB_PREFIX@ncurses@DFT_DEP_SUFFIX@
micky3879b9f5e72025-07-08 18:04:53 -0400200TEST_ARGS = @LDFLAGS_STATIC@ @TEST_ARGS@ @LDFLAGS_SHARED@
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +0530201TEST_LDFLAGS = @LD_MODEL@ $(TEST_ARGS) @LIBS@ @LOCAL_LDFLAGS@ @LDFLAGS@
202
203TEST_PROGS = \
204 captoinfo$x \
205 hardscroll$x \
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +0530206 hashmap$x \
micky3879b9f5e72025-07-08 18:04:53 -0400207 lib_mvcur$x \
208 link_test$x \
209 report_hashing$x
210
211LOCAL_LIBDIR = @top_builddir@/lib
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +0530212
Steve Kondikae271bc2015-11-15 02:50:53 +0100213base = $(srcdir)/base
214serial = $(srcdir)/tty
215tinfo = $(srcdir)/tinfo
216trace = $(srcdir)/trace
217wide = $(srcdir)/widechar
218win32con = $(srcdir)/win32con
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +0530219
220################################################################################
micky3879b9f5e72025-07-08 18:04:53 -0400221
222@MAKE_PHONY@.PHONY : all
223@MAKE_PHONY@.PHONY : check
224@MAKE_PHONY@.PHONY : clean
225@MAKE_PHONY@.PHONY : distclean
226@MAKE_PHONY@.PHONY : libs
227@MAKE_PHONY@.PHONY : mostlyclean
228@MAKE_PHONY@.PHONY : realclean
229@MAKE_PHONY@.PHONY : sources
230@MAKE_PHONY@.PHONY : test_progs
231
232all libs :: $(AUTO_SRC) ../lib $(LIBRARIES)
233
234@CHECK_BUILD@all libs :: report_offsets$(BUILD_EXEEXT)
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +0530235
236sources: $(AUTO_SRC)
237
238$(DESTDIR)$(bindir) \
239$(DESTDIR)$(libdir) :
Steve Kondikae271bc2015-11-15 02:50:53 +0100240 mkdir -p $@
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +0530241
242../lib : ; mkdir $@
243
244./fallback.c : $(tinfo)/MKfallback.sh
micky3879b9f5e72025-07-08 18:04:53 -0400245 $(SHELL) -e $(tinfo)/MKfallback.sh $(TERMINFO) $(TERMINFO_SRC) "$(TIC_PATH)" "$(INFOCMP_PATH)" $(FALLBACK_LIST) >$@
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +0530246
247./lib_gen.c : $(base)/MKlib_gen.sh ../include/curses.h
micky3879b9f5e72025-07-08 18:04:53 -0400248 FGREP="@FGREP@" $(SHELL) -e $(base)/MKlib_gen.sh "$(CPP) $(CPPFLAGS)" "$(AWK)" generated <../include/curses.h >$@
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +0530249
micky3879b9f5e72025-07-08 18:04:53 -0400250init_keytry.h : make_keys$(BUILD_EXEEXT) keys.list
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +0530251 ./make_keys$(BUILD_EXEEXT) keys.list > $@
252
253keys.list : $(tinfo)/MKkeys_list.sh
micky3879b9f5e72025-07-08 18:04:53 -0400254 AWK=$(AWK) USE_SIGWINCH=@cf_cv_enable_sigwinch@ $(SHELL) $(tinfo)/MKkeys_list.sh $(CAPLIST) | LC_ALL=C sort >$@
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +0530255
256make_keys$(BUILD_EXEEXT) : \
micky3879b9f5e72025-07-08 18:04:53 -0400257 build.priv.h \
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +0530258 $(tinfo)/make_keys.c \
micky3879b9f5e72025-07-08 18:04:53 -0400259 ./names.c
Steve Kondikae271bc2015-11-15 02:50:53 +0100260 $(BUILD_CC) -o $@ $(BUILD_CPPFLAGS) $(BUILD_CCFLAGS) $(tinfo)/make_keys.c $(BUILD_LDFLAGS) $(BUILD_LIBS)
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +0530261
262make_hash$(BUILD_EXEEXT) : \
micky3879b9f5e72025-07-08 18:04:53 -0400263 build.priv.h \
Steve Kondikae271bc2015-11-15 02:50:53 +0100264 $(tinfo)/make_hash.c \
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +0530265 ../include/hashsize.h
Steve Kondikae271bc2015-11-15 02:50:53 +0100266 $(BUILD_CC) -o $@ $(BUILD_CPPFLAGS) $(BUILD_CCFLAGS) $(tinfo)/make_hash.c $(BUILD_LDFLAGS) $(BUILD_LIBS)
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +0530267
micky3879b9f5e72025-07-08 18:04:53 -0400268report_offsets$(BUILD_EXEEXT) : \
269 $(srcdir)/curses.priv.h \
270 $(srcdir)/report_offsets.c
271 $(BUILD_CC) -o $@ $(BUILD_CPPFLAGS) $(BUILD_CCFLAGS) $(srcdir)/report_offsets.c $(BUILD_LDFLAGS) $(BUILD_LIBS)
272 ./report_offsets$(BUILD_EXEEXT)
273
Steve Kondikae271bc2015-11-15 02:50:53 +0100274./expanded.c : $(srcdir)/curses.priv.h $(serial)/MKexpanded.sh
275 $(SHELL) -e $(serial)/MKexpanded.sh "$(CPP)" $(CPPFLAGS) > $@
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +0530276
277./comp_captab.c: \
278 make_hash$(BUILD_EXEEXT) \
279 ../include/hashsize.h \
280 $(tinfo)/MKcaptab.sh \
281 $(tinfo)/MKcaptab.awk
micky3879b9f5e72025-07-08 18:04:53 -0400282 $(SHELL) -e $(tinfo)/MKcaptab.sh $(AWK) $(USE_BIG_STRINGS) $(tinfo)/MKcaptab.awk $(CAPLIST) > $@
283
284./comp_userdefs.c: \
285 make_hash$(BUILD_EXEEXT) \
286 ../include/hashsize.h \
287 $(tinfo)/MKuserdefs.sh
288 $(SHELL) -e $(tinfo)/MKuserdefs.sh $(AWK) $(USE_BIG_STRINGS) $(CAPLIST) > $@
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +0530289
290./lib_keyname.c: keys.list $(base)/MKkeyname.awk
micky3879b9f5e72025-07-08 18:04:53 -0400291 $(AWK) -f $(base)/MKkeyname.awk use_sigwinch=@cf_cv_enable_sigwinch@ bigstrings=$(USE_BIG_STRINGS) keys.list > $@
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +0530292
293./codes.c: $(tinfo)/MKcodes.awk
micky3879b9f5e72025-07-08 18:04:53 -0400294 $(AWK) -f $(tinfo)/MKcodes.awk bigstrings=$(USE_BIG_STRINGS) $(CAPLIST) >$@
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +0530295
296./names.c: $(tinfo)/MKnames.awk
micky3879b9f5e72025-07-08 18:04:53 -0400297 $(AWK) -f $(tinfo)/MKnames.awk bigstrings=$(USE_BIG_STRINGS) $(CAPLIST) >$@
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +0530298
299./unctrl.c: $(base)/MKunctrl.awk
300 echo | $(AWK) -f $(base)/MKunctrl.awk bigstrings=$(USE_BIG_STRINGS) >$@
301
302tags:
Steve Kondikae271bc2015-11-15 02:50:53 +0100303 $(CTAGS) *.[ch] */*.[ch]
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +0530304
305@MAKE_UPPER_TAGS@TAGS:
Steve Kondikae271bc2015-11-15 02:50:53 +0100306@MAKE_UPPER_TAGS@ $(ETAGS) *.[ch] */*.[ch]
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +0530307
308mostlyclean ::
micky3879b9f5e72025-07-08 18:04:53 -0400309 -rm -f core tags TAGS *~ *.bak *.i *.ln *.atac
310 -test -d trace || rm -f trace
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +0530311 -rm -f $(TEST_PROGS)
312
313clean :: mostlyclean
314 -rm -f $(AUTO_SRC)
315 -rm -f make_keys$(BUILD_EXEEXT)
316 -rm -f make_hash$(BUILD_EXEEXT)
micky3879b9f5e72025-07-08 18:04:53 -0400317 -rm -f report_offsets$(BUILD_EXEEXT)
Steve Kondikae271bc2015-11-15 02:50:53 +0100318 -rm -rf .libs *.dSYM *.map
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +0530319
320distclean :: clean
321 -rm -f Makefile
322
323realclean :: distclean
324
325# These rules are used to allow "make -n" to work on a clean directory-tree
326../include/hashsize.h \
327../include/parametrized.h \
328../include/term.h :
micky3879b9f5e72025-07-08 18:04:53 -0400329 ( cd ../include && $(MAKE) $(TOP_MFLAGS) )
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +0530330
331# These rules build test-programs for the modules that have test-drivers
micky3879b9f5e72025-07-08 18:04:53 -0400332@MAKE_PHONY@.PHONY : test_progs
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +0530333test_progs : $(TEST_PROGS)
334
335./link_test.c : $(base)/MKlib_gen.sh ../include/curses.h
micky3879b9f5e72025-07-08 18:04:53 -0400336 FGREP="@FGREP@" $(SHELL) -e $(base)/MKlib_gen.sh "$(CPP) $(CPPFLAGS)" "$(AWK)" implemented <../include/curses.h >$@
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +0530337
338captoinfo$x : $(tinfo)/captoinfo.c $(TEST_DEPS)
Steve Kondikae271bc2015-11-15 02:50:53 +0100339 @ECHO_LD@ $(LIBTOOL_LINK) -o $@ $(CFLAGS_DEFAULT) -DMAIN $(tinfo)/captoinfo.c $(TEST_LDFLAGS)
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +0530340
341hardscroll$x : $(serial)/hardscroll.c $(TEST_DEPS)
Steve Kondikae271bc2015-11-15 02:50:53 +0100342 @ECHO_LD@ $(LIBTOOL_LINK) -o $@ $(CFLAGS_DEFAULT) -DSCROLLDEBUG $(serial)/hardscroll.c $(TEST_LDFLAGS)
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +0530343
344hashmap$x : $(serial)/hashmap.c $(serial)/hardscroll.c $(TEST_DEPS)
Steve Kondikae271bc2015-11-15 02:50:53 +0100345 @ECHO_LD@ $(LIBTOOL_LINK) -o $@ $(CFLAGS_DEFAULT) -DHASHDEBUG $(serial)/hashmap.c $(serial)/hardscroll.c $(TEST_LDFLAGS)
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +0530346
347lib_mvcur$x : $(serial)/lib_mvcur.c $(TEST_DEPS) \
348 ../@DFT_OBJ_SUBDIR@/dump_entry$o
Steve Kondikae271bc2015-11-15 02:50:53 +0100349 @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 +0530350
351link_test$x : ./link_test.c $(TEST_DEPS) \
352 ../@DFT_OBJ_SUBDIR@/link_test$o
Steve Kondikae271bc2015-11-15 02:50:53 +0100353 @ECHO_LD@ $(CC) -o $@ $(CFLAGS_DEFAULT) ../@DFT_OBJ_SUBDIR@/link_test$o $(TEST_LDFLAGS)
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +0530354
355../@DFT_OBJ_SUBDIR@/dump_entry$o:
micky3879b9f5e72025-07-08 18:04:53 -0400356 ( cd ../progs && $(MAKE) ../@DFT_OBJ_SUBDIR@/dump_entry$o )
357
358report_hashing$x : \
359 $(srcdir)/curses.priv.h \
360 $(srcdir)/report_hashing.c $(TEST_DEPS)
361 @ECHO_LD@ $(CC) -o $@ $(CFLAGS_DEFAULT) report_hashing.c $(TEST_LDFLAGS)
362
363# Verify that each header-file can be compiled without including another.
364@MAKE_PHONY@.PHONY : check_headers
365check_headers:
366 @$(SHELL) -c "for header in *.h;\
367 do \
368 echo \"** testing \$${header}\" ; \
369 echo \"#include <\$${header}>\" >headers.c; \
370 echo \"int main(void) { return 0; }\" >>headers.c; \
371 $(CC) -c $(CFLAGS) $(CPPFLAGS) headers.c; \
372 done"
373 -@rm -f headers.*
374
375@MAKE_PHONY@.PHONY : check_objects
376check_objects: test_progs
377
378check :: check_headers check_objects
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +0530379
380###############################################################################
381# The remainder of this file is automatically generated during configuration
382###############################################################################