]> ncurses.scripts.mit.edu Git - ncurses.git/blob - progs/Makefile.in
ncurses 4.2
[ncurses.git] / progs / Makefile.in
1 # $Id: Makefile.in,v 1.35 1998/02/11 12:14:03 tom Exp $
2 ##############################################################################
3 # Copyright (c) 1998 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 <dickey@clark.net> 1996,1997
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
45 SHELL           = /bin/sh
46 THIS            = Makefile
47
48 CF_MFLAGS       = @cf_cv_makeflags@
49 @SET_MAKE@
50 x               = @PROG_EXT@
51
52 MODEL           = ../@DFT_OBJ_SUBDIR@
53 INSTALL_PREFIX  = @INSTALL_PREFIX@
54 srcdir          = @srcdir@
55 prefix          = @prefix@
56 exec_prefix     = @exec_prefix@
57 bindir          = @bindir@
58 libdir          = @libdir@
59 includedir      = @includedir@
60 datadir         = @datadir@
61
62 ticdir          = $(datadir)/terminfo
63
64 INSTALL         = @INSTALL@
65 INSTALL_PROGRAM = @INSTALL_PROGRAM@
66
67 AWK             = @AWK@
68 LN_S            = @LN_S@
69
70 CC              = @CC@
71 CFLAGS          = @CFLAGS@
72
73 INCDIR          = $(srcdir)/../include
74 CPPFLAGS        = -I../progs -I$(srcdir) @CPPFLAGS@ \
75                   -DHAVE_CONFIG_H -DTERMINFO=\"$(ticdir)\"
76
77 CCFLAGS         = $(CPPFLAGS) $(CFLAGS)
78
79 CFLAGS_NORMAL   = $(CCFLAGS)
80 CFLAGS_DEBUG    = $(CCFLAGS) @CC_G_OPT@ -DTRACE
81 CFLAGS_PROFILE  = $(CCFLAGS) -pg
82 CFLAGS_SHARED   = $(CCFLAGS) # @CC_SHARED_OPTS@
83
84 CFLAGS_DEFAULT  = $(CFLAGS_@DFT_UPR_MODEL@)
85
86 LD              = @LD@
87 LINK            = $(CC)
88 LDFLAGS         = @EXTRA_LDFLAGS@ \
89                 @PROG_ARGS@ @LDFLAGS@ @LD_MODEL@ @LIBS@ @EXTRA_LIBS@
90
91 LDFLAGS_NORMAL  = $(LDFLAGS)
92 LDFLAGS_DEBUG   = $(LDFLAGS) @CC_G_OPT@
93 LDFLAGS_PROFILE = $(LDFLAGS) -pg
94 LDFLAGS_SHARED  = $(LDFLAGS) @CC_SHARED_OPTS@ # @LD_SHARED_OPTS@
95
96 LDFLAGS_DEFAULT = $(LDFLAGS_@DFT_UPR_MODEL@)
97
98 LINT            = @LINT@
99 LINT_OPTS       = @LINT_OPTS@
100 LINT_LIBS       = -lncurses @LIBS@
101
102 AUTO_SRC = \
103         termsort.c
104
105 PROGS = tic$x toe$x infocmp$x clear$x tput$x tset$x
106
107 TESTPROGS = mvcur$x tctest$x hardscroll$x hashmap$x
108
109 # Default library, for linking applications
110 DEPS_CURSES = @LIB_PREFIX@ncurses@DFT_DEP_SUFFIX@
111
112 ################################################################################
113 all:            $(AUTO_SRC) $(PROGS) 
114
115 sources:        $(AUTO_SRC)
116
117 install: install.progs 
118 uninstall: uninstall.progs 
119
120 # this line simplifies the configure-script
121 install.libs:
122 uninstall.libs:
123
124 install.progs: $(PROGS) $(INSTALL_PREFIX)$(bindir)
125         $(INSTALL_PROGRAM) tic$x     $(INSTALL_PREFIX)$(bindir)/tic$x
126         $(INSTALL_PROGRAM) toe$x     $(INSTALL_PREFIX)$(bindir)/toe$x
127         $(INSTALL_PROGRAM) infocmp$x $(INSTALL_PREFIX)$(bindir)/infocmp$x
128         $(INSTALL_PROGRAM) clear$x   $(INSTALL_PREFIX)$(bindir)/clear$x
129         $(INSTALL_PROGRAM) tput$x    $(INSTALL_PREFIX)$(bindir)/tput$x
130         $(INSTALL_PROGRAM) tset$x    $(INSTALL_PREFIX)$(bindir)/tset$x
131         @echo "linking captoinfo to tic"
132         -@rm -f $(INSTALL_PREFIX)$(bindir)/captoinfo$x
133         (cd $(INSTALL_PREFIX)$(bindir) && $(LN_S) tic$x captoinfo$x)
134         @echo "linking infotocap to tic"
135         -@rm -f $(INSTALL_PREFIX)$(bindir)/infotocap$x
136         (cd $(INSTALL_PREFIX)$(bindir) && $(LN_S) tic$x infotocap$x)
137         @echo "linking reset to tset"
138         -@rm -f $(INSTALL_PREFIX)$(bindir)/reset$x
139         (cd $(INSTALL_PREFIX)$(bindir) && $(LN_S) tset$x reset$x)
140
141 uninstall.progs:
142         -@rm -f $(INSTALL_PREFIX)$(bindir)/tic$x
143         -@rm -f $(INSTALL_PREFIX)$(bindir)/toe$x
144         -@rm -f $(INSTALL_PREFIX)$(bindir)/infocmp$x
145         -@rm -f $(INSTALL_PREFIX)$(bindir)/clear$x
146         -@rm -f $(INSTALL_PREFIX)$(bindir)/tput$x
147         -@rm -f $(INSTALL_PREFIX)$(bindir)/tset$x
148         -@rm -f $(INSTALL_PREFIX)$(bindir)/captoinfo$x
149         -@rm -f $(INSTALL_PREFIX)$(bindir)/infotocap$x
150         -@rm -f $(INSTALL_PREFIX)$(bindir)/reset$x
151
152 $(INSTALL_PREFIX)$(bindir) :
153         $(srcdir)/../mkinstalldirs $@
154
155 #
156 # Utilities normally built by make all start here
157 #
158
159 DEPS_TIC = \
160         $(MODEL)/tic.o \
161         $(MODEL)/dump_entry.o
162
163 tic$x: $(DEPS_TIC) $(DEPS_CURSES)
164         @ECHO_LINK@ $(LINK) $(DEPS_TIC) $(LDFLAGS_DEFAULT) -o $@
165
166 DEPS_TOE = \
167         $(MODEL)/toe.o \
168         $(MODEL)/dump_entry.o
169
170 toe$x: $(DEPS_TOE) $(DEPS_CURSES)
171         @ECHO_LINK@ $(LINK) $(DEPS_TOE) $(LDFLAGS_DEFAULT) -o $@
172
173 DEPS_CLEAR = \
174         $(MODEL)/clear.o
175
176 clear$x: $(DEPS_CLEAR) $(DEPS_CURSES)
177         @ECHO_LINK@ $(LINK) $(DEPS_CLEAR) $(LDFLAGS_DEFAULT) -o $@
178
179 DEPS_TPUT = \
180         $(MODEL)/tput.o
181
182 tput$x: $(DEPS_TPUT) $(DEPS_CURSES)
183         @ECHO_LINK@ $(LINK) $(DEPS_TPUT) $(LDFLAGS_DEFAULT) -o $@
184
185 DEPS_INFOCMP = \
186         $(MODEL)/infocmp.o \
187         $(MODEL)/dump_entry.o
188
189 infocmp$x: $(DEPS_INFOCMP) $(DEPS_CURSES)
190         @ECHO_LINK@ $(LINK) $(DEPS_INFOCMP) $(LDFLAGS_DEFAULT) -o $@
191
192 DEPS_TSET = \
193         $(MODEL)/tset.o \
194         $(MODEL)/dump_entry.o
195
196 tset$x: $(DEPS_TSET) $(DEPS_CURSES)
197         @ECHO_LINK@ $(LINK) $(DEPS_TSET) $(LDFLAGS_DEFAULT) -o $@
198
199 termsort.c: $(srcdir)/MKtermsort.sh
200         sh -c "$(srcdir)/MKtermsort.sh $(AWK) $(srcdir)/../include/Caps" >$@
201
202 #
203 # Utility productions start here
204 #
205
206 tags:
207         ctags *.[ch]
208
209 TAGS:
210         etags *.[ch]
211
212 mostlyclean ::
213         -rm -f core tags TAGS *~ *.ln *.atac trace
214         -rm -f $(TESTPROGS)
215
216 clean :: mostlyclean
217         -rm -f $(AUTO_SRC)
218         -rm -f $(PROGS)
219
220 distclean :: clean
221         -rm -f Makefile
222
223 realclean :: distclean
224
225 # These rules are used to allow "make -n" to work on a clean directory-tree
226 ../include/hashsize.h \
227 ../include/parametrized.h \
228 ../include/term.h :
229         cd ../include; $(MAKE) $(CF_MFLAGS)
230 $(DEPS_CURSES) :
231         cd ../ncurses; $(MAKE) $(CF_MFLAGS)
232
233 lint:
234         $(LINT) $(LINT_OPTS) $(CPPFLAGS) $(srcdir)/clear.c                          $(LINT_LIBS)
235         $(LINT) $(LINT_OPTS) $(CPPFLAGS) $(srcdir)/infocmp.c $(srcdir)/dump_entry.c $(LINT_LIBS)
236         $(LINT) $(LINT_OPTS) $(CPPFLAGS) $(srcdir)/tic.c     $(srcdir)/dump_entry.c $(LINT_LIBS)
237         $(LINT) $(LINT_OPTS) $(CPPFLAGS) $(srcdir)/toe.c     $(srcdir)/dump_entry.c $(LINT_LIBS)
238         $(LINT) $(LINT_OPTS) $(CPPFLAGS) $(srcdir)/tput.c                           $(LINT_LIBS)
239         $(LINT) $(LINT_OPTS) $(CPPFLAGS) $(srcdir)/tset.c    $(srcdir)/dump_entry.c $(LINT_LIBS)
240
241 ###############################################################################
242 # The remainder of this file is automatically generated during configuration
243 ###############################################################################