Remove tm.h and xm.h handling, as it wasn't used. Use nm.h only when needed.
[dragonfly.git] / contrib / ncurses-5.4 / progs / Makefile.in
blobc40cd00c5ce0e58419b0284a54dd1b1ed09369fe
1 # $Id: Makefile.in,v 1.62 2003/11/01 22:45:57 tom Exp $
2 ##############################################################################
3 # Copyright (c) 1998-2002,2003 Free Software Foundation, Inc. #
4 # #
5 # Permission is hereby granted, free of charge, to any person obtaining a #
6 # copy of this software and associated documentation files (the "Software"), #
7 # to deal in the Software without restriction, including without limitation #
8 # the rights to use, copy, modify, merge, publish, distribute, distribute #
9 # with modifications, sublicense, and/or sell copies of the Software, and to #
10 # permit persons to whom the Software is furnished to do so, subject to the #
11 # following conditions: #
12 # #
13 # The above copyright notice and this permission notice shall be included in #
14 # all copies or substantial portions of the Software. #
15 # #
16 # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR #
17 # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, #
18 # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL #
19 # THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER #
20 # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING #
21 # FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER #
22 # DEALINGS IN THE SOFTWARE. #
23 # #
24 # Except as contained in this notice, the name(s) of the above copyright #
25 # holders shall not be used in advertising or otherwise to promote the sale, #
26 # use or other dealings in this Software without prior written #
27 # authorization. #
28 ##############################################################################
30 # Author: Thomas E. Dickey 1996-2003
32 # Makefile for ncurses source code.
34 # This makes the ncurses utility programs.
36 # The variable 'srcdir' refers to the source-distribution, and can be set with
37 # the configure script by "--srcdir=DIR".
39 # The rules are organized to produce the libraries for the configured models,
40 # and the programs with the configured default model.
42 # turn off _all_ suffix rules; we'll generate our own
43 .SUFFIXES:
45 SHELL = /bin/sh
46 THIS = Makefile
48 CF_MFLAGS = @cf_cv_makeflags@
49 @SET_MAKE@
51 x = @EXEEXT@
52 o = .@OBJEXT@
54 MODEL = ../@DFT_OBJ_SUBDIR@
55 DESTDIR = @DESTDIR@
56 srcdir = @srcdir@
57 prefix = @prefix@
58 exec_prefix = @exec_prefix@
59 bindir = @bindir@
60 libdir = @libdir@
61 includedir = @includedir@
62 datadir = @datadir@
64 LIBTOOL = @LIBTOOL@
65 LIBTOOL_CLEAN = @LIB_CLEAN@
66 LIBTOOL_COMPILE = @LIB_COMPILE@
67 LIBTOOL_LINK = @LIB_LINK@
68 LIBTOOL_INSTALL = @LIB_INSTALL@
69 LIBTOOL_UNINSTALL = @LIB_UNINSTALL@
71 INSTALL = @INSTALL@
72 INSTALL_PROGRAM = @INSTALL_PROGRAM@
73 transform = @program_transform_name@
75 AWK = @AWK@
76 LN_S = @LN_S@
78 CC = @CC@
79 CPP = @CPP@
80 CFLAGS = @CFLAGS@
82 INCDIR = $(srcdir)/../include
83 CPPFLAGS = -I../progs -I$(srcdir) -DHAVE_CONFIG_H @CPPFLAGS@
85 CCFLAGS = $(CPPFLAGS) $(CFLAGS)
87 CFLAGS_LIBTOOL = $(CCFLAGS)
88 CFLAGS_NORMAL = $(CCFLAGS)
89 CFLAGS_DEBUG = $(CCFLAGS) @CC_G_OPT@ -DTRACE
90 CFLAGS_PROFILE = $(CCFLAGS) -pg
91 CFLAGS_SHARED = $(CCFLAGS) @CC_SHARED_OPTS@
93 CFLAGS_DEFAULT = $(CFLAGS_@DFT_UPR_MODEL@)
95 LD = @LD@
96 LINK = @LINK_PROGS@ $(LIBTOOL_LINK) $(CC)
97 LDFLAGS = @EXTRA_LDFLAGS@ \
98 @PROG_ARGS@ @LDFLAGS@ @LD_MODEL@ @LIBS@ @EXTRA_LIBS@
100 LDFLAGS_LIBTOOL = $(LDFLAGS) $(CFLAGS_LIBTOOL)
101 LDFLAGS_NORMAL = $(LDFLAGS) $(CFLAGS_NORMAL)
102 LDFLAGS_DEBUG = $(LDFLAGS) $(CFLAGS_DEBUG)
103 LDFLAGS_PROFILE = $(LDFLAGS) $(CFLAGS_PROFILE)
104 LDFLAGS_SHARED = $(LDFLAGS) $(CFLAGS_SHARED) @LD_SHARED_OPTS@
106 LDFLAGS_DEFAULT = $(LDFLAGS_@DFT_UPR_MODEL@)
108 LINT = @LINT@
109 LINT_OPTS = @LINT_OPTS@
110 LINT_LIBS = -lncurses @LIBS@
112 AUTO_SRC = \
113 termsort.c \
114 transform.h
116 # tic and toe rely on direct access to the terminfo database
117 GET_PROGS = infocmp$x clear$x tput$x tset$x
118 PUT_PROGS = @MAKE_TERMINFO@ tic$x toe$x
119 PROGS = $(PUT_PROGS) $(GET_PROGS)
121 TESTPROGS = mvcur$x tctest$x hardscroll$x hashmap$x
123 # Default library, for linking applications
124 DEPS_CURSES = ../lib/@LIB_PREFIX@ncurses@DFT_DEP_SUFFIX@
126 ################################################################################
127 all: $(AUTO_SRC) $(PROGS)
129 sources: $(AUTO_SRC)
131 install: $(AUTO_SRC) install.progs
132 uninstall: uninstall.progs
134 # this line simplifies the configure-script
135 libs \
136 install.libs \
137 uninstall.libs:
139 TRANSFORM = sed 's/$x$$//'|sed '$(transform)'|sed 's/$$/$x/'
141 actual_captoinfo = `echo captoinfo$x| $(TRANSFORM)`
142 actual_clear = `echo clear$x| $(TRANSFORM)`
143 actual_infocmp = `echo infocmp$x| $(TRANSFORM)`
144 actual_infotocap = `echo infotocap$x| $(TRANSFORM)`
145 actual_init = `echo init$x| $(TRANSFORM)`
146 actual_reset = `echo reset$x| $(TRANSFORM)`
147 actual_tic = `echo tic$x| $(TRANSFORM)`
148 actual_toe = `echo toe$x| $(TRANSFORM)`
149 actual_tput = `echo tput$x| $(TRANSFORM)`
150 actual_tset = `echo tset$x| $(TRANSFORM)`
152 transform.h :
153 echo "#define PROG_CAPTOINFO \"$(actual_captoinfo)\"" >$@
154 echo "#define PROG_INFOTOCAP \"$(actual_infotocap)\"" >>$@
155 echo "#define PROG_RESET \"$(actual_reset)\"" >>$@
156 echo "#define PROG_INIT \"$(actual_init)\"" >>$@
158 install.progs: $(AUTO_SRC) $(PROGS) $(DESTDIR)$(bindir)
159 @MAKE_TERMINFO@ $(LIBTOOL_INSTALL) $(INSTALL_PROGRAM) tic$x $(DESTDIR)$(bindir)/$(actual_tic)
160 @MAKE_TERMINFO@ $(LIBTOOL_INSTALL) $(INSTALL_PROGRAM) toe$x $(DESTDIR)$(bindir)/$(actual_toe)
161 @MAKE_TERMINFO@ @echo "linking $(actual_infotocap) to $(actual_tic)"
162 @MAKE_TERMINFO@ -@rm -f $(DESTDIR)$(bindir)/$(actual_infotocap)
163 @MAKE_TERMINFO@ (cd $(DESTDIR)$(bindir) && $(LN_S) $(actual_tic) $(actual_infotocap))
164 @MAKE_TERMINFO@ @echo "linking $(actual_captoinfo) to $(actual_tic)"
165 @MAKE_TERMINFO@ -@rm -f $(DESTDIR)$(bindir)/$(actual_captoinfo)
166 @MAKE_TERMINFO@ (cd $(DESTDIR)$(bindir) && $(LN_S) $(actual_tic) $(actual_captoinfo))
167 $(LIBTOOL_INSTALL) $(INSTALL_PROGRAM) infocmp$x $(DESTDIR)$(bindir)/$(actual_infocmp)
168 $(LIBTOOL_INSTALL) $(INSTALL_PROGRAM) clear$x $(DESTDIR)$(bindir)/$(actual_clear)
169 $(LIBTOOL_INSTALL) $(INSTALL_PROGRAM) tput$x $(DESTDIR)$(bindir)/$(actual_tput)
170 $(LIBTOOL_INSTALL) $(INSTALL_PROGRAM) tset$x $(DESTDIR)$(bindir)/$(actual_tset)
171 @echo "linking $(actual_reset) to $(actual_tset)"
172 -@rm -f $(DESTDIR)$(bindir)/$(actual_reset)
173 (cd $(DESTDIR)$(bindir) && $(LN_S) $(actual_tset) $(actual_reset))
175 uninstall.progs:
176 @MAKE_TERMINFO@ -@$(LIBTOOL_CLEAN) rm -f $(DESTDIR)$(bindir)/$(actual_tic)
177 @MAKE_TERMINFO@ -@$(LIBTOOL_CLEAN) rm -f $(DESTDIR)$(bindir)/$(actual_toe)
178 @MAKE_TERMINFO@ -@rm -f $(DESTDIR)$(bindir)/$(actual_captoinfo)
179 @MAKE_TERMINFO@ -@rm -f $(DESTDIR)$(bindir)/$(actual_infotocap)
180 -@$(LIBTOOL_CLEAN) rm -f $(DESTDIR)$(bindir)/$(actual_infocmp)
181 -@$(LIBTOOL_CLEAN) rm -f $(DESTDIR)$(bindir)/$(actual_clear)
182 -@$(LIBTOOL_CLEAN) rm -f $(DESTDIR)$(bindir)/$(actual_tput)
183 -@$(LIBTOOL_CLEAN) rm -f $(DESTDIR)$(bindir)/$(actual_tset)
184 -@rm -f $(DESTDIR)$(bindir)/$(actual_reset)
186 $(DESTDIR)$(bindir) :
187 sh $(srcdir)/../mkinstalldirs $@
190 # Utilities normally built by make all start here
193 DEPS_TIC = \
194 $(MODEL)/tic$o \
195 $(MODEL)/dump_entry$o
197 tic$x: $(DEPS_TIC) $(DEPS_CURSES) transform.h
198 @ECHO_LINK@ $(LINK) $(DEPS_TIC) $(LDFLAGS_DEFAULT) -o $@
200 DEPS_TOE = \
201 $(MODEL)/toe$o \
202 $(MODEL)/dump_entry$o
204 toe$x: $(DEPS_TOE) $(DEPS_CURSES)
205 @ECHO_LINK@ $(LINK) $(DEPS_TOE) $(LDFLAGS_DEFAULT) -o $@
207 DEPS_CLEAR = \
208 $(MODEL)/clear$o
210 clear$x: $(DEPS_CLEAR) $(DEPS_CURSES)
211 @ECHO_LINK@ $(LINK) $(DEPS_CLEAR) $(LDFLAGS_DEFAULT) -o $@
213 DEPS_TPUT = \
214 $(MODEL)/tput$o
216 tput$x: $(DEPS_TPUT) $(DEPS_CURSES) transform.h
217 @ECHO_LINK@ $(LINK) $(DEPS_TPUT) $(LDFLAGS_DEFAULT) -o $@
219 DEPS_INFOCMP = \
220 $(MODEL)/infocmp$o \
221 $(MODEL)/dump_entry$o
223 infocmp$x: $(DEPS_INFOCMP) $(DEPS_CURSES)
224 @ECHO_LINK@ $(LINK) $(DEPS_INFOCMP) $(LDFLAGS_DEFAULT) -o $@
226 DEPS_TSET = \
227 $(MODEL)/tset$o \
228 $(MODEL)/dump_entry$o
230 tset$x: $(DEPS_TSET) $(DEPS_CURSES) transform.h
231 @ECHO_LINK@ $(LINK) $(DEPS_TSET) $(LDFLAGS_DEFAULT) -o $@
233 termsort.c: $(srcdir)/MKtermsort.sh
234 sh $(srcdir)/MKtermsort.sh $(AWK) $(srcdir)/../include/@TERMINFO_CAPS@ >$@
237 # Utility productions start here
240 tags:
241 ctags *.[ch]
243 @MAKE_UPPER_TAGS@TAGS:
244 @MAKE_UPPER_TAGS@ etags *.[ch]
246 mostlyclean ::
247 -rm -f core tags TAGS *~ *.bak *.i *.ln *.atac trace
248 -rm -f $(TESTPROGS)
250 clean :: mostlyclean
251 -sh -c "if test -n '$x' ; then $(MAKE) clean x=''; fi"
252 -rm -f $(AUTO_SRC)
253 -rm -f $(PROGS)
254 -rm -rf .libs
256 distclean :: clean
257 -rm -f Makefile
259 realclean :: distclean
261 # These rules are used to allow "make -n" to work on a clean directory-tree
262 ../include/hashsize.h \
263 ../include/parametrized.h \
264 ../include/term.h :
265 cd ../include; $(MAKE) $(CF_MFLAGS)
266 $(DEPS_CURSES) :
267 cd ../ncurses; $(MAKE) $(CF_MFLAGS)
269 lint:
270 @MAKE_TERMINFO@ $(LINT) $(LINT_OPTS) $(CPPFLAGS) $(srcdir)/tic.c $(srcdir)/dump_entry.c $(LINT_LIBS)
271 @MAKE_TERMINFO@ $(LINT) $(LINT_OPTS) $(CPPFLAGS) $(srcdir)/toe.c $(srcdir)/dump_entry.c $(LINT_LIBS)
272 $(LINT) $(LINT_OPTS) $(CPPFLAGS) $(srcdir)/clear.c $(LINT_LIBS)
273 $(LINT) $(LINT_OPTS) $(CPPFLAGS) $(srcdir)/infocmp.c $(srcdir)/dump_entry.c $(LINT_LIBS)
274 $(LINT) $(LINT_OPTS) $(CPPFLAGS) $(srcdir)/tput.c $(LINT_LIBS)
275 $(LINT) $(LINT_OPTS) $(CPPFLAGS) $(srcdir)/tset.c $(srcdir)/dump_entry.c $(LINT_LIBS)
277 ###############################################################################
278 # The remainder of this file is automatically generated during configuration
279 ###############################################################################