source: trunk/essentials/sys-libs/ncurses/progs/Makefile.in

Last change on this file was 2621, checked in by bird, 20 years ago

GNU ncurses 5.5

File size: 9.9 KB
Line 
1# $Id: Makefile.in,v 1.65 2005/09/25 00:42:08 tom Exp $
2##############################################################################
3# Copyright (c) 1998-2003,2005 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##############################################################################
29#
30# Author: Thomas E. Dickey 1996-2003
31#
32# Makefile for ncurses source code.
33#
34# This makes the ncurses utility programs.
35#
36# The variable 'srcdir' refers to the source-distribution, and can be set with
37# the configure script by "--srcdir=DIR".
38#
39# The rules are organized to produce the libraries for the configured models,
40# and the programs with the configured default model.
41
42# turn off _all_ suffix rules; we'll generate our own
43.SUFFIXES:
44
45SHELL = /bin/sh
46THIS = Makefile
47
48CF_MFLAGS = @cf_cv_makeflags@
49@SET_MAKE@
50
51x = @EXEEXT@
52o = .@OBJEXT@
53
54MODEL = ../@DFT_OBJ_SUBDIR@
55DESTDIR = @DESTDIR@
56top_srcdir = @top_srcdir@
57srcdir = @srcdir@
58prefix = @prefix@
59exec_prefix = @exec_prefix@
60bindir = @bindir@
61libdir = @libdir@
62includedir = @includedir@
63datadir = @datadir@
64
65LIBTOOL = @LIBTOOL@
66LIBTOOL_CLEAN = @LIB_CLEAN@
67LIBTOOL_COMPILE = @LIB_COMPILE@
68LIBTOOL_LINK = @LIB_LINK@
69LIBTOOL_INSTALL = @LIB_INSTALL@
70LIBTOOL_UNINSTALL = @LIB_UNINSTALL@
71
72INSTALL = @INSTALL@
73INSTALL_PROGRAM = @INSTALL_PROGRAM@
74transform = @program_transform_name@
75
76AWK = @AWK@
77LN_S = @LN_S@
78
79CC = @CC@
80CPP = @CPP@
81CFLAGS = @CFLAGS@
82
83INCDIR = $(top_srcdir)/include
84CPPFLAGS = -I../progs -I$(srcdir) -DHAVE_CONFIG_H @CPPFLAGS@
85
86CCFLAGS = $(CPPFLAGS) $(CFLAGS)
87
88CFLAGS_LIBTOOL = $(CCFLAGS)
89CFLAGS_NORMAL = $(CCFLAGS)
90CFLAGS_DEBUG = $(CCFLAGS) @CC_G_OPT@ -DTRACE
91CFLAGS_PROFILE = $(CCFLAGS) -pg
92CFLAGS_SHARED = $(CCFLAGS) @CC_SHARED_OPTS@
93
94CFLAGS_DEFAULT = $(CFLAGS_@DFT_UPR_MODEL@)
95
96LD = @LD@
97LINK = @LINK_PROGS@ $(LIBTOOL_LINK) $(CC)
98LDFLAGS = @EXTRA_LDFLAGS@ \
99 @TINFO_ARGS@ @LDFLAGS@ @LD_MODEL@ @LIBS@
100
101LDFLAGS_LIBTOOL = $(LDFLAGS) $(CFLAGS_LIBTOOL)
102LDFLAGS_NORMAL = $(LDFLAGS) $(CFLAGS_NORMAL)
103LDFLAGS_DEBUG = $(LDFLAGS) $(CFLAGS_DEBUG)
104LDFLAGS_PROFILE = $(LDFLAGS) $(CFLAGS_PROFILE)
105LDFLAGS_SHARED = $(LDFLAGS) $(CFLAGS_SHARED) @LD_SHARED_OPTS@
106
107LDFLAGS_DEFAULT = $(LDFLAGS_@DFT_UPR_MODEL@)
108
109LINT = @LINT@
110LINT_OPTS = @LINT_OPTS@
111LINT_LIBS = -lncurses @LIBS@
112
113AUTO_SRC = \
114 termsort.c \
115 transform.h
116
117# tic and toe rely on direct access to the terminfo database
118GET_PROGS = infocmp$x clear$x tput$x tset$x
119PUT_PROGS = @MAKE_TERMINFO@ tic$x toe$x
120PROGS = $(PUT_PROGS) $(GET_PROGS)
121
122TESTPROGS = mvcur$x tctest$x hardscroll$x hashmap$x
123
124# Default library, for linking applications
125DEPS_CURSES = ../lib/@LIB_PREFIX@ncurses@DFT_DEP_SUFFIX@
126
127HEADER_DEPS = \
128 ../include/curses.h \
129 $(INCDIR)/term_entry.h \
130 $(INCDIR)/tic.h \
131 $(INCDIR)/nc_alloc.h
132
133################################################################################
134all: $(AUTO_SRC) $(PROGS)
135
136sources: $(AUTO_SRC)
137
138install: $(AUTO_SRC) install.progs
139uninstall: uninstall.progs
140
141# this line simplifies the configure-script
142libs \
143install.libs \
144uninstall.libs:
145
146TRANSFORM = sed 's/$x$$//'|sed '$(transform)'|sed 's/$$/$x/'
147
148actual_captoinfo = `echo captoinfo$x| $(TRANSFORM)`
149actual_clear = `echo clear$x| $(TRANSFORM)`
150actual_infocmp = `echo infocmp$x| $(TRANSFORM)`
151actual_infotocap = `echo infotocap$x| $(TRANSFORM)`
152actual_init = `echo init$x| $(TRANSFORM)`
153actual_reset = `echo reset$x| $(TRANSFORM)`
154actual_tic = `echo tic$x| $(TRANSFORM)`
155actual_toe = `echo toe$x| $(TRANSFORM)`
156actual_tput = `echo tput$x| $(TRANSFORM)`
157actual_tset = `echo tset$x| $(TRANSFORM)`
158
159transform.h :
160 echo "#define PROG_CAPTOINFO \"$(actual_captoinfo)\"" >$@
161 echo "#define PROG_INFOTOCAP \"$(actual_infotocap)\"" >>$@
162 echo "#define PROG_RESET \"$(actual_reset)\"" >>$@
163 echo "#define PROG_INIT \"$(actual_init)\"" >>$@
164
165install.progs: $(AUTO_SRC) $(PROGS) $(DESTDIR)$(bindir)
166@MAKE_TERMINFO@ $(LIBTOOL_INSTALL) $(INSTALL_PROGRAM) tic$x $(DESTDIR)$(bindir)/$(actual_tic)
167@MAKE_TERMINFO@ $(LIBTOOL_INSTALL) $(INSTALL_PROGRAM) toe$x $(DESTDIR)$(bindir)/$(actual_toe)
168@MAKE_TERMINFO@ @echo "linking $(actual_infotocap) to $(actual_tic)"
169@MAKE_TERMINFO@ -@rm -f $(DESTDIR)$(bindir)/$(actual_infotocap)
170@MAKE_TERMINFO@ (cd $(DESTDIR)$(bindir) && $(LN_S) $(actual_tic) $(actual_infotocap))
171@MAKE_TERMINFO@ @echo "linking $(actual_captoinfo) to $(actual_tic)"
172@MAKE_TERMINFO@ -@rm -f $(DESTDIR)$(bindir)/$(actual_captoinfo)
173@MAKE_TERMINFO@ (cd $(DESTDIR)$(bindir) && $(LN_S) $(actual_tic) $(actual_captoinfo))
174 $(LIBTOOL_INSTALL) $(INSTALL_PROGRAM) infocmp$x $(DESTDIR)$(bindir)/$(actual_infocmp)
175 $(LIBTOOL_INSTALL) $(INSTALL_PROGRAM) clear$x $(DESTDIR)$(bindir)/$(actual_clear)
176 $(LIBTOOL_INSTALL) $(INSTALL_PROGRAM) tput$x $(DESTDIR)$(bindir)/$(actual_tput)
177 $(LIBTOOL_INSTALL) $(INSTALL_PROGRAM) tset$x $(DESTDIR)$(bindir)/$(actual_tset)
178 @echo "linking $(actual_reset) to $(actual_tset)"
179 -@rm -f $(DESTDIR)$(bindir)/$(actual_reset)
180 (cd $(DESTDIR)$(bindir) && $(LN_S) $(actual_tset) $(actual_reset))
181
182uninstall.progs:
183@MAKE_TERMINFO@ -@$(LIBTOOL_CLEAN) rm -f $(DESTDIR)$(bindir)/$(actual_tic)
184@MAKE_TERMINFO@ -@$(LIBTOOL_CLEAN) rm -f $(DESTDIR)$(bindir)/$(actual_toe)
185@MAKE_TERMINFO@ -@rm -f $(DESTDIR)$(bindir)/$(actual_captoinfo)
186@MAKE_TERMINFO@ -@rm -f $(DESTDIR)$(bindir)/$(actual_infotocap)
187 -@$(LIBTOOL_CLEAN) rm -f $(DESTDIR)$(bindir)/$(actual_infocmp)
188 -@$(LIBTOOL_CLEAN) rm -f $(DESTDIR)$(bindir)/$(actual_clear)
189 -@$(LIBTOOL_CLEAN) rm -f $(DESTDIR)$(bindir)/$(actual_tput)
190 -@$(LIBTOOL_CLEAN) rm -f $(DESTDIR)$(bindir)/$(actual_tset)
191 -@rm -f $(DESTDIR)$(bindir)/$(actual_reset)
192
193$(DESTDIR)$(bindir) :
194 sh $(srcdir)/../mkinstalldirs $@
195
196#
197# Utilities normally built by make all start here
198#
199
200DEPS_TIC = \
201 $(MODEL)/tic$o \
202 $(MODEL)/dump_entry$o
203
204tic$x: $(DEPS_TIC) $(DEPS_CURSES) transform.h
205 @ECHO_LINK@ $(LINK) $(DEPS_TIC) $(LDFLAGS_DEFAULT) -o $@
206
207DEPS_TOE = \
208 $(MODEL)/toe$o \
209 $(MODEL)/dump_entry$o
210
211toe$x: $(DEPS_TOE) $(DEPS_CURSES)
212 @ECHO_LINK@ $(LINK) $(DEPS_TOE) $(LDFLAGS_DEFAULT) -o $@
213
214DEPS_CLEAR = \
215 $(MODEL)/clear$o
216
217clear$x: $(DEPS_CLEAR) $(DEPS_CURSES)
218 @ECHO_LINK@ $(LINK) $(DEPS_CLEAR) $(LDFLAGS_DEFAULT) -o $@
219
220DEPS_TPUT = \
221 $(MODEL)/tput$o
222
223tput$x: $(DEPS_TPUT) $(DEPS_CURSES) transform.h
224 @ECHO_LINK@ $(LINK) $(DEPS_TPUT) $(LDFLAGS_DEFAULT) -o $@
225
226DEPS_INFOCMP = \
227 $(MODEL)/infocmp$o \
228 $(MODEL)/dump_entry$o
229
230infocmp$x: $(DEPS_INFOCMP) $(DEPS_CURSES)
231 @ECHO_LINK@ $(LINK) $(DEPS_INFOCMP) $(LDFLAGS_DEFAULT) -o $@
232
233DEPS_TSET = \
234 $(MODEL)/tset$o \
235 $(MODEL)/dump_entry$o
236
237tset$x: $(DEPS_TSET) $(DEPS_CURSES) transform.h
238 @ECHO_LINK@ $(LINK) $(DEPS_TSET) $(LDFLAGS_DEFAULT) -o $@
239
240termsort.c: $(srcdir)/MKtermsort.sh
241 sh $(srcdir)/MKtermsort.sh $(AWK) $(srcdir)/../include/@TERMINFO_CAPS@ >$@
242
243#
244# Utility productions start here
245#
246
247tags:
248 ctags *.[ch]
249
250@MAKE_UPPER_TAGS@TAGS:
251@MAKE_UPPER_TAGS@ etags *.[ch]
252
253mostlyclean ::
254 -rm -f core tags TAGS *~ *.bak *.i *.ln *.atac trace
255 -rm -f $(TESTPROGS)
256
257clean :: mostlyclean
258 -sh -c "if test -n '$x' ; then $(MAKE) clean x=''; fi"
259 -rm -f $(AUTO_SRC)
260 -rm -f $(PROGS)
261 -rm -rf .libs
262
263distclean :: clean
264 -rm -f Makefile
265
266realclean :: distclean
267
268# These rules are used to allow "make -n" to work on a clean directory-tree
269../include/hashsize.h \
270../include/parametrized.h \
271../include/term.h :
272 cd ../include; $(MAKE) $(CF_MFLAGS)
273$(DEPS_CURSES) :
274 cd ../ncurses; $(MAKE) $(CF_MFLAGS)
275
276lint:
277@MAKE_TERMINFO@ $(LINT) $(LINT_OPTS) $(CPPFLAGS) $(srcdir)/tic.c $(srcdir)/dump_entry.c $(LINT_LIBS)
278@MAKE_TERMINFO@ $(LINT) $(LINT_OPTS) $(CPPFLAGS) $(srcdir)/toe.c $(srcdir)/dump_entry.c $(LINT_LIBS)
279 $(LINT) $(LINT_OPTS) $(CPPFLAGS) $(srcdir)/clear.c $(LINT_LIBS)
280 $(LINT) $(LINT_OPTS) $(CPPFLAGS) $(srcdir)/infocmp.c $(srcdir)/dump_entry.c $(LINT_LIBS)
281 $(LINT) $(LINT_OPTS) $(CPPFLAGS) $(srcdir)/tput.c $(LINT_LIBS)
282 $(LINT) $(LINT_OPTS) $(CPPFLAGS) $(srcdir)/tset.c $(srcdir)/dump_entry.c $(LINT_LIBS)
283
284###############################################################################
285# The remainder of this file is automatically generated during configuration
286###############################################################################
Note: See TracBrowser for help on using the repository browser.