]> ncurses.scripts.mit.edu Git - ncurses.git/blob - progs/Makefile.in
ncurses 4.1
[ncurses.git] / progs / Makefile.in
1 # $Id: Makefile.in,v 1.21 1997/02/15 20:03:34 tom Exp $
2 ################################################################################
3 # Copyright 1996,1997 by Thomas E. Dickey <dickey@clark.net>                   #
4 # All Rights Reserved.                                                         #
5 #                                                                              #
6 # Permission to use, copy, modify, and distribute this software and its        #
7 # documentation for any purpose and without fee is hereby granted, provided    #
8 # that the above copyright notice appear in all copies and that both that      #
9 # copyright notice and this permission notice appear in supporting             #
10 # documentation, and that the name of the above listed copyright holder(s) not #
11 # be used in advertising or publicity pertaining to distribution of the        #
12 # software without specific, written prior permission. THE ABOVE LISTED        #
13 # COPYRIGHT HOLDER(S) DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,    #
14 # INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT #
15 # SHALL THE ABOVE LISTED COPYRIGHT HOLDER(S) BE LIABLE FOR ANY SPECIAL,        #
16 # INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM   #
17 # LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE   #
18 # OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR    #
19 # PERFORMANCE OF THIS SOFTWARE.                                                #
20 ################################################################################
21 # Makefile for ncurses source code.
22 #
23 # This makes the ncurses utility programs.
24 #
25 # The variable 'srcdir' refers to the source-distribution, and can be set with
26 # the configure script by "--srcdir=DIR".
27 #
28 # The rules are organized to produce the libraries for the configured models,
29 # and the programs with the configured default model.
30
31 # turn off _all_ suffix rules; we'll generate our own
32 .SUFFIXES:
33
34 SHELL           = /bin/sh
35 THIS            = Makefile
36
37 NC_MFLAGS       = @nc_cv_makeflags@
38 @SET_MAKE@
39
40 MODEL           = ../@DFT_OBJ_SUBDIR@
41 INSTALL_PREFIX  = @INSTALL_PREFIX@
42 srcdir          = @srcdir@
43 prefix          = @prefix@
44 exec_prefix     = @exec_prefix@
45 bindir          = @bindir@
46 includedir      = @includedir@
47 datadir         = @datadir@
48
49 ticdir          = $(datadir)/terminfo
50
51 INSTALL         = @INSTALL@
52 INSTALL_PROGRAM = @INSTALL_PROGRAM@
53
54 AWK             = @AWK@
55 LN_S            = @LN_S@
56
57 CC              = @CC@
58 CFLAGS          = @CFLAGS@
59
60 INCDIR          = $(srcdir)/../include
61 CPPFLAGS        = -I../progs -I$(srcdir) @CPPFLAGS@ \
62                   -DHAVE_CONFIG_H -DTERMINFO=\"$(ticdir)\"
63
64 CCFLAGS         = $(CPPFLAGS) $(CFLAGS)
65
66 CFLAGS_NORMAL   = $(CCFLAGS)
67 CFLAGS_DEBUG    = $(CCFLAGS) @CC_G_OPT@ -DTRACE
68 CFLAGS_PROFILE  = $(CCFLAGS) -pg
69 CFLAGS_SHARED   = $(CCFLAGS) @CC_SHARED_OPTS@
70
71 CFLAGS_DEFAULT  = $(CFLAGS_@DFT_UPR_MODEL@)
72
73 LD              = @LD@
74 LINK            = $(CC)
75 LDFLAGS         = -L../lib -lncurses@DFT_ARG_SUFFIX@ @LDFLAGS@ @LD_MODEL@ @LIBS@ @EXTRA_LIBS@
76
77 LDFLAGS_NORMAL  = $(LDFLAGS)
78 LDFLAGS_DEBUG   = $(LDFLAGS) @CC_G_OPT@
79 LDFLAGS_PROFILE = $(LDFLAGS) -pg
80 LDFLAGS_SHARED  = $(LDFLAGS) @CC_SHARED_OPTS@
81
82 LDFLAGS_DEFAULT = $(LDFLAGS_@DFT_UPR_MODEL@)
83
84 LINT            = @LINT@
85 LINT_OPTS       = @LINT_OPTS@
86 LINT_LIBS       = -lncurses @LIBS@
87
88 AUTO_SRC = \
89         termsort.c
90
91 PROGS = tic toe infocmp clear tput tset
92
93 TESTPROGS = mvcur tctest hardscroll hashmap
94
95 # Default library, for linking applications
96 DEPS_CURSES = ../lib/libncurses@DFT_DEP_SUFFIX@
97
98 ################################################################################
99 all:    $(AUTO_SRC) $(PROGS) 
100
101 install: install.progs 
102
103 # this line simplifies the configure-script
104 install.libs:
105
106 install.progs: $(PROGS) $(INSTALL_PREFIX)$(bindir)
107         $(INSTALL_PROGRAM) tic     $(INSTALL_PREFIX)$(bindir)/tic
108         $(INSTALL_PROGRAM) toe     $(INSTALL_PREFIX)$(bindir)/toe
109         $(INSTALL_PROGRAM) infocmp $(INSTALL_PREFIX)$(bindir)/infocmp
110         $(INSTALL_PROGRAM) clear   $(INSTALL_PREFIX)$(bindir)/clear
111         $(INSTALL_PROGRAM) tput    $(INSTALL_PREFIX)$(bindir)/tput
112         $(INSTALL_PROGRAM) tset    $(INSTALL_PREFIX)$(bindir)/tset
113         @echo "linking captoinfo to tic"
114         -@rm -f $(INSTALL_PREFIX)$(bindir)/captoinfo
115         (cd $(INSTALL_PREFIX)$(bindir) && $(LN_S) tic captoinfo)
116         @echo "linking reset to tset"
117         -@rm -f $(INSTALL_PREFIX)$(bindir)/reset
118         (cd $(INSTALL_PREFIX)$(bindir) && $(LN_S) tset reset)
119
120 $(INSTALL_PREFIX)$(bindir) :
121         $(srcdir)/../mkinstalldirs $@
122
123 #
124 # Utilities normally built by make all start here
125 #
126
127 DEPS_TIC = \
128         $(MODEL)/tic.o \
129         $(MODEL)/dump_entry.o
130
131 tic: $(DEPS_TIC) $(DEPS_CURSES)
132         @ECHO_LINK@ $(LINK) $(DEPS_TIC) $(LDFLAGS_DEFAULT) -o $@
133
134 DEPS_TOE = \
135         $(MODEL)/toe.o \
136         $(MODEL)/dump_entry.o
137
138 toe: $(DEPS_TOE) $(DEPS_CURSES)
139         @ECHO_LINK@ $(LINK) $(DEPS_TOE) $(LDFLAGS_DEFAULT) -o $@
140
141 DEPS_CLEAR = \
142         $(MODEL)/clear.o
143
144 clear: $(DEPS_CLEAR) $(DEPS_CURSES)
145         @ECHO_LINK@ $(LINK) $(DEPS_CLEAR) $(LDFLAGS_DEFAULT) -o $@
146
147 DEPS_TPUT = \
148         $(MODEL)/tput.o
149
150 tput: $(DEPS_TPUT) $(DEPS_CURSES)
151         @ECHO_LINK@ $(LINK) $(DEPS_TPUT) $(LDFLAGS_DEFAULT) -o $@
152
153 DEPS_INFOCMP = \
154         $(MODEL)/infocmp.o \
155         $(MODEL)/dump_entry.o
156
157 infocmp: $(DEPS_INFOCMP) $(DEPS_CURSES)
158         @ECHO_LINK@ $(LINK) $(DEPS_INFOCMP) $(LDFLAGS_DEFAULT) -o $@
159
160 DEPS_TSET = \
161         $(MODEL)/tset.o \
162         $(MODEL)/dump_entry.o
163
164 tset: $(DEPS_TSET) $(DEPS_CURSES)
165         @ECHO_LINK@ $(LINK) $(DEPS_TSET) $(LDFLAGS_DEFAULT) -o $@
166
167 termsort.c: $(srcdir)/MKtermsort.sh
168         sh -c "$(srcdir)/MKtermsort.sh $(AWK) $(srcdir)/../include/Caps" >$@
169
170 #
171 # Test programs (not normally built by make all) start here.
172 #
173
174 # Cursor movement optimization tester. Use -g for debugging but -O if you're
175 # profiling with intent to determine COMPUTE_OVERHEAD
176 MVFLAGS = -O
177 DEPS_MVCUR = \
178         $(srcdir)/../ncurses/lib_mvcur.c \
179         $(MODEL)/dump_entry.o
180
181 mvcur: $(DEPS_MVCUR) $(DEPS_CURSES)
182         @ECHO_LINK@ $(LINK) $(CCFLAGS) -DTRACE -DMAIN $(MVFLAGS) $(DEPS_MVCUR) $(LDFLAGS_DEFAULT) -o $@
183
184 # Termcap-conversion tester
185 DEPS_TCTEST = \
186         $(srcdir)/../ncurses/captoinfo.c
187
188 tctest: $(DEPS_TCTEST) $(DEPS_CURSES)
189         @ECHO_LINK@ $(LINK) $(CCFLAGS) -DTRACE -DMAIN $(DEPS_TCTEST) $(LDFLAGS_DEFAULT) -o $@
190
191 # Demonstrator/tester for hardware-scrolling algorithm.
192 DEPS_HARDSCROLL = \
193         $(srcdir)/../ncurses/hardscroll.c \
194         $(MODEL)/lib_trace.o    
195 hardscroll: 
196         @ECHO_LINK@ $(LINK) $(CCFLAGS) -I$(srcdir)/../ncurses -DTRACE -DSCROLLDEBUG $(DEPS_HARDSCROLL) $(LDFLAGS_DEFAULT) -o $@
197
198 # Demonstrator-tester for enhanced hardware-scrolling code with hash mapping
199 DEPS_HASHMAP = \
200         $(srcdir)/../ncurses/hashmap.c \
201         $(srcdir)/../ncurses/hardscroll.c \
202         $(MODEL)/lib_trace.o    
203 hashmap: $(DEPS_HASHMAP)
204         @ECHO_LINK@ $(LINK) $(CCFLAGS) -I$(srcdir)/../ncurses -DTRACE  -DHASHDEBUG $(DEPS_HASHMAP) -o $@
205
206 #
207 # Utility productions start here
208 #
209
210 tags:
211         ctags *.[ch]
212
213 TAGS:
214         etags *.[ch]
215
216 clean ::
217         -rm -f tags TAGS do.tic *~
218         -rm -f $(AUTO_SRC) $(TESTPROGS)
219         -rm -f $(PROGS)
220
221 distclean :: clean
222         -rm -f Makefile
223
224 mostlyclean :: clean
225
226 realclean :: distclean
227
228 # These rules are used to allow "make -n" to work on a clean directory-tree
229 ../include/hashsize.h \
230 ../include/parametrized.h \
231 ../include/term.h :
232         cd ../include; $(MAKE) $(NC_MFLAGS)
233 $(DEPS_CURSES) :
234         cd ../ncurses; $(MAKE) $(NC_MFLAGS)
235
236 lint:
237         $(LINT) $(LINT_OPTS) $(CPPFLAGS) $(srcdir)/clear.c                          $(LINT_LIBS)
238         $(LINT) $(LINT_OPTS) $(CPPFLAGS) $(srcdir)/infocmp.c $(srcdir)/dump_entry.c $(LINT_LIBS)
239         $(LINT) $(LINT_OPTS) $(CPPFLAGS) $(srcdir)/tic.c     $(srcdir)/dump_entry.c $(LINT_LIBS)
240         $(LINT) $(LINT_OPTS) $(CPPFLAGS) $(srcdir)/toe.c     $(srcdir)/dump_entry.c $(LINT_LIBS)
241         $(LINT) $(LINT_OPTS) $(CPPFLAGS) $(srcdir)/tput.c                           $(LINT_LIBS)
242         $(LINT) $(LINT_OPTS) $(CPPFLAGS) $(srcdir)/tset.c    $(srcdir)/dump_entry.c $(LINT_LIBS)
243
244 ###############################################################################
245 # The remainder of this file is automatically generated during configuration
246 ###############################################################################