]> ncurses.scripts.mit.edu Git - ncurses.git/blob - ncurses/Makefile.in
ncurses 5.7 - patch 20090516
[ncurses.git] / ncurses / Makefile.in
1 # $Id: Makefile.in,v 1.115 2009/03/28 18:22:39 Charles.Wilson Exp $
2 ##############################################################################
3 # Copyright (c) 1998-2007,2009 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-on
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 CF_MFLAGS       = @cf_cv_makeflags@
52 @SET_MAKE@
53
54 x               = @EXEEXT@
55 o               = .@OBJEXT@
56
57 MODEL           = @DFT_LWR_MODEL@
58 DESTDIR         = @DESTDIR@
59 top_srcdir      = @top_srcdir@
60 srcdir          = @srcdir@
61 prefix          = @prefix@
62 exec_prefix     = @exec_prefix@
63 bindir          = @bindir@
64 libdir          = @libdir@
65 includedir      = @includedir@
66 datadir         = @datadir@
67
68 LIBTOOL         = @LIBTOOL@
69 LIBTOOL_CLEAN   = @LIB_CLEAN@
70 LIBTOOL_COMPILE = @LIB_COMPILE@
71 LIBTOOL_LINK    = @LIB_LINK@
72 LIBTOOL_INSTALL = @LIB_INSTALL@
73 LIBTOOL_UNINSTALL = @LIB_UNINSTALL@
74 LT_UNDEF        = @LT_UNDEF@
75
76 INSTALL         = @INSTALL@
77 INSTALL_LIB     = @INSTALL@ @INSTALL_LIB@
78 INSTALL_PROG    = @INSTALL_PROGRAM@
79 INSTALL_DATA    = @INSTALL_DATA@
80
81 AR              = @AR@
82 ARFLAGS         = @ARFLAGS@
83 AWK             = @AWK@
84 LD              = @LD@
85 LN_S            = @LN_S@
86
87 CC              = @CC@
88 CPP             = @CPP@
89 CFLAGS          = @CFLAGS@
90
91 INCDIR          = $(srcdir)/../include
92 CPPFLAGS        = -DHAVE_CONFIG_H -I../ncurses -I$(srcdir) @CPPFLAGS@
93
94 CCFLAGS         = $(CPPFLAGS) $(CFLAGS)
95
96 BUILD_CPPFLAGS  = -I../include @BUILD_CPPFLAGS@
97 BUILD_CC        = @BUILD_CC@
98 BUILD_CCFLAGS   = -DHAVE_CONFIG_H -I../ncurses -I$(srcdir) -I$(INCDIR) $(BUILD_CPPFLAGS) @BUILD_CFLAGS@
99 BUILD_LDFLAGS   = @BUILD_LDFLAGS@
100 BUILD_LIBS      = @BUILD_LIBS@
101
102 # The executables built in this directory are used for generating source that
103 # is compiled into the build, or are test-programs that are not installed.
104
105 BUILD_EXEEXT    = @BUILD_EXEEXT@
106 x               = @PROG_EXT@
107
108 CFLAGS_LIBTOOL  = $(CCFLAGS)
109 CFLAGS_NORMAL   = $(CCFLAGS)
110 CFLAGS_DEBUG    = $(CCFLAGS) @CC_G_OPT@ -DTRACE
111 CFLAGS_PROFILE  = $(CCFLAGS) -pg
112 CFLAGS_SHARED   = $(CCFLAGS) @CC_SHARED_OPTS@
113
114 CFLAGS_DEFAULT  = $(CFLAGS_@DFT_UPR_MODEL@)
115
116 LINK            = $(LIBTOOL)
117 LDFLAGS         = @LDFLAGS@ @LD_MODEL@ @LIBS@
118
119 SHLIB_DIRS      = -L../lib
120 SHLIB_LIST      = $(SHLIB_DIRS) @SHLIB_LIST@
121 TINFO_LIST      = $(SHLIB_DIRS) @TINFO_LIST@
122 TICS_LIST       = $(SHLIB_DIRS) @TICS_LIST@
123
124 MK_SHARED_LIB   = @MK_SHARED_LIB@
125
126 NCURSES_MAJOR   = @NCURSES_MAJOR@
127 NCURSES_MINOR   = @NCURSES_MINOR@
128 REL_VERSION     = @cf_cv_rel_version@
129 ABI_VERSION     = @cf_cv_abi_version@
130
131 RANLIB          = @LIB_PREP@
132
133 LIBRARIES       = @LIBS_TO_MAKE@
134
135 LINT            = @LINT@
136 LINT_OPTS       = @LINT_OPTS@
137 LINT_LIBS       = -lncurses @LIBS@
138
139 FALLBACK_LIST   = @FALLBACK_LIST@
140
141 USE_BIG_STRINGS = @USE_BIG_STRINGS@
142 TERMINFO_CAPS   = $(top_srcdir)/include/@TERMINFO_CAPS@
143
144 AUTO_SRC = \
145         ./codes.c \
146         ./comp_captab.c \
147         ./expanded.c \
148         ./fallback.c \
149         ./lib_gen.c \
150         ./lib_keyname.c \
151         ./link_test.c \
152         ./names.c \
153         ./unctrl.c \
154         init_keytry.h \
155         keys.list
156
157 TEST_DEPS       = ../lib/@LIB_PREFIX@ncurses@DFT_DEP_SUFFIX@
158 TEST_ARGS       = @LDFLAGS_STATIC@ @TEST_ARGS@ @LDFLAGS_SHARED@ 
159 TEST_LDFLAGS    = @LD_MODEL@ $(TEST_ARGS) @LIBS@ @LOCAL_LDFLAGS@ @LDFLAGS@
160
161 TEST_PROGS = \
162         captoinfo$x \
163         hardscroll$x \
164         link_test$x \
165         hashmap$x \
166         lib_mvcur$x
167
168 base    = $(srcdir)/base
169 serial  = $(srcdir)/tty
170 tinfo   = $(srcdir)/tinfo
171 trace   = $(srcdir)/trace
172 wide    = $(srcdir)/widechar
173
174 ################################################################################
175 all \
176 libs ::         $(AUTO_SRC) ../lib $(LIBRARIES)
177
178 sources:        $(AUTO_SRC)
179
180 $(DESTDIR)$(bindir) \
181 $(DESTDIR)$(libdir) :
182         sh $(srcdir)/../mkdirs.sh $@
183
184 ../lib : ; mkdir $@
185
186 ./fallback.c : $(tinfo)/MKfallback.sh
187         sh -e $(tinfo)/MKfallback.sh @TERMINFO@ @TERMINFO_SRC@ $(FALLBACK_LIST) >$@
188
189 ./lib_gen.c : $(base)/MKlib_gen.sh ../include/curses.h
190         sh -e $(base)/MKlib_gen.sh "$(CPP) $(CPPFLAGS)" "$(AWK)" generated <../include/curses.h >$@
191
192 init_keytry.h: make_keys$(BUILD_EXEEXT) keys.list
193         ./make_keys$(BUILD_EXEEXT) keys.list > $@
194
195 keys.list :     $(tinfo)/MKkeys_list.sh
196         AWK=$(AWK) sh $(tinfo)/MKkeys_list.sh $(TERMINFO_CAPS) | sort >$@
197
198 make_keys$(BUILD_EXEEXT) : \
199                 $(tinfo)/make_keys.c \
200                 names.c
201         $(BUILD_CC) -o $@ $(BUILD_CCFLAGS) $(tinfo)/make_keys.c $(BUILD_LDFLAGS) $(BUILD_LIBS)
202
203 make_hash$(BUILD_EXEEXT) : \
204                 $(tinfo)/comp_hash.c \
205                 ../include/hashsize.h
206         $(BUILD_CC) -o $@ $(BUILD_CCFLAGS) -DMAIN_PROGRAM $(tinfo)/comp_hash.c $(BUILD_LDFLAGS) $(BUILD_LIBS)
207
208 ./expanded.c : $(serial)/MKexpanded.sh
209         sh -e $(serial)/MKexpanded.sh "$(CPP)" $(CPPFLAGS) > $@
210
211 ./comp_captab.c: \
212                 make_hash$(BUILD_EXEEXT) \
213                 ../include/hashsize.h \
214                 $(tinfo)/MKcaptab.sh \
215                 $(tinfo)/MKcaptab.awk
216         sh -e $(tinfo)/MKcaptab.sh $(AWK) $(USE_BIG_STRINGS) $(tinfo)/MKcaptab.awk $(srcdir)/../include/@TERMINFO_CAPS@ > $@
217
218 ./lib_keyname.c: keys.list $(base)/MKkeyname.awk
219         $(AWK) -f $(base)/MKkeyname.awk bigstrings=$(USE_BIG_STRINGS) keys.list > $@
220
221 ./codes.c: $(tinfo)/MKcodes.awk
222         $(AWK) -f $(tinfo)/MKcodes.awk bigstrings=$(USE_BIG_STRINGS) $(srcdir)/../include/@TERMINFO_CAPS@ >$@
223
224 ./names.c: $(tinfo)/MKnames.awk
225         $(AWK) -f $(tinfo)/MKnames.awk bigstrings=$(USE_BIG_STRINGS) $(srcdir)/../include/@TERMINFO_CAPS@ >$@
226
227 ./unctrl.c: $(base)/MKunctrl.awk
228         echo | $(AWK) -f $(base)/MKunctrl.awk bigstrings=$(USE_BIG_STRINGS) >$@
229
230 tags:
231         ctags *.[ch] */*.[ch]
232
233 @MAKE_UPPER_TAGS@TAGS:
234 @MAKE_UPPER_TAGS@       etags *.[ch] */*.[ch]
235
236 mostlyclean ::
237         -rm -f core tags TAGS *~ *.bak *.i *.ln *.atac trace
238         -rm -f $(TEST_PROGS)
239
240 clean :: mostlyclean
241         -rm -f $(AUTO_SRC)
242         -rm -f make_keys$(BUILD_EXEEXT)
243         -rm -f make_hash$(BUILD_EXEEXT)
244         -rm -rf .libs
245
246 distclean :: clean
247         -rm -f Makefile
248
249 realclean :: distclean
250
251 # These rules are used to allow "make -n" to work on a clean directory-tree
252 ../include/hashsize.h \
253 ../include/parametrized.h \
254 ../include/term.h :
255         cd ../include; $(MAKE) $(CF_MFLAGS)
256
257 # These rules build test-programs for the modules that have test-drivers
258 test_progs : $(TEST_PROGS)
259
260 ./link_test.c : $(base)/MKlib_gen.sh ../include/curses.h
261         sh -e $(base)/MKlib_gen.sh "$(CPP) $(CPPFLAGS)" "$(AWK)" implemented <../include/curses.h >$@
262
263 captoinfo$x : $(tinfo)/captoinfo.c $(TEST_DEPS)
264         @ECHO_LINK@ $(LIBTOOL_LINK) -o $@ $(CFLAGS_DEFAULT) -DMAIN $(tinfo)/captoinfo.c $(TEST_LDFLAGS)
265
266 hardscroll$x : $(serial)/hardscroll.c $(TEST_DEPS)
267         @ECHO_LINK@ $(LIBTOOL_LINK) -o $@ $(CFLAGS_DEFAULT) -DSCROLLDEBUG $(serial)/hardscroll.c $(TEST_LDFLAGS)
268
269 hashmap$x : $(serial)/hashmap.c $(serial)/hardscroll.c $(TEST_DEPS)
270         @ECHO_LINK@ $(LIBTOOL_LINK) -o $@ $(CFLAGS_DEFAULT) -DHASHDEBUG $(serial)/hashmap.c $(serial)/hardscroll.c $(TEST_LDFLAGS)
271
272 lib_mvcur$x : $(serial)/lib_mvcur.c $(TEST_DEPS) \
273                 ../@DFT_OBJ_SUBDIR@/dump_entry$o
274         @ECHO_LINK@ $(LIBTOOL_LINK) -o $@ $(CFLAGS_DEFAULT) -DNCURSES_TEST -I$(serial)/../../progs $(serial)/lib_mvcur.c ../@DFT_OBJ_SUBDIR@/dump_entry$o $(TEST_LDFLAGS)
275
276 link_test$x : ./link_test.c $(TEST_DEPS) \
277                 ../@DFT_OBJ_SUBDIR@/link_test$o
278         @ECHO_LINK@ $(CC) -o $@ $(CFLAGS_DEFAULT) ../@DFT_OBJ_SUBDIR@/link_test$o $(TEST_LDFLAGS)
279
280 ../@DFT_OBJ_SUBDIR@/dump_entry$o:
281         cd ../progs && $(MAKE) ../@DFT_OBJ_SUBDIR@/dump_entry$o
282
283 ###############################################################################
284 # The remainder of this file is automatically generated during configuration
285 ###############################################################################