blob: 1d546285a98b465bc0091d76a341064e574a0169 [file] [log] [blame]
micky3879b9f5e72025-07-08 18:04:53 -04001# $Id: Makefile.in,v 1.130 2021/12/18 23:00:28 tom Exp $
Steve Kondikae271bc2015-11-15 02:50:53 +01002##############################################################################
micky3879b9f5e72025-07-08 18:04:53 -04003# Copyright 2020,2021 Thomas E. Dickey #
4# Copyright 1998-2017,2018 Free Software Foundation, Inc. #
Steve Kondikae271bc2015-11-15 02:50:53 +01005# #
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 tests.
34
35# turn off _all_ suffix rules; we'll generate our own
36.SUFFIXES:
37
38SHELL = @SHELL@
39VPATH = @srcdir@
40
41@SET_MAKE@
42
43destdir =
44x = @EXEEXT@
45o = .@OBJEXT@
46
micky3879b9f5e72025-07-08 18:04:53 -040047PACKAGE = @PACKAGE@
48
Steve Kondikae271bc2015-11-15 02:50:53 +010049MODEL = ../@DFT_OBJ_SUBDIR@
50top_srcdir = @top_srcdir@
51srcdir = @srcdir@
52prefix = @prefix@
53exec_prefix = @exec_prefix@
54datarootdir = @datarootdir@
55
56bindir = @bindir@
micky3879b9f5e72025-07-08 18:04:53 -040057libexecdir = @libexecdir@
Steve Kondikae271bc2015-11-15 02:50:53 +010058libdir = @libdir@
micky3879b9f5e72025-07-08 18:04:53 -040059datarootdir = @datarootdir@
60datadir = @datadir@
61
62real_bindir = $(libexecdir)/$(PACKAGE)
Steve Kondikae271bc2015-11-15 02:50:53 +010063
64BINDIR = $(DESTDIR)$(bindir)
micky3879b9f5e72025-07-08 18:04:53 -040065LIBEXECDIR = $(DESTDIR)$(libexecdir)
Steve Kondikae271bc2015-11-15 02:50:53 +010066LIBDIR = $(DESTDIR)$(libdir)
micky3879b9f5e72025-07-08 18:04:53 -040067DATADIR = $(DESTDIR)$(datadir)
Steve Kondikae271bc2015-11-15 02:50:53 +010068
micky3879b9f5e72025-07-08 18:04:53 -040069REAL_BINDIR = $(LIBEXECDIR)/$(PACKAGE)
Steve Kondikae271bc2015-11-15 02:50:53 +010070
71LIBTOOL = @LIBTOOL@
72LIBTOOL_OPTS = @LIBTOOL_OPTS@
73LIBTOOL_CLEAN = @LIB_CLEAN@
74LIBTOOL_COMPILE = @LIB_COMPILE@
75LIBTOOL_LINK = @LIB_LINK@
76
micky3879b9f5e72025-07-08 18:04:53 -040077INSTALL = @INSTALL@ @INSTALL_OPT_O@
78INSTALL_PROG = @INSTALL_PROGRAM@ @INSTALL_OPT_S@
79INSTALL_SCRIPT = @INSTALL_SCRIPT@
80INSTALL_DATA = @INSTALL_DATA@
Steve Kondikae271bc2015-11-15 02:50:53 +010081transform = @program_transform_name@
82TRANSFORM = sed 's/$x$$//'|sed '$(transform)'|sed 's/$$/$x/'
83
84CTAGS = @CTAGS@
85ETAGS = @ETAGS@
86
87CC = @CC@
88CPP = @CPP@
89
90CFLAGS = @CFLAGS@ @EXTRA_CFLAGS@
micky3879b9f5e72025-07-08 18:04:53 -040091CPPFLAGS = -I. -I$(srcdir) -I../test -DHAVE_CONFIG_H -DDATA_DIR=\"$(datadir)\" @CPPFLAGS@
Steve Kondikae271bc2015-11-15 02:50:53 +010092
93CCFLAGS = $(CPPFLAGS) $(CFLAGS)
94
95CFLAGS_LIBTOOL = $(CCFLAGS)
micky3879b9f5e72025-07-08 18:04:53 -040096CFLAGS_NORMAL = $(CCFLAGS) -DNCURSES_STATIC
97CFLAGS_DEBUG = $(CCFLAGS) -DNCURSES_STATIC @CC_G_OPT@ -DTRACE
98CFLAGS_PROFILE = $(CCFLAGS) -DNCURSES_STATIC -pg
Steve Kondikae271bc2015-11-15 02:50:53 +010099CFLAGS_SHARED = $(CCFLAGS) @CC_SHARED_OPTS@
100
101CFLAGS_DEFAULT = $(CFLAGS_@DFT_UPR_MODEL@)
102
103REL_VERSION = @cf_cv_rel_version@
104ABI_VERSION = @cf_cv_abi_version@
105LOCAL_LIBDIR = @top_builddir@/lib
106LOCAL_LIBS = @TEST_DEPS@
107MATH_LIB = @MATH_LIB@
108TEST_LIBS = @TEST_LIBS@
109
110LD = @LD@
111LINK = @LINK_TESTS@ $(LIBTOOL_LINK) $(CFLAGS)
112
113LDFLAGS = @LD_MODEL@ @LOCAL_LDFLAGS@ @LDFLAGS@
114
115LDFLAGS_LIBTOOL = $(LDFLAGS) $(CFLAGS_LIBTOOL)
116LDFLAGS_NORMAL = $(LDFLAGS) $(CFLAGS_NORMAL)
117LDFLAGS_DEBUG = $(LDFLAGS) $(CFLAGS_DEBUG)
118LDFLAGS_PROFILE = $(LDFLAGS) $(CFLAGS_PROFILE)
119LDFLAGS_SHARED = $(LDFLAGS) $(CFLAGS_SHARED) @LD_SHARED_OPTS@
120
121TEST_ARGS = @LDFLAGS_STATIC@ @TEST_ARGS@ @LDFLAGS_SHARED@
122
123# use these for linking with all of the libraries
micky3879b9f5e72025-07-08 18:04:53 -0400124LIBS_DEFAULT = $(TEST_ARGS) @LIBS@ $(TEST_LIBS)
Steve Kondikae271bc2015-11-15 02:50:53 +0100125LDFLAGS_DEFAULT = $(LDFLAGS_@DFT_UPR_MODEL@) $(LIBS_DEFAULT)
126
127# use these for linking with the (n)curses library and possibly pthreads
micky3879b9f5e72025-07-08 18:04:53 -0400128LIBS_THREADS = `echo "$(TEST_ARGS) @LIBS@" | sed -e 's/-l@FORM_NAME@.*-l@PANEL_NAME@[^ ]*//'` $(TEST_LIBS) @PTHREAD@
Steve Kondikae271bc2015-11-15 02:50:53 +0100129LDFLAGS_THREADS = $(LDFLAGS_@DFT_UPR_MODEL@) $(LIBS_THREADS)
130
131# use these for linking with the (n)curses library
micky3879b9f5e72025-07-08 18:04:53 -0400132LIBS_CURSES = `echo "$(TEST_ARGS) @LIBS@" | sed -e 's/-l@FORM_NAME@.*-l@PANEL_NAME@[^ ]*//'` $(TEST_LIBS)
Steve Kondikae271bc2015-11-15 02:50:53 +0100133LDFLAGS_CURSES = $(LDFLAGS_@DFT_UPR_MODEL@) $(LIBS_CURSES)
134
micky3879b9f5e72025-07-08 18:04:53 -0400135# use these when we need the math library
136LDFLAGS_CURSES_M= $(LDFLAGS_CURSES) $(MATH_LIB)
137
Steve Kondikae271bc2015-11-15 02:50:53 +0100138# use these for linking with the tinfo library if we have it, or curses library if not
micky3879b9f5e72025-07-08 18:04:53 -0400139LIBS_TINFO = @LDFLAGS_STATIC@ @TINFO_LIBS@ @LDFLAGS_SHARED@ @LIBS@ $(TEST_LIBS)
Steve Kondikae271bc2015-11-15 02:50:53 +0100140LDFLAGS_TINFO = @TINFO_LDFLAGS@ $(LDFLAGS_@DFT_UPR_MODEL@) $(LIBS_TINFO)
141
142LINT = @LINT@
143LINT_OPTS = @LINT_OPTS@
144LINT_LIBS = -lform -lmenu -lpanel -lncurses @LIBS@
145
micky3879b9f5e72025-07-08 18:04:53 -0400146INCDIR = $(top_srcdir)/include
147incdir = ../include
148
Steve Kondikae271bc2015-11-15 02:50:53 +0100149HEADER_DEPS = \
micky3879b9f5e72025-07-08 18:04:53 -0400150 $(incdir)/curses.h \
151 $(incdir)/term.h \
152 $(incdir)/ncurses_cfg.h \
153 $(incdir)/ncurses_def.h \
154 $(incdir)/ncurses_dll.h \
155 $(incdir)/term.h \
156 $(incdir)/unctrl.h \
157 $(INCDIR)/nc_alloc.h
158
159################################################################################
160
161@MAKE_PHONY@.PHONY : all
162@MAKE_PHONY@.PHONY : check
163
164all::
165
166# Verify that each header-file can be compiled without including another.
167check::
168 @$(SHELL) -c "for header in *.h;\
169 do \
170 echo \"** testing \$${header}\" ; \
171 echo \"#include <\$${header}>\" >headers.c; \
172 echo \"int main(void) { return 0; }\" >>headers.c; \
173 $(CC) -c $(CFLAGS) $(CPPFLAGS) headers.c; \
174 done"
175 -@rm -f headers.*
Steve Kondikae271bc2015-11-15 02:50:53 +0100176
177# The rest is generated from the "programs" and "modules" files...