micky387 | 9b9f5e7 | 2025-07-08 18:04:53 -0400 | [diff] [blame^] | 1 | # $Id: Makefile.in,v 1.115 2024/04/08 18:33:54 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 2020-2021,2024 Thomas E. Dickey # |
| 4 | # Copyright 1998-2016,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 ncurses utility programs. |
| 36 | # |
| 37 | # The variable 'srcdir' refers to the source-distribution, and can be set with |
| 38 | # the configure script by "--srcdir=DIR". |
| 39 | # |
| 40 | # The rules are organized to produce the libraries for the configured models, |
| 41 | # and the programs with the configured default model. |
| 42 | |
| 43 | # turn off _all_ suffix rules; we'll generate our own |
| 44 | .SUFFIXES: |
| 45 | |
Steve Kondik | ae271bc | 2015-11-15 02:50:53 +0100 | [diff] [blame] | 46 | SHELL = @SHELL@ |
| 47 | VPATH = @srcdir@ |
Amit Daniel Kachhap | e6a01f5 | 2011-07-20 11:45:59 +0530 | [diff] [blame] | 48 | THIS = Makefile |
| 49 | |
micky387 | 9b9f5e7 | 2025-07-08 18:04:53 -0400 | [diff] [blame^] | 50 | TOP_MFLAGS = @cf_cv_makeflags@ DESTDIR="$(DESTDIR)" RPATH_LIST="$(RPATH_LIST)" |
Amit Daniel Kachhap | e6a01f5 | 2011-07-20 11:45:59 +0530 | [diff] [blame] | 51 | @SET_MAKE@ |
| 52 | |
| 53 | x = @EXEEXT@ |
| 54 | o = .@OBJEXT@ |
| 55 | |
| 56 | MODEL = ../@DFT_OBJ_SUBDIR@ |
| 57 | DESTDIR = @DESTDIR@ |
| 58 | top_srcdir = @top_srcdir@ |
| 59 | srcdir = @srcdir@ |
| 60 | prefix = @prefix@ |
| 61 | exec_prefix = @exec_prefix@ |
| 62 | bindir = @bindir@ |
| 63 | libdir = @libdir@ |
| 64 | includedir = @includedir@ |
Steve Kondik | ae271bc | 2015-11-15 02:50:53 +0100 | [diff] [blame] | 65 | datarootdir = @datarootdir@ |
Amit Daniel Kachhap | e6a01f5 | 2011-07-20 11:45:59 +0530 | [diff] [blame] | 66 | datadir = @datadir@ |
Steve Kondik | ae271bc | 2015-11-15 02:50:53 +0100 | [diff] [blame] | 67 | includesubdir = @includesubdir@ |
| 68 | |
| 69 | INCLUDEDIR = $(DESTDIR)$(includedir)$(includesubdir) |
| 70 | |
| 71 | PACKAGE = @PACKAGE@ |
Amit Daniel Kachhap | e6a01f5 | 2011-07-20 11:45:59 +0530 | [diff] [blame] | 72 | |
| 73 | LIBTOOL = @LIBTOOL@ |
Steve Kondik | ae271bc | 2015-11-15 02:50:53 +0100 | [diff] [blame] | 74 | LIBTOOL_OPTS = @LIBTOOL_OPTS@ |
Amit Daniel Kachhap | e6a01f5 | 2011-07-20 11:45:59 +0530 | [diff] [blame] | 75 | LIBTOOL_CLEAN = @LIB_CLEAN@ |
| 76 | LIBTOOL_COMPILE = @LIB_COMPILE@ |
| 77 | LIBTOOL_LINK = @LIB_LINK@ |
| 78 | LIBTOOL_INSTALL = @LIB_INSTALL@ |
| 79 | LIBTOOL_UNINSTALL = @LIB_UNINSTALL@ |
| 80 | |
| 81 | INSTALL = @INSTALL@ |
micky387 | 9b9f5e7 | 2025-07-08 18:04:53 -0400 | [diff] [blame^] | 82 | INSTALL_PROG = @INSTALL_PROGRAM@ @INSTALL_OPT_S@ |
Amit Daniel Kachhap | e6a01f5 | 2011-07-20 11:45:59 +0530 | [diff] [blame] | 83 | transform = @program_transform_name@ |
| 84 | |
| 85 | AWK = @AWK@ |
| 86 | LN_S = @LN_S@ |
| 87 | |
Steve Kondik | ae271bc | 2015-11-15 02:50:53 +0100 | [diff] [blame] | 88 | CTAGS = @CTAGS@ |
| 89 | ETAGS = @ETAGS@ |
| 90 | |
Amit Daniel Kachhap | e6a01f5 | 2011-07-20 11:45:59 +0530 | [diff] [blame] | 91 | CC = @CC@ |
| 92 | CPP = @CPP@ |
micky387 | 9b9f5e7 | 2025-07-08 18:04:53 -0400 | [diff] [blame^] | 93 | CFLAGS = @CFLAGS@ @EXTRA_CFLAGS@ |
Amit Daniel Kachhap | e6a01f5 | 2011-07-20 11:45:59 +0530 | [diff] [blame] | 94 | |
| 95 | INCDIR = $(top_srcdir)/include |
micky387 | 9b9f5e7 | 2025-07-08 18:04:53 -0400 | [diff] [blame^] | 96 | NCUDIR = $(top_srcdir)/ncurses |
| 97 | CPPFLAGS = -DHAVE_CONFIG_H -I../progs -I../ncurses -I$(top_srcdir)/ncurses @CPPFLAGS@ |
Amit Daniel Kachhap | e6a01f5 | 2011-07-20 11:45:59 +0530 | [diff] [blame] | 98 | |
| 99 | CCFLAGS = $(CPPFLAGS) $(CFLAGS) |
| 100 | |
| 101 | CFLAGS_LIBTOOL = $(CCFLAGS) |
micky387 | 9b9f5e7 | 2025-07-08 18:04:53 -0400 | [diff] [blame^] | 102 | CFLAGS_NORMAL = $(CCFLAGS) -DNCURSES_STATIC |
| 103 | CFLAGS_DEBUG = $(CCFLAGS) -DNCURSES_STATIC @CC_G_OPT@ -DTRACE |
| 104 | CFLAGS_PROFILE = $(CCFLAGS) -DNCURSES_STATIC -pg |
Amit Daniel Kachhap | e6a01f5 | 2011-07-20 11:45:59 +0530 | [diff] [blame] | 105 | CFLAGS_SHARED = $(CCFLAGS) @CC_SHARED_OPTS@ |
| 106 | |
| 107 | CFLAGS_DEFAULT = $(CFLAGS_@DFT_UPR_MODEL@) |
| 108 | |
| 109 | REL_VERSION = @cf_cv_rel_version@ |
| 110 | ABI_VERSION = @cf_cv_abi_version@ |
| 111 | LOCAL_LIBDIR = @top_builddir@/lib |
| 112 | |
| 113 | LD = @LD@ |
| 114 | LINK = @LINK_PROGS@ $(LIBTOOL_LINK) |
| 115 | LDFLAGS = @EXTRA_LDFLAGS@ @LDFLAGS@ |
Steve Kondik | ae271bc | 2015-11-15 02:50:53 +0100 | [diff] [blame] | 116 | RPATH_LIST = @RPATH_LIST@ |
Amit Daniel Kachhap | e6a01f5 | 2011-07-20 11:45:59 +0530 | [diff] [blame] | 117 | |
| 118 | LDFLAGS_LIBTOOL = $(LDFLAGS) $(CFLAGS_LIBTOOL) |
| 119 | LDFLAGS_NORMAL = $(LDFLAGS) $(CFLAGS_NORMAL) |
| 120 | LDFLAGS_DEBUG = $(LDFLAGS) $(CFLAGS_DEBUG) |
Steve Kondik | ae271bc | 2015-11-15 02:50:53 +0100 | [diff] [blame] | 121 | LDFLAGS_PROFILE = $(LDFLAGS) $(CFLAGS_PROFILE) |
Amit Daniel Kachhap | e6a01f5 | 2011-07-20 11:45:59 +0530 | [diff] [blame] | 122 | LDFLAGS_SHARED = $(LDFLAGS) $(CFLAGS_SHARED) @LD_SHARED_OPTS@ |
| 123 | |
| 124 | LDFLAGS_DEFAULT = $(LDFLAGS_@DFT_UPR_MODEL@) |
| 125 | |
Steve Kondik | ae271bc | 2015-11-15 02:50:53 +0100 | [diff] [blame] | 126 | LIBS_TIC = @TINFO_LDFLAGS@ @LDFLAGS_STATIC@ @TICS_LIBS@ @TINFO_LIBS@ @LDFLAGS_SHARED@ @LD_MODEL@ @LIBS@ |
| 127 | LDFLAGS_TIC = @TICS_LDFLAGS@ $(LDFLAGS_@DFT_UPR_MODEL@) $(LIBS_TIC) |
Amit Daniel Kachhap | e6a01f5 | 2011-07-20 11:45:59 +0530 | [diff] [blame] | 128 | |
Steve Kondik | ae271bc | 2015-11-15 02:50:53 +0100 | [diff] [blame] | 129 | LIBS_TINFO = @LDFLAGS_STATIC@ @TINFO_LIBS@ @LDFLAGS_SHARED@ @LD_MODEL@ @LIBS@ |
| 130 | LDFLAGS_TINFO = @TINFO_LDFLAGS@ $(LDFLAGS_@DFT_UPR_MODEL@) $(LIBS_TINFO) |
Amit Daniel Kachhap | e6a01f5 | 2011-07-20 11:45:59 +0530 | [diff] [blame] | 131 | |
| 132 | LINT = @LINT@ |
| 133 | LINT_OPTS = @LINT_OPTS@ |
| 134 | LINT_LIBS = -lncurses @LIBS@ |
| 135 | |
| 136 | AUTO_SRC = \ |
micky387 | 9b9f5e7 | 2025-07-08 18:04:53 -0400 | [diff] [blame^] | 137 | termsort.h \ |
Amit Daniel Kachhap | e6a01f5 | 2011-07-20 11:45:59 +0530 | [diff] [blame] | 138 | transform.h |
| 139 | |
| 140 | # tic relies on direct access to the terminfo database |
Steve Kondik | ae271bc | 2015-11-15 02:50:53 +0100 | [diff] [blame] | 141 | GET_PROGS = infocmp$x clear$x tabs$x tput$x tset$x toe$x |
Amit Daniel Kachhap | e6a01f5 | 2011-07-20 11:45:59 +0530 | [diff] [blame] | 142 | PUT_PROGS = @MAKE_TERMINFO@ tic$x |
| 143 | PROGS = $(PUT_PROGS) $(GET_PROGS) |
| 144 | |
| 145 | # Default library, for linking applications |
| 146 | DEPS_CURSES = ../lib/@LIB_PREFIX@ncurses@DFT_DEP_SUFFIX@ |
| 147 | |
| 148 | HEADER_DEPS = \ |
micky387 | 9b9f5e7 | 2025-07-08 18:04:53 -0400 | [diff] [blame^] | 149 | $(INCDIR)/nc_access.h \ |
| 150 | $(INCDIR)/nc_alloc.h \ |
| 151 | $(INCDIR)/nc_panel.h \ |
| 152 | $(INCDIR)/nc_string.h \ |
| 153 | $(INCDIR)/nc_termios.h \ |
| 154 | $(INCDIR)/nc_tparm.h \ |
Amit Daniel Kachhap | e6a01f5 | 2011-07-20 11:45:59 +0530 | [diff] [blame] | 155 | $(INCDIR)/term_entry.h \ |
| 156 | $(INCDIR)/tic.h \ |
micky387 | 9b9f5e7 | 2025-07-08 18:04:53 -0400 | [diff] [blame^] | 157 | $(NCUDIR)/curses.priv.h \ |
| 158 | $(NCUDIR)/new_pair.h \ |
| 159 | $(NCUDIR)/term.priv.h \ |
| 160 | $(srcdir)/progs.priv.h \ |
| 161 | ../include/curses.h \ |
| 162 | ../include/ncurses_cfg.h \ |
| 163 | ../include/ncurses_def.h \ |
| 164 | ../include/ncurses_dll.h \ |
| 165 | ../include/term.h \ |
| 166 | ../include/unctrl.h |
Amit Daniel Kachhap | e6a01f5 | 2011-07-20 11:45:59 +0530 | [diff] [blame] | 167 | |
| 168 | ################################################################################ |
micky387 | 9b9f5e7 | 2025-07-08 18:04:53 -0400 | [diff] [blame^] | 169 | |
| 170 | @MAKE_PHONY@.PHONY : all |
| 171 | @MAKE_PHONY@.PHONY : check |
| 172 | @MAKE_PHONY@.PHONY : clean |
| 173 | @MAKE_PHONY@.PHONY : distclean |
| 174 | @MAKE_PHONY@.PHONY : install |
| 175 | @MAKE_PHONY@.PHONY : install.libs |
| 176 | @MAKE_PHONY@.PHONY : install.progs |
| 177 | @MAKE_PHONY@.PHONY : libs |
| 178 | @MAKE_PHONY@.PHONY : lint |
| 179 | @MAKE_PHONY@.PHONY : mostlyclean |
| 180 | @MAKE_PHONY@.PHONY : realclean |
| 181 | @MAKE_PHONY@.PHONY : sources |
| 182 | @MAKE_PHONY@.PHONY : uninstall |
| 183 | @MAKE_PHONY@.PHONY : uninstall.libs |
| 184 | @MAKE_PHONY@.PHONY : uninstall.progs |
| 185 | |
Amit Daniel Kachhap | e6a01f5 | 2011-07-20 11:45:59 +0530 | [diff] [blame] | 186 | all: $(AUTO_SRC) $(PROGS) |
| 187 | |
| 188 | sources: $(AUTO_SRC) |
| 189 | |
| 190 | install: $(AUTO_SRC) install.progs |
| 191 | uninstall: uninstall.progs |
| 192 | |
| 193 | # this line simplifies the configure-script |
| 194 | libs \ |
| 195 | install.libs \ |
| 196 | uninstall.libs: |
| 197 | |
| 198 | TRANSFORM = sed 's/$x$$//'|sed '$(transform)'|sed 's/$$/$x/' |
| 199 | |
| 200 | # transformed names for installing files |
| 201 | actual_captoinfo = `echo captoinfo$x| $(TRANSFORM)` |
| 202 | actual_clear = `echo clear$x| $(TRANSFORM)` |
| 203 | actual_infocmp = `echo infocmp$x| $(TRANSFORM)` |
| 204 | actual_infotocap = `echo infotocap$x| $(TRANSFORM)` |
| 205 | actual_init = `echo init$x| $(TRANSFORM)` |
| 206 | actual_reset = `echo reset$x| $(TRANSFORM)` |
Steve Kondik | ae271bc | 2015-11-15 02:50:53 +0100 | [diff] [blame] | 207 | actual_tabs = `echo tabs$x| $(TRANSFORM)` |
Amit Daniel Kachhap | e6a01f5 | 2011-07-20 11:45:59 +0530 | [diff] [blame] | 208 | actual_tic = `echo tic$x| $(TRANSFORM)` |
| 209 | actual_toe = `echo toe$x| $(TRANSFORM)` |
| 210 | actual_tput = `echo tput$x| $(TRANSFORM)` |
| 211 | actual_tset = `echo tset$x| $(TRANSFORM)` |
| 212 | |
| 213 | # transformed names for comparing at runtime |
| 214 | define_captoinfo = `echo captoinfo| $(TRANSFORM)` |
micky387 | 9b9f5e7 | 2025-07-08 18:04:53 -0400 | [diff] [blame^] | 215 | define_clear = `echo clear| $(TRANSFORM)` |
Amit Daniel Kachhap | e6a01f5 | 2011-07-20 11:45:59 +0530 | [diff] [blame] | 216 | define_infotocap = `echo infotocap| $(TRANSFORM)` |
| 217 | define_init = `echo init| $(TRANSFORM)` |
| 218 | define_reset = `echo reset| $(TRANSFORM)` |
| 219 | |
| 220 | transform.h : |
Steve Kondik | ae271bc | 2015-11-15 02:50:53 +0100 | [diff] [blame] | 221 | echo "#ifndef __TRANSFORM_H" >$@ |
| 222 | echo "#define __TRANSFORM_H 1" >>$@ |
| 223 | echo "#include <progs.priv.h>" >>$@ |
| 224 | echo "extern bool same_program(const char *, const char *);" >>$@ |
| 225 | -$(SHELL) -c 'if test -n "$x" ; then echo "#define SUFFIX_IGNORED \"$x\"">>$@; fi' |
| 226 | echo "#define PROG_CAPTOINFO \"$(define_captoinfo)\"" >>$@ |
| 227 | echo "#define PROG_INFOTOCAP \"$(define_infotocap)\"" >>$@ |
micky387 | 9b9f5e7 | 2025-07-08 18:04:53 -0400 | [diff] [blame^] | 228 | echo "#define PROG_CLEAR \"$(define_clear)\"" >>$@ |
Steve Kondik | ae271bc | 2015-11-15 02:50:53 +0100 | [diff] [blame] | 229 | echo "#define PROG_RESET \"$(define_reset)\"" >>$@ |
| 230 | echo "#define PROG_INIT \"$(define_init)\"" >>$@ |
| 231 | echo "#endif /* __TRANSFORM_H */" >>$@ |
Amit Daniel Kachhap | e6a01f5 | 2011-07-20 11:45:59 +0530 | [diff] [blame] | 232 | |
| 233 | install.progs: $(AUTO_SRC) $(PROGS) $(DESTDIR)$(bindir) |
| 234 | @MAKE_TERMINFO@ $(LIBTOOL_INSTALL) $(INSTALL_PROG) tic$x $(DESTDIR)$(bindir)/$(actual_tic) |
| 235 | @MAKE_TERMINFO@ $(LIBTOOL_INSTALL) $(INSTALL_PROG) toe$x $(DESTDIR)$(bindir)/$(actual_toe) |
| 236 | @MAKE_TERMINFO@ @echo "linking $(actual_infotocap) to $(actual_tic)" |
| 237 | @MAKE_TERMINFO@ -@rm -f $(DESTDIR)$(bindir)/$(actual_infotocap) |
micky387 | 9b9f5e7 | 2025-07-08 18:04:53 -0400 | [diff] [blame^] | 238 | @MAKE_TERMINFO@ ( cd $(DESTDIR)$(bindir) && $(LN_S) $(actual_tic) $(actual_infotocap) ) |
Amit Daniel Kachhap | e6a01f5 | 2011-07-20 11:45:59 +0530 | [diff] [blame] | 239 | @MAKE_TERMINFO@ @echo "linking $(actual_captoinfo) to $(actual_tic)" |
| 240 | @MAKE_TERMINFO@ -@rm -f $(DESTDIR)$(bindir)/$(actual_captoinfo) |
micky387 | 9b9f5e7 | 2025-07-08 18:04:53 -0400 | [diff] [blame^] | 241 | @MAKE_TERMINFO@ ( cd $(DESTDIR)$(bindir) && $(LN_S) $(actual_tic) $(actual_captoinfo) ) |
Amit Daniel Kachhap | e6a01f5 | 2011-07-20 11:45:59 +0530 | [diff] [blame] | 242 | $(LIBTOOL_INSTALL) $(INSTALL_PROG) infocmp$x $(DESTDIR)$(bindir)/$(actual_infocmp) |
| 243 | $(LIBTOOL_INSTALL) $(INSTALL_PROG) clear$x $(DESTDIR)$(bindir)/$(actual_clear) |
Steve Kondik | ae271bc | 2015-11-15 02:50:53 +0100 | [diff] [blame] | 244 | $(LIBTOOL_INSTALL) $(INSTALL_PROG) tabs$x $(DESTDIR)$(bindir)/$(actual_tabs) |
Amit Daniel Kachhap | e6a01f5 | 2011-07-20 11:45:59 +0530 | [diff] [blame] | 245 | $(LIBTOOL_INSTALL) $(INSTALL_PROG) tput$x $(DESTDIR)$(bindir)/$(actual_tput) |
| 246 | $(LIBTOOL_INSTALL) $(INSTALL_PROG) tset$x $(DESTDIR)$(bindir)/$(actual_tset) |
| 247 | @echo "linking $(actual_reset) to $(actual_tset)" |
| 248 | -@rm -f $(DESTDIR)$(bindir)/$(actual_reset) |
micky387 | 9b9f5e7 | 2025-07-08 18:04:53 -0400 | [diff] [blame^] | 249 | ( cd $(DESTDIR)$(bindir) && $(LN_S) $(actual_tset) $(actual_reset) ) |
Amit Daniel Kachhap | e6a01f5 | 2011-07-20 11:45:59 +0530 | [diff] [blame] | 250 | |
| 251 | uninstall.progs: |
| 252 | @MAKE_TERMINFO@ -@$(LIBTOOL_CLEAN) rm -f $(DESTDIR)$(bindir)/$(actual_tic) |
| 253 | @MAKE_TERMINFO@ -@$(LIBTOOL_CLEAN) rm -f $(DESTDIR)$(bindir)/$(actual_toe) |
| 254 | @MAKE_TERMINFO@ -@rm -f $(DESTDIR)$(bindir)/$(actual_captoinfo) |
| 255 | @MAKE_TERMINFO@ -@rm -f $(DESTDIR)$(bindir)/$(actual_infotocap) |
| 256 | -@$(LIBTOOL_CLEAN) rm -f $(DESTDIR)$(bindir)/$(actual_infocmp) |
| 257 | -@$(LIBTOOL_CLEAN) rm -f $(DESTDIR)$(bindir)/$(actual_clear) |
Steve Kondik | ae271bc | 2015-11-15 02:50:53 +0100 | [diff] [blame] | 258 | -@$(LIBTOOL_CLEAN) rm -f $(DESTDIR)$(bindir)/$(actual_tabs) |
Amit Daniel Kachhap | e6a01f5 | 2011-07-20 11:45:59 +0530 | [diff] [blame] | 259 | -@$(LIBTOOL_CLEAN) rm -f $(DESTDIR)$(bindir)/$(actual_tput) |
| 260 | -@$(LIBTOOL_CLEAN) rm -f $(DESTDIR)$(bindir)/$(actual_tset) |
| 261 | -@rm -f $(DESTDIR)$(bindir)/$(actual_reset) |
| 262 | |
| 263 | $(DESTDIR)$(bindir) : |
Steve Kondik | ae271bc | 2015-11-15 02:50:53 +0100 | [diff] [blame] | 264 | mkdir -p $@ |
Amit Daniel Kachhap | e6a01f5 | 2011-07-20 11:45:59 +0530 | [diff] [blame] | 265 | |
| 266 | # |
| 267 | # Utilities normally built by make all start here |
| 268 | # |
| 269 | |
| 270 | DEPS_TIC = \ |
| 271 | $(MODEL)/tic$o \ |
Steve Kondik | ae271bc | 2015-11-15 02:50:53 +0100 | [diff] [blame] | 272 | $(MODEL)/dump_entry$o \ |
| 273 | $(MODEL)/tparm_type$o \ |
| 274 | $(MODEL)/transform$o |
Amit Daniel Kachhap | e6a01f5 | 2011-07-20 11:45:59 +0530 | [diff] [blame] | 275 | |
| 276 | tic$x: $(DEPS_TIC) $(DEPS_CURSES) transform.h |
Steve Kondik | ae271bc | 2015-11-15 02:50:53 +0100 | [diff] [blame] | 277 | @ECHO_LD@ $(LINK) $(DEPS_TIC) $(LDFLAGS_TIC) -o $@ |
Amit Daniel Kachhap | e6a01f5 | 2011-07-20 11:45:59 +0530 | [diff] [blame] | 278 | |
| 279 | DEPS_TOE = \ |
| 280 | $(MODEL)/toe$o |
| 281 | |
| 282 | toe$x: $(DEPS_TOE) $(DEPS_CURSES) |
Steve Kondik | ae271bc | 2015-11-15 02:50:53 +0100 | [diff] [blame] | 283 | @ECHO_LD@ $(LINK) $(DEPS_TOE) $(LDFLAGS_TIC) -o $@ |
Amit Daniel Kachhap | e6a01f5 | 2011-07-20 11:45:59 +0530 | [diff] [blame] | 284 | |
| 285 | DEPS_CLEAR = \ |
micky387 | 9b9f5e7 | 2025-07-08 18:04:53 -0400 | [diff] [blame^] | 286 | $(MODEL)/clear$o \ |
| 287 | $(MODEL)/clear_cmd$o \ |
| 288 | $(MODEL)/tty_settings$o |
Amit Daniel Kachhap | e6a01f5 | 2011-07-20 11:45:59 +0530 | [diff] [blame] | 289 | |
| 290 | clear$x: $(DEPS_CLEAR) $(DEPS_CURSES) |
Steve Kondik | ae271bc | 2015-11-15 02:50:53 +0100 | [diff] [blame] | 291 | @ECHO_LD@ $(LINK) $(DEPS_CLEAR) $(LDFLAGS_TINFO) -o $@ |
| 292 | |
| 293 | DEPS_TABS = \ |
micky387 | 9b9f5e7 | 2025-07-08 18:04:53 -0400 | [diff] [blame^] | 294 | $(MODEL)/tabs$o \ |
| 295 | $(MODEL)/tty_settings$o |
Steve Kondik | ae271bc | 2015-11-15 02:50:53 +0100 | [diff] [blame] | 296 | |
| 297 | tabs$x: $(DEPS_TABS) $(DEPS_TABS) |
| 298 | @ECHO_LD@ $(LINK) $(DEPS_TABS) $(LDFLAGS_TINFO) -o $@ |
Amit Daniel Kachhap | e6a01f5 | 2011-07-20 11:45:59 +0530 | [diff] [blame] | 299 | |
| 300 | DEPS_TPUT = \ |
Steve Kondik | ae271bc | 2015-11-15 02:50:53 +0100 | [diff] [blame] | 301 | $(MODEL)/tput$o \ |
micky387 | 9b9f5e7 | 2025-07-08 18:04:53 -0400 | [diff] [blame^] | 302 | $(MODEL)/clear_cmd$o \ |
| 303 | $(MODEL)/reset_cmd$o \ |
Steve Kondik | ae271bc | 2015-11-15 02:50:53 +0100 | [diff] [blame] | 304 | $(MODEL)/tparm_type$o \ |
micky387 | 9b9f5e7 | 2025-07-08 18:04:53 -0400 | [diff] [blame^] | 305 | $(MODEL)/transform$o \ |
| 306 | $(MODEL)/tty_settings$o |
Amit Daniel Kachhap | e6a01f5 | 2011-07-20 11:45:59 +0530 | [diff] [blame] | 307 | |
| 308 | tput$x: $(DEPS_TPUT) $(DEPS_CURSES) transform.h |
Steve Kondik | ae271bc | 2015-11-15 02:50:53 +0100 | [diff] [blame] | 309 | @ECHO_LD@ $(LINK) $(DEPS_TPUT) $(LDFLAGS_TINFO) -o $@ |
Amit Daniel Kachhap | e6a01f5 | 2011-07-20 11:45:59 +0530 | [diff] [blame] | 310 | |
| 311 | DEPS_INFOCMP = \ |
| 312 | $(MODEL)/infocmp$o \ |
| 313 | $(MODEL)/dump_entry$o |
| 314 | |
| 315 | infocmp$x: $(DEPS_INFOCMP) $(DEPS_CURSES) |
Steve Kondik | ae271bc | 2015-11-15 02:50:53 +0100 | [diff] [blame] | 316 | @ECHO_LD@ $(LINK) $(DEPS_INFOCMP) $(LDFLAGS_TIC) -o $@ |
Amit Daniel Kachhap | e6a01f5 | 2011-07-20 11:45:59 +0530 | [diff] [blame] | 317 | |
| 318 | DEPS_TSET = \ |
Steve Kondik | ae271bc | 2015-11-15 02:50:53 +0100 | [diff] [blame] | 319 | $(MODEL)/tset$o \ |
micky387 | 9b9f5e7 | 2025-07-08 18:04:53 -0400 | [diff] [blame^] | 320 | $(MODEL)/reset_cmd$o \ |
| 321 | $(MODEL)/transform$o \ |
| 322 | $(MODEL)/tty_settings$o |
Amit Daniel Kachhap | e6a01f5 | 2011-07-20 11:45:59 +0530 | [diff] [blame] | 323 | |
| 324 | tset$x: $(DEPS_TSET) $(DEPS_CURSES) transform.h |
Steve Kondik | ae271bc | 2015-11-15 02:50:53 +0100 | [diff] [blame] | 325 | @ECHO_LD@ $(LINK) $(DEPS_TSET) $(LDFLAGS_TINFO) -o $@ |
Amit Daniel Kachhap | e6a01f5 | 2011-07-20 11:45:59 +0530 | [diff] [blame] | 326 | |
micky387 | 9b9f5e7 | 2025-07-08 18:04:53 -0400 | [diff] [blame^] | 327 | termsort.h: $(srcdir)/MKtermsort.sh |
Steve Kondik | ae271bc | 2015-11-15 02:50:53 +0100 | [diff] [blame] | 328 | $(SHELL) $(srcdir)/MKtermsort.sh $(AWK) $(srcdir)/../include/@TERMINFO_CAPS@ >$@ |
Amit Daniel Kachhap | e6a01f5 | 2011-07-20 11:45:59 +0530 | [diff] [blame] | 329 | |
| 330 | # |
| 331 | # Utility productions start here |
| 332 | # |
| 333 | |
| 334 | tags: |
Steve Kondik | ae271bc | 2015-11-15 02:50:53 +0100 | [diff] [blame] | 335 | $(CTAGS) *.[ch] |
Amit Daniel Kachhap | e6a01f5 | 2011-07-20 11:45:59 +0530 | [diff] [blame] | 336 | |
| 337 | @MAKE_UPPER_TAGS@TAGS: |
Steve Kondik | ae271bc | 2015-11-15 02:50:53 +0100 | [diff] [blame] | 338 | @MAKE_UPPER_TAGS@ $(ETAGS) *.[ch] |
Amit Daniel Kachhap | e6a01f5 | 2011-07-20 11:45:59 +0530 | [diff] [blame] | 339 | |
| 340 | mostlyclean :: |
| 341 | -rm -f core tags TAGS *~ *.bak *.i *.ln *.atac trace |
| 342 | |
| 343 | clean :: mostlyclean |
Steve Kondik | ae271bc | 2015-11-15 02:50:53 +0100 | [diff] [blame] | 344 | -$(SHELL) -c "if test -n '$x' ; then $(MAKE) clean x=''; fi" |
Amit Daniel Kachhap | e6a01f5 | 2011-07-20 11:45:59 +0530 | [diff] [blame] | 345 | -rm -f $(AUTO_SRC) |
| 346 | -rm -f $(PROGS) |
Steve Kondik | ae271bc | 2015-11-15 02:50:53 +0100 | [diff] [blame] | 347 | -rm -rf .libs *.dSYM |
Amit Daniel Kachhap | e6a01f5 | 2011-07-20 11:45:59 +0530 | [diff] [blame] | 348 | |
| 349 | distclean :: clean |
| 350 | -rm -f Makefile |
| 351 | |
| 352 | realclean :: distclean |
| 353 | |
| 354 | # These rules are used to allow "make -n" to work on a clean directory-tree |
| 355 | ../include/hashsize.h \ |
| 356 | ../include/parametrized.h \ |
| 357 | ../include/term.h : |
micky387 | 9b9f5e7 | 2025-07-08 18:04:53 -0400 | [diff] [blame^] | 358 | ( cd ../include && $(MAKE) $(TOP_MFLAGS) ) |
Amit Daniel Kachhap | e6a01f5 | 2011-07-20 11:45:59 +0530 | [diff] [blame] | 359 | $(DEPS_CURSES) : |
micky387 | 9b9f5e7 | 2025-07-08 18:04:53 -0400 | [diff] [blame^] | 360 | ( cd ../ncurses && $(MAKE) $(TOP_MFLAGS) ) |
Amit Daniel Kachhap | e6a01f5 | 2011-07-20 11:45:59 +0530 | [diff] [blame] | 361 | |
| 362 | lint: |
| 363 | @MAKE_TERMINFO@ $(LINT) $(LINT_OPTS) $(CPPFLAGS) $(srcdir)/tic.c $(srcdir)/dump_entry.c $(LINT_LIBS) |
micky387 | 9b9f5e7 | 2025-07-08 18:04:53 -0400 | [diff] [blame^] | 364 | @MAKE_TERMINFO@ $(LINT) $(LINT_OPTS) $(CPPFLAGS) $(srcdir)/toe.c $(LINT_LIBS) |
Amit Daniel Kachhap | e6a01f5 | 2011-07-20 11:45:59 +0530 | [diff] [blame] | 365 | $(LINT) $(LINT_OPTS) $(CPPFLAGS) $(srcdir)/clear.c $(LINT_LIBS) |
| 366 | $(LINT) $(LINT_OPTS) $(CPPFLAGS) $(srcdir)/infocmp.c $(srcdir)/dump_entry.c $(LINT_LIBS) |
Steve Kondik | ae271bc | 2015-11-15 02:50:53 +0100 | [diff] [blame] | 367 | $(LINT) $(LINT_OPTS) $(CPPFLAGS) $(srcdir)/tabs.c $(LINT_LIBS) |
Amit Daniel Kachhap | e6a01f5 | 2011-07-20 11:45:59 +0530 | [diff] [blame] | 368 | $(LINT) $(LINT_OPTS) $(CPPFLAGS) $(srcdir)/tput.c $(LINT_LIBS) |
micky387 | 9b9f5e7 | 2025-07-08 18:04:53 -0400 | [diff] [blame^] | 369 | $(LINT) $(LINT_OPTS) $(CPPFLAGS) $(srcdir)/tset.c $(LINT_LIBS) |
| 370 | |
| 371 | # Verify that each header-file can be compiled without including another. |
| 372 | check: |
| 373 | @$(SHELL) -c "for header in *.h;\ |
| 374 | do \ |
| 375 | echo \"** testing \$${header}\" ; \ |
| 376 | echo \"#include <\$${header}>\" >headers.c; \ |
| 377 | echo \"int main(void) { return 0; }\" >>headers.c; \ |
| 378 | $(CC) -c $(CFLAGS) $(CPPFLAGS) headers.c; \ |
| 379 | done" |
| 380 | -@rm -f headers.* |
Amit Daniel Kachhap | e6a01f5 | 2011-07-20 11:45:59 +0530 | [diff] [blame] | 381 | |
| 382 | ############################################################################### |
| 383 | # The remainder of this file is automatically generated during configuration |
| 384 | ############################################################################### |