1# $Id: Makefile.in,v 1.130 2021/12/18 23:00:28 tom Exp $ 2############################################################################## 3# Copyright 2020,2021 Thomas E. Dickey # 4# Copyright 1998-2017,2018 Free Software Foundation, Inc. # 5# # 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 47PACKAGE = @PACKAGE@ 48 49MODEL = ../@DFT_OBJ_SUBDIR@ 50top_srcdir = @top_srcdir@ 51srcdir = @srcdir@ 52prefix = @prefix@ 53exec_prefix = @exec_prefix@ 54datarootdir = @datarootdir@ 55 56bindir = @bindir@ 57libexecdir = @libexecdir@ 58libdir = @libdir@ 59datarootdir = @datarootdir@ 60datadir = @datadir@ 61 62real_bindir = $(libexecdir)/$(PACKAGE) 63 64BINDIR = $(DESTDIR)$(bindir) 65LIBEXECDIR = $(DESTDIR)$(libexecdir) 66LIBDIR = $(DESTDIR)$(libdir) 67DATADIR = $(DESTDIR)$(datadir) 68 69REAL_BINDIR = $(LIBEXECDIR)/$(PACKAGE) 70 71LIBTOOL = @LIBTOOL@ 72LIBTOOL_OPTS = @LIBTOOL_OPTS@ 73LIBTOOL_CLEAN = @LIB_CLEAN@ 74LIBTOOL_COMPILE = @LIB_COMPILE@ 75LIBTOOL_LINK = @LIB_LINK@ 76 77INSTALL = @INSTALL@ @INSTALL_OPT_O@ 78INSTALL_PROG = @INSTALL_PROGRAM@ @INSTALL_OPT_S@ 79INSTALL_SCRIPT = @INSTALL_SCRIPT@ 80INSTALL_DATA = @INSTALL_DATA@ 81transform = @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@ 91CPPFLAGS = -I. -I$(srcdir) -I../test -DHAVE_CONFIG_H -DDATA_DIR=\"$(datadir)\" @CPPFLAGS@ 92 93CCFLAGS = $(CPPFLAGS) $(CFLAGS) 94 95CFLAGS_LIBTOOL = $(CCFLAGS) 96CFLAGS_NORMAL = $(CCFLAGS) -DNCURSES_STATIC 97CFLAGS_DEBUG = $(CCFLAGS) -DNCURSES_STATIC @CC_G_OPT@ -DTRACE 98CFLAGS_PROFILE = $(CCFLAGS) -DNCURSES_STATIC -pg 99CFLAGS_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 124LIBS_DEFAULT = $(TEST_ARGS) @LIBS@ $(TEST_LIBS) 125LDFLAGS_DEFAULT = $(LDFLAGS_@DFT_UPR_MODEL@) $(LIBS_DEFAULT) 126 127# use these for linking with the (n)curses library and possibly pthreads 128LIBS_THREADS = `echo "$(TEST_ARGS) @LIBS@" | sed -e 's/-l@FORM_NAME@.*-l@PANEL_NAME@[^ ]*//'` $(TEST_LIBS) @PTHREAD@ 129LDFLAGS_THREADS = $(LDFLAGS_@DFT_UPR_MODEL@) $(LIBS_THREADS) 130 131# use these for linking with the (n)curses library 132LIBS_CURSES = `echo "$(TEST_ARGS) @LIBS@" | sed -e 's/-l@FORM_NAME@.*-l@PANEL_NAME@[^ ]*//'` $(TEST_LIBS) 133LDFLAGS_CURSES = $(LDFLAGS_@DFT_UPR_MODEL@) $(LIBS_CURSES) 134 135# use these when we need the math library 136LDFLAGS_CURSES_M= $(LDFLAGS_CURSES) $(MATH_LIB) 137 138# use these for linking with the tinfo library if we have it, or curses library if not 139LIBS_TINFO = @LDFLAGS_STATIC@ @TINFO_LIBS@ @LDFLAGS_SHARED@ @LIBS@ $(TEST_LIBS) 140LDFLAGS_TINFO = @TINFO_LDFLAGS@ $(LDFLAGS_@DFT_UPR_MODEL@) $(LIBS_TINFO) 141 142LINT = @LINT@ 143LINT_OPTS = @LINT_OPTS@ 144LINT_LIBS = -lform -lmenu -lpanel -lncurses @LIBS@ 145 146INCDIR = $(top_srcdir)/include 147incdir = ../include 148 149HEADER_DEPS = \ 150 $(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.* 176 177# The rest is generated from the "programs" and "modules" files... 178