micky387 | 9b9f5e7 | 2025-07-08 18:04:53 -0400 | [diff] [blame^] | 1 | # $Id: Makefile.in,v 1.184 2024/01/19 12:00:00 tom Exp $ |
Amit Daniel Kachhap | e6a01f5 | 2011-07-20 11:45:59 +0530 | [diff] [blame] | 2 | ############################################################################## |
micky387 | 9b9f5e7 | 2025-07-08 18:04:53 -0400 | [diff] [blame^] | 3 | # Copyright 2018-2022,2024 Thomas E. Dickey # |
| 4 | # Copyright 1998-2017,2018 Free Software Foundation, Inc. # |
Amit Daniel Kachhap | e6a01f5 | 2011-07-20 11:45:59 +0530 | [diff] [blame] | 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 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 Kondik | ae271bc | 2015-11-15 02:50:53 +0100 | [diff] [blame] | 49 | SHELL = @SHELL@ |
| 50 | VPATH = @srcdir@ |
Amit Daniel Kachhap | e6a01f5 | 2011-07-20 11:45:59 +0530 | [diff] [blame] | 51 | THIS = Makefile |
| 52 | |
micky387 | 9b9f5e7 | 2025-07-08 18:04:53 -0400 | [diff] [blame^] | 53 | TOP_MFLAGS = @cf_cv_makeflags@ DESTDIR="$(DESTDIR)" RPATH_LIST="$(RPATH_LIST)" |
Amit Daniel Kachhap | e6a01f5 | 2011-07-20 11:45:59 +0530 | [diff] [blame] | 54 | @SET_MAKE@ |
| 55 | |
| 56 | x = @EXEEXT@ |
| 57 | o = .@OBJEXT@ |
| 58 | |
| 59 | MODEL = @DFT_LWR_MODEL@ |
| 60 | DESTDIR = @DESTDIR@ |
| 61 | top_srcdir = @top_srcdir@ |
| 62 | srcdir = @srcdir@ |
| 63 | prefix = @prefix@ |
| 64 | exec_prefix = @exec_prefix@ |
| 65 | bindir = @bindir@ |
| 66 | libdir = @libdir@ |
| 67 | includedir = @includedir@ |
Steve Kondik | ae271bc | 2015-11-15 02:50:53 +0100 | [diff] [blame] | 68 | datarootdir = @datarootdir@ |
Amit Daniel Kachhap | e6a01f5 | 2011-07-20 11:45:59 +0530 | [diff] [blame] | 69 | datadir = @datadir@ |
Steve Kondik | ae271bc | 2015-11-15 02:50:53 +0100 | [diff] [blame] | 70 | includesubdir = @includesubdir@ |
| 71 | |
| 72 | INCLUDEDIR = $(DESTDIR)$(includedir)$(includesubdir) |
| 73 | |
| 74 | PACKAGE = @PACKAGE@ |
Amit Daniel Kachhap | e6a01f5 | 2011-07-20 11:45:59 +0530 | [diff] [blame] | 75 | |
| 76 | LIBTOOL = @LIBTOOL@ |
Steve Kondik | ae271bc | 2015-11-15 02:50:53 +0100 | [diff] [blame] | 77 | LIBTOOL_OPTS = @LIBTOOL_OPTS@ @EXPORT_SYMS@ |
Amit Daniel Kachhap | e6a01f5 | 2011-07-20 11:45:59 +0530 | [diff] [blame] | 78 | LIBTOOL_CLEAN = @LIB_CLEAN@ |
| 79 | LIBTOOL_COMPILE = @LIB_COMPILE@ |
| 80 | LIBTOOL_LINK = @LIB_LINK@ |
| 81 | LIBTOOL_INSTALL = @LIB_INSTALL@ |
| 82 | LIBTOOL_UNINSTALL = @LIB_UNINSTALL@ |
Steve Kondik | ae271bc | 2015-11-15 02:50:53 +0100 | [diff] [blame] | 83 | LT_UNDEF = @LT_UNDEF@ |
Amit Daniel Kachhap | e6a01f5 | 2011-07-20 11:45:59 +0530 | [diff] [blame] | 84 | |
| 85 | INSTALL = @INSTALL@ |
| 86 | INSTALL_LIB = @INSTALL@ @INSTALL_LIB@ |
micky387 | 9b9f5e7 | 2025-07-08 18:04:53 -0400 | [diff] [blame^] | 87 | INSTALL_PROG = @INSTALL_PROGRAM@ @INSTALL_OPT_S@ |
Amit Daniel Kachhap | e6a01f5 | 2011-07-20 11:45:59 +0530 | [diff] [blame] | 88 | INSTALL_DATA = @INSTALL_DATA@ |
| 89 | |
| 90 | AR = @AR@ |
Steve Kondik | ae271bc | 2015-11-15 02:50:53 +0100 | [diff] [blame] | 91 | ARFLAGS = @ARFLAGS@ |
Amit Daniel Kachhap | e6a01f5 | 2011-07-20 11:45:59 +0530 | [diff] [blame] | 92 | AWK = @AWK@ |
| 93 | LD = @LD@ |
| 94 | LN_S = @LN_S@ |
Steve Kondik | ae271bc | 2015-11-15 02:50:53 +0100 | [diff] [blame] | 95 | NM = @NM@ |
| 96 | |
| 97 | CTAGS = @CTAGS@ |
| 98 | ETAGS = @ETAGS@ |
Amit Daniel Kachhap | e6a01f5 | 2011-07-20 11:45:59 +0530 | [diff] [blame] | 99 | |
| 100 | CC = @CC@ |
| 101 | CPP = @CPP@ |
micky387 | 9b9f5e7 | 2025-07-08 18:04:53 -0400 | [diff] [blame^] | 102 | CFLAGS = @CFLAGS@ @EXTRA_CFLAGS@ |
| 103 | LIBS = @LIBS@ |
Amit Daniel Kachhap | e6a01f5 | 2011-07-20 11:45:59 +0530 | [diff] [blame] | 104 | |
| 105 | INCDIR = $(srcdir)/../include |
micky387 | 9b9f5e7 | 2025-07-08 18:04:53 -0400 | [diff] [blame^] | 106 | CPPFLAGS = -DHAVE_CONFIG_H -DBUILDING_NCURSES -I../ncurses @CPPFLAGS@ |
Amit Daniel Kachhap | e6a01f5 | 2011-07-20 11:45:59 +0530 | [diff] [blame] | 107 | |
| 108 | CCFLAGS = $(CPPFLAGS) $(CFLAGS) |
| 109 | |
micky387 | 9b9f5e7 | 2025-07-08 18:04:53 -0400 | [diff] [blame^] | 110 | BUILD_CPPFLAGS = -DHAVE_CONFIG_H -DUSE_BUILD_CC -I../ncurses -I$(srcdir) -I../include -I$(INCDIR) @BUILD_CPPFLAGS@ |
Amit Daniel Kachhap | e6a01f5 | 2011-07-20 11:45:59 +0530 | [diff] [blame] | 111 | BUILD_CC = @BUILD_CC@ |
Steve Kondik | ae271bc | 2015-11-15 02:50:53 +0100 | [diff] [blame] | 112 | BUILD_CCFLAGS = @BUILD_CFLAGS@ |
Amit Daniel Kachhap | e6a01f5 | 2011-07-20 11:45:59 +0530 | [diff] [blame] | 113 | BUILD_LDFLAGS = @BUILD_LDFLAGS@ |
| 114 | BUILD_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 | |
| 119 | BUILD_EXEEXT = @BUILD_EXEEXT@ |
Steve Kondik | ae271bc | 2015-11-15 02:50:53 +0100 | [diff] [blame] | 120 | x = @EXEEXT@ |
Amit Daniel Kachhap | e6a01f5 | 2011-07-20 11:45:59 +0530 | [diff] [blame] | 121 | |
| 122 | CFLAGS_LIBTOOL = $(CCFLAGS) |
micky387 | 9b9f5e7 | 2025-07-08 18:04:53 -0400 | [diff] [blame^] | 123 | CFLAGS_NORMAL = $(CCFLAGS) -DNCURSES_STATIC |
| 124 | CFLAGS_DEBUG = $(CCFLAGS) -DNCURSES_STATIC @CC_G_OPT@ -DTRACE |
| 125 | CFLAGS_PROFILE = $(CCFLAGS) -DNCURSES_STATIC -pg |
Amit Daniel Kachhap | e6a01f5 | 2011-07-20 11:45:59 +0530 | [diff] [blame] | 126 | CFLAGS_SHARED = $(CCFLAGS) @CC_SHARED_OPTS@ |
| 127 | |
| 128 | CFLAGS_DEFAULT = $(CFLAGS_@DFT_UPR_MODEL@) |
| 129 | |
| 130 | LINK = $(LIBTOOL) |
micky387 | 9b9f5e7 | 2025-07-08 18:04:53 -0400 | [diff] [blame^] | 131 | LDFLAGS = @LDFLAGS@ @LD_MODEL@ |
Amit Daniel Kachhap | e6a01f5 | 2011-07-20 11:45:59 +0530 | [diff] [blame] | 132 | |
| 133 | SHLIB_DIRS = -L../lib |
micky387 | 9b9f5e7 | 2025-07-08 18:04:53 -0400 | [diff] [blame^] | 134 | SHLIB_LIST = $(SHLIB_DIRS) @SHLIB_LIST@ @LIBS@ |
| 135 | TINFO_LIST = $(SHLIB_DIRS) @TINFO_LIST@ @LIBS@ |
| 136 | TICS_LIST = $(SHLIB_DIRS) @TICS_LIST@ @LIBS@ |
Amit Daniel Kachhap | e6a01f5 | 2011-07-20 11:45:59 +0530 | [diff] [blame] | 137 | |
Steve Kondik | ae271bc | 2015-11-15 02:50:53 +0100 | [diff] [blame] | 138 | RPATH_LIST = @RPATH_LIST@ |
| 139 | RESULTING_SYMS = @RESULTING_SYMS@ |
| 140 | VERSIONED_SYMS = @VERSIONED_SYMS@ |
Amit Daniel Kachhap | e6a01f5 | 2011-07-20 11:45:59 +0530 | [diff] [blame] | 141 | MK_SHARED_LIB = @MK_SHARED_LIB@ |
| 142 | |
| 143 | NCURSES_MAJOR = @NCURSES_MAJOR@ |
| 144 | NCURSES_MINOR = @NCURSES_MINOR@ |
| 145 | REL_VERSION = @cf_cv_rel_version@ |
| 146 | ABI_VERSION = @cf_cv_abi_version@ |
| 147 | |
| 148 | RANLIB = @LIB_PREP@ |
| 149 | |
Steve Kondik | ae271bc | 2015-11-15 02:50:53 +0100 | [diff] [blame] | 150 | LIBRARIES = @Libs_To_Make@ |
Amit Daniel Kachhap | e6a01f5 | 2011-07-20 11:45:59 +0530 | [diff] [blame] | 151 | |
| 152 | LINT = @LINT@ |
| 153 | LINT_OPTS = @LINT_OPTS@ |
| 154 | LINT_LIBS = -lncurses @LIBS@ |
| 155 | |
| 156 | FALLBACK_LIST = @FALLBACK_LIST@ |
| 157 | |
| 158 | USE_BIG_STRINGS = @USE_BIG_STRINGS@ |
| 159 | TERMINFO_CAPS = $(top_srcdir)/include/@TERMINFO_CAPS@ |
micky387 | 9b9f5e7 | 2025-07-08 18:04:53 -0400 | [diff] [blame^] | 160 | CAPLIST = $(TERMINFO_CAPS) $(top_srcdir)/include/Caps-ncurses |
Amit Daniel Kachhap | e6a01f5 | 2011-07-20 11:45:59 +0530 | [diff] [blame] | 161 | |
Steve Kondik | ae271bc | 2015-11-15 02:50:53 +0100 | [diff] [blame] | 162 | TERMINFO = @TERMINFO@ |
| 163 | TERMINFO_SRC = @TERMINFO_SRC@ |
micky387 | 9b9f5e7 | 2025-07-08 18:04:53 -0400 | [diff] [blame^] | 164 | TIC_PATH = @TIC@ |
| 165 | INFOCMP_PATH = @INFOCMP@ |
Steve Kondik | ae271bc | 2015-11-15 02:50:53 +0100 | [diff] [blame] | 166 | |
Amit Daniel Kachhap | e6a01f5 | 2011-07-20 11:45:59 +0530 | [diff] [blame] | 167 | AUTO_SRC = \ |
| 168 | ./codes.c \ |
| 169 | ./comp_captab.c \ |
micky387 | 9b9f5e7 | 2025-07-08 18:04:53 -0400 | [diff] [blame^] | 170 | ./comp_userdefs.c \ |
Amit Daniel Kachhap | e6a01f5 | 2011-07-20 11:45:59 +0530 | [diff] [blame] | 171 | ./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 | |
micky387 | 9b9f5e7 | 2025-07-08 18:04:53 -0400 | [diff] [blame^] | 181 | HEADER_DEPS = @INTERNALS_HDR@ \ |
Steve Kondik | ae271bc | 2015-11-15 02:50:53 +0100 | [diff] [blame] | 182 | ../include/ncurses_cfg.h \ |
micky387 | 9b9f5e7 | 2025-07-08 18:04:53 -0400 | [diff] [blame^] | 183 | ../include/ncurses_def.h \ |
| 184 | ../include/ncurses_dll.h \ |
Steve Kondik | ae271bc | 2015-11-15 02:50:53 +0100 | [diff] [blame] | 185 | ../include/curses.h \ |
Steve Kondik | ae271bc | 2015-11-15 02:50:53 +0100 | [diff] [blame] | 186 | ../include/term.h \ |
micky387 | 9b9f5e7 | 2025-07-08 18:04:53 -0400 | [diff] [blame^] | 187 | ../include/unctrl.h \ |
Steve Kondik | ae271bc | 2015-11-15 02:50:53 +0100 | [diff] [blame] | 188 | $(INCDIR)/nc_alloc.h \ |
micky387 | 9b9f5e7 | 2025-07-08 18:04:53 -0400 | [diff] [blame^] | 189 | $(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 Kondik | ae271bc | 2015-11-15 02:50:53 +0100 | [diff] [blame] | 198 | |
Amit Daniel Kachhap | e6a01f5 | 2011-07-20 11:45:59 +0530 | [diff] [blame] | 199 | TEST_DEPS = ../lib/@LIB_PREFIX@ncurses@DFT_DEP_SUFFIX@ |
micky387 | 9b9f5e7 | 2025-07-08 18:04:53 -0400 | [diff] [blame^] | 200 | TEST_ARGS = @LDFLAGS_STATIC@ @TEST_ARGS@ @LDFLAGS_SHARED@ |
Amit Daniel Kachhap | e6a01f5 | 2011-07-20 11:45:59 +0530 | [diff] [blame] | 201 | TEST_LDFLAGS = @LD_MODEL@ $(TEST_ARGS) @LIBS@ @LOCAL_LDFLAGS@ @LDFLAGS@ |
| 202 | |
| 203 | TEST_PROGS = \ |
| 204 | captoinfo$x \ |
| 205 | hardscroll$x \ |
Amit Daniel Kachhap | e6a01f5 | 2011-07-20 11:45:59 +0530 | [diff] [blame] | 206 | hashmap$x \ |
micky387 | 9b9f5e7 | 2025-07-08 18:04:53 -0400 | [diff] [blame^] | 207 | lib_mvcur$x \ |
| 208 | link_test$x \ |
| 209 | report_hashing$x |
| 210 | |
| 211 | LOCAL_LIBDIR = @top_builddir@/lib |
Amit Daniel Kachhap | e6a01f5 | 2011-07-20 11:45:59 +0530 | [diff] [blame] | 212 | |
Steve Kondik | ae271bc | 2015-11-15 02:50:53 +0100 | [diff] [blame] | 213 | base = $(srcdir)/base |
| 214 | serial = $(srcdir)/tty |
| 215 | tinfo = $(srcdir)/tinfo |
| 216 | trace = $(srcdir)/trace |
| 217 | wide = $(srcdir)/widechar |
| 218 | win32con = $(srcdir)/win32con |
Amit Daniel Kachhap | e6a01f5 | 2011-07-20 11:45:59 +0530 | [diff] [blame] | 219 | |
| 220 | ################################################################################ |
micky387 | 9b9f5e7 | 2025-07-08 18:04:53 -0400 | [diff] [blame^] | 221 | |
| 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 | |
| 232 | all libs :: $(AUTO_SRC) ../lib $(LIBRARIES) |
| 233 | |
| 234 | @CHECK_BUILD@all libs :: report_offsets$(BUILD_EXEEXT) |
Amit Daniel Kachhap | e6a01f5 | 2011-07-20 11:45:59 +0530 | [diff] [blame] | 235 | |
| 236 | sources: $(AUTO_SRC) |
| 237 | |
| 238 | $(DESTDIR)$(bindir) \ |
| 239 | $(DESTDIR)$(libdir) : |
Steve Kondik | ae271bc | 2015-11-15 02:50:53 +0100 | [diff] [blame] | 240 | mkdir -p $@ |
Amit Daniel Kachhap | e6a01f5 | 2011-07-20 11:45:59 +0530 | [diff] [blame] | 241 | |
| 242 | ../lib : ; mkdir $@ |
| 243 | |
| 244 | ./fallback.c : $(tinfo)/MKfallback.sh |
micky387 | 9b9f5e7 | 2025-07-08 18:04:53 -0400 | [diff] [blame^] | 245 | $(SHELL) -e $(tinfo)/MKfallback.sh $(TERMINFO) $(TERMINFO_SRC) "$(TIC_PATH)" "$(INFOCMP_PATH)" $(FALLBACK_LIST) >$@ |
Amit Daniel Kachhap | e6a01f5 | 2011-07-20 11:45:59 +0530 | [diff] [blame] | 246 | |
| 247 | ./lib_gen.c : $(base)/MKlib_gen.sh ../include/curses.h |
micky387 | 9b9f5e7 | 2025-07-08 18:04:53 -0400 | [diff] [blame^] | 248 | FGREP="@FGREP@" $(SHELL) -e $(base)/MKlib_gen.sh "$(CPP) $(CPPFLAGS)" "$(AWK)" generated <../include/curses.h >$@ |
Amit Daniel Kachhap | e6a01f5 | 2011-07-20 11:45:59 +0530 | [diff] [blame] | 249 | |
micky387 | 9b9f5e7 | 2025-07-08 18:04:53 -0400 | [diff] [blame^] | 250 | init_keytry.h : make_keys$(BUILD_EXEEXT) keys.list |
Amit Daniel Kachhap | e6a01f5 | 2011-07-20 11:45:59 +0530 | [diff] [blame] | 251 | ./make_keys$(BUILD_EXEEXT) keys.list > $@ |
| 252 | |
| 253 | keys.list : $(tinfo)/MKkeys_list.sh |
micky387 | 9b9f5e7 | 2025-07-08 18:04:53 -0400 | [diff] [blame^] | 254 | AWK=$(AWK) USE_SIGWINCH=@cf_cv_enable_sigwinch@ $(SHELL) $(tinfo)/MKkeys_list.sh $(CAPLIST) | LC_ALL=C sort >$@ |
Amit Daniel Kachhap | e6a01f5 | 2011-07-20 11:45:59 +0530 | [diff] [blame] | 255 | |
| 256 | make_keys$(BUILD_EXEEXT) : \ |
micky387 | 9b9f5e7 | 2025-07-08 18:04:53 -0400 | [diff] [blame^] | 257 | build.priv.h \ |
Amit Daniel Kachhap | e6a01f5 | 2011-07-20 11:45:59 +0530 | [diff] [blame] | 258 | $(tinfo)/make_keys.c \ |
micky387 | 9b9f5e7 | 2025-07-08 18:04:53 -0400 | [diff] [blame^] | 259 | ./names.c |
Steve Kondik | ae271bc | 2015-11-15 02:50:53 +0100 | [diff] [blame] | 260 | $(BUILD_CC) -o $@ $(BUILD_CPPFLAGS) $(BUILD_CCFLAGS) $(tinfo)/make_keys.c $(BUILD_LDFLAGS) $(BUILD_LIBS) |
Amit Daniel Kachhap | e6a01f5 | 2011-07-20 11:45:59 +0530 | [diff] [blame] | 261 | |
| 262 | make_hash$(BUILD_EXEEXT) : \ |
micky387 | 9b9f5e7 | 2025-07-08 18:04:53 -0400 | [diff] [blame^] | 263 | build.priv.h \ |
Steve Kondik | ae271bc | 2015-11-15 02:50:53 +0100 | [diff] [blame] | 264 | $(tinfo)/make_hash.c \ |
Amit Daniel Kachhap | e6a01f5 | 2011-07-20 11:45:59 +0530 | [diff] [blame] | 265 | ../include/hashsize.h |
Steve Kondik | ae271bc | 2015-11-15 02:50:53 +0100 | [diff] [blame] | 266 | $(BUILD_CC) -o $@ $(BUILD_CPPFLAGS) $(BUILD_CCFLAGS) $(tinfo)/make_hash.c $(BUILD_LDFLAGS) $(BUILD_LIBS) |
Amit Daniel Kachhap | e6a01f5 | 2011-07-20 11:45:59 +0530 | [diff] [blame] | 267 | |
micky387 | 9b9f5e7 | 2025-07-08 18:04:53 -0400 | [diff] [blame^] | 268 | report_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 Kondik | ae271bc | 2015-11-15 02:50:53 +0100 | [diff] [blame] | 274 | ./expanded.c : $(srcdir)/curses.priv.h $(serial)/MKexpanded.sh |
| 275 | $(SHELL) -e $(serial)/MKexpanded.sh "$(CPP)" $(CPPFLAGS) > $@ |
Amit Daniel Kachhap | e6a01f5 | 2011-07-20 11:45:59 +0530 | [diff] [blame] | 276 | |
| 277 | ./comp_captab.c: \ |
| 278 | make_hash$(BUILD_EXEEXT) \ |
| 279 | ../include/hashsize.h \ |
| 280 | $(tinfo)/MKcaptab.sh \ |
| 281 | $(tinfo)/MKcaptab.awk |
micky387 | 9b9f5e7 | 2025-07-08 18:04:53 -0400 | [diff] [blame^] | 282 | $(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 Kachhap | e6a01f5 | 2011-07-20 11:45:59 +0530 | [diff] [blame] | 289 | |
| 290 | ./lib_keyname.c: keys.list $(base)/MKkeyname.awk |
micky387 | 9b9f5e7 | 2025-07-08 18:04:53 -0400 | [diff] [blame^] | 291 | $(AWK) -f $(base)/MKkeyname.awk use_sigwinch=@cf_cv_enable_sigwinch@ bigstrings=$(USE_BIG_STRINGS) keys.list > $@ |
Amit Daniel Kachhap | e6a01f5 | 2011-07-20 11:45:59 +0530 | [diff] [blame] | 292 | |
| 293 | ./codes.c: $(tinfo)/MKcodes.awk |
micky387 | 9b9f5e7 | 2025-07-08 18:04:53 -0400 | [diff] [blame^] | 294 | $(AWK) -f $(tinfo)/MKcodes.awk bigstrings=$(USE_BIG_STRINGS) $(CAPLIST) >$@ |
Amit Daniel Kachhap | e6a01f5 | 2011-07-20 11:45:59 +0530 | [diff] [blame] | 295 | |
| 296 | ./names.c: $(tinfo)/MKnames.awk |
micky387 | 9b9f5e7 | 2025-07-08 18:04:53 -0400 | [diff] [blame^] | 297 | $(AWK) -f $(tinfo)/MKnames.awk bigstrings=$(USE_BIG_STRINGS) $(CAPLIST) >$@ |
Amit Daniel Kachhap | e6a01f5 | 2011-07-20 11:45:59 +0530 | [diff] [blame] | 298 | |
| 299 | ./unctrl.c: $(base)/MKunctrl.awk |
| 300 | echo | $(AWK) -f $(base)/MKunctrl.awk bigstrings=$(USE_BIG_STRINGS) >$@ |
| 301 | |
| 302 | tags: |
Steve Kondik | ae271bc | 2015-11-15 02:50:53 +0100 | [diff] [blame] | 303 | $(CTAGS) *.[ch] */*.[ch] |
Amit Daniel Kachhap | e6a01f5 | 2011-07-20 11:45:59 +0530 | [diff] [blame] | 304 | |
| 305 | @MAKE_UPPER_TAGS@TAGS: |
Steve Kondik | ae271bc | 2015-11-15 02:50:53 +0100 | [diff] [blame] | 306 | @MAKE_UPPER_TAGS@ $(ETAGS) *.[ch] */*.[ch] |
Amit Daniel Kachhap | e6a01f5 | 2011-07-20 11:45:59 +0530 | [diff] [blame] | 307 | |
| 308 | mostlyclean :: |
micky387 | 9b9f5e7 | 2025-07-08 18:04:53 -0400 | [diff] [blame^] | 309 | -rm -f core tags TAGS *~ *.bak *.i *.ln *.atac |
| 310 | -test -d trace || rm -f trace |
Amit Daniel Kachhap | e6a01f5 | 2011-07-20 11:45:59 +0530 | [diff] [blame] | 311 | -rm -f $(TEST_PROGS) |
| 312 | |
| 313 | clean :: mostlyclean |
| 314 | -rm -f $(AUTO_SRC) |
| 315 | -rm -f make_keys$(BUILD_EXEEXT) |
| 316 | -rm -f make_hash$(BUILD_EXEEXT) |
micky387 | 9b9f5e7 | 2025-07-08 18:04:53 -0400 | [diff] [blame^] | 317 | -rm -f report_offsets$(BUILD_EXEEXT) |
Steve Kondik | ae271bc | 2015-11-15 02:50:53 +0100 | [diff] [blame] | 318 | -rm -rf .libs *.dSYM *.map |
Amit Daniel Kachhap | e6a01f5 | 2011-07-20 11:45:59 +0530 | [diff] [blame] | 319 | |
| 320 | distclean :: clean |
| 321 | -rm -f Makefile |
| 322 | |
| 323 | realclean :: 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 : |
micky387 | 9b9f5e7 | 2025-07-08 18:04:53 -0400 | [diff] [blame^] | 329 | ( cd ../include && $(MAKE) $(TOP_MFLAGS) ) |
Amit Daniel Kachhap | e6a01f5 | 2011-07-20 11:45:59 +0530 | [diff] [blame] | 330 | |
| 331 | # These rules build test-programs for the modules that have test-drivers |
micky387 | 9b9f5e7 | 2025-07-08 18:04:53 -0400 | [diff] [blame^] | 332 | @MAKE_PHONY@.PHONY : test_progs |
Amit Daniel Kachhap | e6a01f5 | 2011-07-20 11:45:59 +0530 | [diff] [blame] | 333 | test_progs : $(TEST_PROGS) |
| 334 | |
| 335 | ./link_test.c : $(base)/MKlib_gen.sh ../include/curses.h |
micky387 | 9b9f5e7 | 2025-07-08 18:04:53 -0400 | [diff] [blame^] | 336 | FGREP="@FGREP@" $(SHELL) -e $(base)/MKlib_gen.sh "$(CPP) $(CPPFLAGS)" "$(AWK)" implemented <../include/curses.h >$@ |
Amit Daniel Kachhap | e6a01f5 | 2011-07-20 11:45:59 +0530 | [diff] [blame] | 337 | |
| 338 | captoinfo$x : $(tinfo)/captoinfo.c $(TEST_DEPS) |
Steve Kondik | ae271bc | 2015-11-15 02:50:53 +0100 | [diff] [blame] | 339 | @ECHO_LD@ $(LIBTOOL_LINK) -o $@ $(CFLAGS_DEFAULT) -DMAIN $(tinfo)/captoinfo.c $(TEST_LDFLAGS) |
Amit Daniel Kachhap | e6a01f5 | 2011-07-20 11:45:59 +0530 | [diff] [blame] | 340 | |
| 341 | hardscroll$x : $(serial)/hardscroll.c $(TEST_DEPS) |
Steve Kondik | ae271bc | 2015-11-15 02:50:53 +0100 | [diff] [blame] | 342 | @ECHO_LD@ $(LIBTOOL_LINK) -o $@ $(CFLAGS_DEFAULT) -DSCROLLDEBUG $(serial)/hardscroll.c $(TEST_LDFLAGS) |
Amit Daniel Kachhap | e6a01f5 | 2011-07-20 11:45:59 +0530 | [diff] [blame] | 343 | |
| 344 | hashmap$x : $(serial)/hashmap.c $(serial)/hardscroll.c $(TEST_DEPS) |
Steve Kondik | ae271bc | 2015-11-15 02:50:53 +0100 | [diff] [blame] | 345 | @ECHO_LD@ $(LIBTOOL_LINK) -o $@ $(CFLAGS_DEFAULT) -DHASHDEBUG $(serial)/hashmap.c $(serial)/hardscroll.c $(TEST_LDFLAGS) |
Amit Daniel Kachhap | e6a01f5 | 2011-07-20 11:45:59 +0530 | [diff] [blame] | 346 | |
| 347 | lib_mvcur$x : $(serial)/lib_mvcur.c $(TEST_DEPS) \ |
| 348 | ../@DFT_OBJ_SUBDIR@/dump_entry$o |
Steve Kondik | ae271bc | 2015-11-15 02:50:53 +0100 | [diff] [blame] | 349 | @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 Kachhap | e6a01f5 | 2011-07-20 11:45:59 +0530 | [diff] [blame] | 350 | |
| 351 | link_test$x : ./link_test.c $(TEST_DEPS) \ |
| 352 | ../@DFT_OBJ_SUBDIR@/link_test$o |
Steve Kondik | ae271bc | 2015-11-15 02:50:53 +0100 | [diff] [blame] | 353 | @ECHO_LD@ $(CC) -o $@ $(CFLAGS_DEFAULT) ../@DFT_OBJ_SUBDIR@/link_test$o $(TEST_LDFLAGS) |
Amit Daniel Kachhap | e6a01f5 | 2011-07-20 11:45:59 +0530 | [diff] [blame] | 354 | |
| 355 | ../@DFT_OBJ_SUBDIR@/dump_entry$o: |
micky387 | 9b9f5e7 | 2025-07-08 18:04:53 -0400 | [diff] [blame^] | 356 | ( cd ../progs && $(MAKE) ../@DFT_OBJ_SUBDIR@/dump_entry$o ) |
| 357 | |
| 358 | report_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 |
| 365 | check_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 |
| 376 | check_objects: test_progs |
| 377 | |
| 378 | check :: check_headers check_objects |
Amit Daniel Kachhap | e6a01f5 | 2011-07-20 11:45:59 +0530 | [diff] [blame] | 379 | |
| 380 | ############################################################################### |
| 381 | # The remainder of this file is automatically generated during configuration |
| 382 | ############################################################################### |