]> ncurses.scripts.mit.edu Git - ncurses.git/blob - ncurses/Makefile.in
ncurses 5.2
[ncurses.git] / ncurses / Makefile.in
1 # $Id: Makefile.in,v 1.71 2000/10/14 22:55:35 tom Exp $
2 ##############################################################################
3 # Copyright (c) 1998,1999,2000 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 following:
35 #       programs
36 #       includes
37 #       libraries (normal/debug/profile/shared)
38 #
39 # The variable 'srcdir' refers to the source-distribution, and can be set with
40 # the configure script by "--srcdir=DIR".
41 #
42 # The rules are organized to produce the libraries for the configured models,
43 # and the programs with the configured default model.
44
45 # turn off _all_ suffix rules; we'll generate our own
46 .SUFFIXES:
47
48 SHELL           = /bin/sh
49 THIS            = Makefile
50
51 x               = @PROG_EXT@
52
53 CF_MFLAGS       = @cf_cv_makeflags@
54 @SET_MAKE@
55
56 MODEL           = @DFT_LWR_MODEL@
57 DESTDIR         = @DESTDIR@
58 srcdir          = @srcdir@
59 prefix          = @prefix@
60 exec_prefix     = @exec_prefix@
61 libdir          = @libdir@
62 includedir      = @includedir@
63 datadir         = @datadir@
64
65 LIBTOOL         = @LIBTOOL@
66
67 INSTALL         = @INSTALL@
68 INSTALL_LIB     = @INSTALL@ @INSTALL_LIB@
69 INSTALL_DATA    = @INSTALL_DATA@
70
71 AR              = @AR@
72 AR_OPTS         = @AR_OPTS@
73 AWK             = @AWK@
74 LD              = @LD@
75 LN_S            = @LN_S@
76
77 CC              = @CC@
78 CPP             = @CPP@
79 CFLAGS          = @CFLAGS@
80
81 INCDIR          = $(srcdir)/../include
82 CPPFLAGS        = -I../ncurses -I$(srcdir) @CPPFLAGS@ \
83                   -DHAVE_CONFIG_H
84
85 CCFLAGS         = $(CPPFLAGS) $(CFLAGS)
86
87 HOSTCC          = @BUILD_CC@
88 HOSTCCFLAGS     = @CFLAGS@ $(CPPFLAGS)
89 HOSTLDFLAGS     = @LDFLAGS@ @LIBS@
90
91 CFLAGS_LIBTOOL  = $(CCFLAGS)
92 CFLAGS_NORMAL   = $(CCFLAGS)
93 CFLAGS_DEBUG    = $(CCFLAGS) @CC_G_OPT@ -DTRACE
94 CFLAGS_PROFILE  = $(CCFLAGS) -pg
95 CFLAGS_SHARED   = $(CCFLAGS) @CC_SHARED_OPTS@
96
97 CFLAGS_DEFAULT  = $(CFLAGS_@DFT_UPR_MODEL@)
98
99 LINK            = $(LIBTOOL) $(CC)
100 LDFLAGS         = @LDFLAGS@ @LD_MODEL@ @LIBS@
101
102 SHLIB_DIRS      = -L../lib -L$(libdir)
103 SHLIB_LIST      = $(SHLIB_DIRS) @SHLIB_LIST@
104 TINFO_LIST      = $(SHLIB_DIRS) @TINFO_LIST@
105
106 MK_SHARED_LIB   = @MK_SHARED_LIB@
107
108 NCURSES_MAJOR   = @NCURSES_MAJOR@
109 NCURSES_MINOR   = @NCURSES_MINOR@
110 REL_VERSION     = @cf_cv_rel_version@
111 ABI_VERSION     = @cf_cv_abi_version@
112
113 RANLIB          = @RANLIB@
114
115 LIBRARIES       = @LIBS_TO_MAKE@
116
117 LINT            = @LINT@
118 LINT_OPTS       = @LINT_OPTS@
119 LINT_LIBS       = -lncurses @LIBS@
120
121 FALLBACK_LIST   = @FALLBACK_LIST@
122
123 AUTO_SRC = \
124         ../include/nomacros.h \
125         ./comp_captab.c \
126         ./expanded.c \
127         ./fallback.c \
128         init_keytry.h \
129         ./lib_keyname.c \
130         ./lib_gen.c \
131         ./codes.c \
132         ./names.c \
133         ./unctrl.c
134
135 TEST_DEPS       = ../lib/@LIB_PREFIX@ncurses@DFT_DEP_SUFFIX@
136 TEST_ARGS       = -L../lib -lncurses@DFT_ARG_SUFFIX@
137 TEST_LDFLAGS    = @LD_MODEL@ $(TEST_ARGS) @LIBS@ @EXTRA_LIBS@ @LOCAL_LDFLAGS@ @LDFLAGS@
138
139 TEST_PROGS = \
140         captoinfo$x \
141         hardscroll$x \
142         hashmap$x \
143         lib_mvcur$x
144
145 base    = $(srcdir)/base
146 serial  = $(srcdir)/tty
147 tinfo   = $(srcdir)/tinfo
148 trace   = $(srcdir)/trace
149
150 ################################################################################
151 all \
152 libs ::         $(AUTO_SRC) ../lib $(LIBRARIES)
153
154 sources:        $(AUTO_SRC)
155
156 $(DESTDIR)$(libdir) :
157         $(srcdir)/../mkinstalldirs $@
158
159 ../lib : ; mkdir $@
160
161 ./fallback.c : $(tinfo)/MKfallback.sh
162         sh $(tinfo)/MKfallback.sh $(FALLBACK_LIST) >$@
163
164 ./lib_gen.c : $(base)/MKlib_gen.sh ../include/curses.h
165         sh $(base)/MKlib_gen.sh "$(CPP)" "$(AWK)" <../include/curses.h >$@
166
167 ../include/nomacros.h : $(base)/MKlib_gen.sh ../include/curses.h
168         sh $(base)/MKlib_gen.sh "$(CPP)" "$(AWK)" <../include/curses.h | \
169                 fgrep undef >$@
170
171 init_keytry.h: make_keys$x $(tinfo)/keys.list
172         ./make_keys $(tinfo)/keys.list > $@
173
174 make_keys$x : \
175                 $(tinfo)/make_keys.c \
176                 ./names.c
177         $(HOSTCC) -o $@ $(HOSTCCFLAGS) $(tinfo)/make_keys.c $(HOSTLDFLAGS)
178
179 make_hash$x : \
180                 $(tinfo)/comp_hash.c \
181                 ../include/hashsize.h
182         $(HOSTCC) -o $@ $(HOSTCCFLAGS) -DMAIN_PROGRAM $(tinfo)/comp_hash.c $(HOSTLDFLAGS)
183
184 ./expanded.c : $(serial)/MKexpanded.sh
185         sh $(serial)/MKexpanded.sh "$(CPP)" $(CPPFLAGS) > $@
186
187 ./comp_captab.c: \
188                 make_hash$x \
189                 ../include/hashsize.h \
190                 $(tinfo)/MKcaptab.awk
191         sh $(tinfo)/MKcaptab.awk $(AWK) $(srcdir)/../include/Caps > $@
192
193 ./lib_keyname.c: $(tinfo)/keys.list $(base)/MKkeyname.awk
194         $(AWK) -f $(base)/MKkeyname.awk $(tinfo)/keys.list > $@
195
196 ./names.c ./codes.c: $(tinfo)/MKnames.awk
197         $(AWK) -f $(tinfo)/MKnames.awk $(srcdir)/../include/Caps
198         cat namehdr boolnames boolfnames numnames numfnames strnames strfnames nameftr >./names.c
199         cat namehdr boolcodes numcodes strcodes codeftr >./codes.c
200         -rm -f namehdr nameftr codeftr boolnames boolfnames boolcodes numnames numfnames numcodes strnames strfnames strcodes
201
202 ./unctrl.c: $(base)/MKunctrl.awk
203         echo | $(AWK) -f $(base)/MKunctrl.awk >$@
204
205 tags:
206         ctags *.[ch]
207
208 @MAKE_UPPER_TAGS@TAGS:
209 @MAKE_UPPER_TAGS@       etags *.[ch]
210
211 mostlyclean ::
212         -rm -f core tags TAGS *~ *.ln *.atac trace
213         -rm -f $(TEST_PROGS)
214
215 clean :: mostlyclean
216         -rm -f $(AUTO_SRC)
217         -rm -f make_keys$x
218         -rm -f make_hash$x
219         -rm -rf .libs
220
221 distclean :: clean
222         -rm -f Makefile
223
224 realclean :: distclean
225
226 # These rules are used to allow "make -n" to work on a clean directory-tree
227 ../include/hashsize.h \
228 ../include/parametrized.h \
229 ../include/term.h :
230         cd ../include; $(MAKE) $(CF_MFLAGS)
231
232 # These rules build test-programs for the modules that have test-drivers
233 test_progs : $(TEST_PROGS)
234
235 captoinfo$x : $(tinfo)/captoinfo.c $(TEST_DEPS)
236         @ECHO_LINK@ $(CC) -o $@ $(CFLAGS_DEFAULT) -DMAIN $(tinfo)/captoinfo.c $(TEST_LDFLAGS)
237
238 hardscroll$x : $(serial)/hardscroll.c $(TEST_DEPS)
239         @ECHO_LINK@ $(CC) -o $@ $(CFLAGS_DEFAULT) -DSCROLLDEBUG $(serial)/hardscroll.c $(TEST_LDFLAGS)
240
241 hashmap$x : $(serial)/hashmap.c $(TEST_DEPS)
242         @ECHO_LINK@ $(CC) -o $@ $(CFLAGS_DEFAULT) -DHASHDEBUG $(serial)/hashmap.c $(TEST_LDFLAGS)
243
244 lib_mvcur$x : $(serial)/lib_mvcur.c $(TEST_DEPS) \
245                 ../@DFT_OBJ_SUBDIR@/dump_entry.o
246         @ECHO_LINK@ $(CC) -o $@ $(CFLAGS_DEFAULT) -DNCURSES_TEST -I$(serial)/../../progs $(serial)/lib_mvcur.c ../@DFT_OBJ_SUBDIR@/dump_entry.o $(TEST_LDFLAGS)
247
248 ../@DFT_OBJ_SUBDIR@/dump_entry.o:
249         cd ../progs && $(MAKE) ../@DFT_OBJ_SUBDIR@/dump_entry.o
250
251 ###############################################################################
252 # The remainder of this file is automatically generated during configuration
253 ###############################################################################