1 # $Id: Makefile.in,v 1.91 2003/11/01 22:48:53 tom Exp $
2 ##############################################################################
3 # Copyright (c) 1998-2002,2003 Free Software Foundation, Inc. #
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: #
13 # The above copyright notice and this permission notice shall be included in #
14 # all copies or substantial portions of the Software. #
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. #
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 #
28 ##############################################################################
30 # Author: Thomas E. Dickey 1996-2002
32 # Makefile for ncurses source code.
34 # This makes the following:
37 # libraries (normal/debug/profile/shared)
39 # The variable 'srcdir' refers to the source-distribution, and can be set with
40 # the configure script by "--srcdir=DIR".
42 # The rules are organized to produce the libraries for the configured models,
43 # and the programs with the configured default model.
45 # turn off _all_ suffix rules; we'll generate our own
51 CF_MFLAGS
= @cf_cv_makeflags@
57 MODEL
= @DFT_LWR_MODEL@
59 top_srcdir
= @top_srcdir@
62 exec_prefix = @
exec_prefix@
65 includedir = @
includedir@
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@
76 INSTALL_LIB
= @INSTALL@ @INSTALL_LIB@
77 INSTALL_PROG
= @INSTALL_PROG@
78 INSTALL_DATA
= @INSTALL_DATA@
90 INCDIR
= $(srcdir)/..
/include
91 CPPFLAGS
= -DHAVE_CONFIG_H
-I..
/ncurses
-I
$(srcdir) @CPPFLAGS@
93 CCFLAGS
= $(CPPFLAGS
) $(CFLAGS
)
96 BUILD_CCFLAGS
= -DHAVE_CONFIG_H
-I..
/ncurses
-I
$(srcdir) @BUILD_CPPFLAGS@ @BUILD_CFLAGS@
97 BUILD_LDFLAGS
= @BUILD_LDFLAGS@
98 BUILD_LIBS
= @BUILD_LIBS@
100 # The executables built in this directory are used for generating source that
101 # is compiled into the build, or are test-programs that are not installed.
103 BUILD_EXEEXT
= @BUILD_EXEEXT@
106 CFLAGS_LIBTOOL
= $(CCFLAGS
)
107 CFLAGS_NORMAL
= $(CCFLAGS
)
108 CFLAGS_DEBUG
= $(CCFLAGS
) @CC_G_OPT@
-DTRACE
109 CFLAGS_PROFILE
= $(CCFLAGS
) -pg
110 CFLAGS_SHARED
= $(CCFLAGS
) @CC_SHARED_OPTS@
112 CFLAGS_DEFAULT
= $(CFLAGS_@DFT_UPR_MODEL@
)
114 LINK
= $(LIBTOOL
) $(CC
)
115 LDFLAGS
= @LDFLAGS@ @LD_MODEL@ @LIBS@
117 SHLIB_DIRS
= -L..
/lib
118 SHLIB_LIST
= $(SHLIB_DIRS
) @SHLIB_LIST@
119 TINFO_LIST
= $(SHLIB_DIRS
) @TINFO_LIST@
121 MK_SHARED_LIB
= @MK_SHARED_LIB@
123 NCURSES_MAJOR
= @NCURSES_MAJOR@
124 NCURSES_MINOR
= @NCURSES_MINOR@
125 REL_VERSION
= @cf_cv_rel_version@
126 ABI_VERSION
= @cf_cv_abi_version@
130 IMPORT_LIB
= @IMPORT_LIB@
131 SHARED_LIB
= @SHARED_LIB@
132 LIBRARIES
= @LIBS_TO_MAKE@
135 LINT_OPTS
= @LINT_OPTS@
136 LINT_LIBS
= -lncurses @LIBS@
138 FALLBACK_LIST
= @FALLBACK_LIST@
140 TERMINFO_CAPS
= $(top_srcdir
)/include/@TERMINFO_CAPS@
143 ..
/include/nomacros.h \
156 TEST_DEPS
= ..
/lib
/@LIB_PREFIX@ncurses@DFT_DEP_SUFFIX@
157 TEST_ARGS
= -L..
/lib
-lncurses@DFT_ARG_SUFFIX@
158 TEST_LDFLAGS
= @LD_MODEL@
$(TEST_ARGS
) @LIBS@ @EXTRA_LIBS@ @LOCAL_LDFLAGS@ @LDFLAGS@
167 base
= $(srcdir)/base
168 serial
= $(srcdir)/tty
169 tinfo
= $(srcdir)/tinfo
170 trace
= $(srcdir)/trace
171 wide
= $(srcdir)/widechar
173 ################################################################################
175 libs
:: $(AUTO_SRC
) ..
/lib
$(LIBRARIES
)
179 $(DESTDIR
)$(bindir) \
180 $(DESTDIR
)$(libdir) :
181 sh
$(srcdir)/..
/mkinstalldirs
$@
185 fallback.c
: $(tinfo
)/MKfallback.sh
186 sh
$(tinfo
)/MKfallback.sh @TERMINFO@ @TERMINFO_SRC@
$(FALLBACK_LIST
) >$@
188 lib_gen.c
: $(base
)/MKlib_gen.sh ..
/include/curses.h
189 sh
$(base
)/MKlib_gen.sh
"$(CPP) $(CPPFLAGS)" "$(AWK)" generated
<..
/include/curses.h
>$@
191 ..
/include/nomacros.h
: $(base
)/MKlib_gen.sh ..
/include/curses.h
192 sh
$(base
)/MKlib_gen.sh
"$(CPP) $(CPPFLAGS)" "$(AWK)" generated
<..
/include/curses.h | \
195 init_keytry.h
: make_keys
$(BUILD_EXEEXT
) keys.list
196 .
/make_keys keys.list
> $@
198 keys.list
: $(tinfo
)/MKkeys_list.sh
199 AWK
=$(AWK
) sh
$(tinfo
)/MKkeys_list.sh
$(TERMINFO_CAPS
) |
sort >$@
201 make_keys
$(BUILD_EXEEXT
) : \
202 $(tinfo
)/make_keys.c \
204 $(BUILD_CC
) -o
$@
$(BUILD_CCFLAGS
) $(tinfo
)/make_keys.c
$(BUILD_LDFLAGS
) $(BUILD_LIBS
)
206 make_hash
$(BUILD_EXEEXT
) : \
207 $(tinfo
)/comp_hash.c \
208 ..
/include/hashsize.h
209 $(BUILD_CC
) -o
$@
$(BUILD_CCFLAGS
) -DMAIN_PROGRAM
$(tinfo
)/comp_hash.c
$(BUILD_LDFLAGS
) $(BUILD_LIBS
)
211 expanded.c
: $(serial
)/MKexpanded.sh
212 sh
$(serial
)/MKexpanded.sh
"$(CPP)" $(CPPFLAGS
) > $@
215 make_hash
$(BUILD_EXEEXT
) \
216 ..
/include/hashsize.h \
217 $(tinfo
)/MKcaptab.awk
218 sh
$(tinfo
)/MKcaptab.awk
$(AWK
) $(srcdir)/..
/include/@TERMINFO_CAPS@
> $@
220 lib_keyname.c
: keys.list
$(base
)/MKkeyname.awk
221 $(AWK
) -f
$(base
)/MKkeyname.awk keys.list
> $@
223 names.c codes.c
: $(tinfo
)/MKnames.awk
224 $(AWK
) -f
$(tinfo
)/MKnames.awk
$(srcdir)/..
/include/@TERMINFO_CAPS@
225 cat namehdr boolnames boolfnames numnames numfnames strnames strfnames nameftr
>names.c
226 cat namehdr boolcodes numcodes strcodes codeftr
>codes.c
227 -rm -f namehdr nameftr codeftr boolnames boolfnames boolcodes numnames numfnames numcodes strnames strfnames strcodes
229 unctrl.c
: $(base
)/MKunctrl.awk
230 echo |
$(AWK
) -f
$(base
)/MKunctrl.awk
>$@
235 @MAKE_UPPER_TAGS@TAGS
:
236 @MAKE_UPPER_TAGS@ etags
*.
[ch
]
239 -rm -f core
tags TAGS
*~
*.bak
*.i
*.ln
*.atac trace
244 -rm -f make_keys
$(BUILD_EXEEXT
)
245 -rm -f make_hash
$(BUILD_EXEEXT
)
251 realclean :: distclean
253 # These rules are used to allow "make -n" to work on a clean directory-tree
254 ..
/include/hashsize.h \
255 ..
/include/parametrized.h \
257 cd ..
/include; $(MAKE
) $(CF_MFLAGS
)
259 # These rules build test-programs for the modules that have test-drivers
260 test_progs
: $(TEST_PROGS
)
262 link_test.c
: $(base
)/MKlib_gen.sh ..
/include/curses.h
263 sh
$(base
)/MKlib_gen.sh
"$(CPP) $(CPPFLAGS)" "$(AWK)" implemented
<..
/include/curses.h
>$@
265 captoinfo
$x : $(tinfo
)/captoinfo.c
$(TEST_DEPS
)
266 @ECHO_LINK@
$(CC
) -o
$@
$(CFLAGS_DEFAULT
) -DMAIN
$(tinfo
)/captoinfo.c
$(TEST_LDFLAGS
)
268 hardscroll
$x : $(serial
)/hardscroll.c
$(TEST_DEPS
)
269 @ECHO_LINK@
$(CC
) -o
$@
$(CFLAGS_DEFAULT
) -DSCROLLDEBUG
$(serial
)/hardscroll.c
$(TEST_LDFLAGS
)
271 hashmap
$x : $(serial
)/hashmap.c
$(TEST_DEPS
)
272 @ECHO_LINK@
$(CC
) -o
$@
$(CFLAGS_DEFAULT
) -DHASHDEBUG
$(serial
)/hashmap.c
$(TEST_LDFLAGS
)
274 lib_mvcur
$x : $(serial
)/lib_mvcur.c
$(TEST_DEPS
) \
275 ..
/@DFT_OBJ_SUBDIR@
/dump_entry
$o
276 @ECHO_LINK@
$(CC
) -o
$@
$(CFLAGS_DEFAULT
) -DNCURSES_TEST
-I
$(serial
)/..
/..
/progs
$(serial
)/lib_mvcur.c ..
/@DFT_OBJ_SUBDIR@
/dump_entry
$o $(TEST_LDFLAGS
)
278 link_test
$x : link_test.c
$(TEST_DEPS
) \
279 ..
/@DFT_OBJ_SUBDIR@
/link_test
$o
280 @ECHO_LINK@
$(CC
) -o
$@
$(CFLAGS_DEFAULT
) ..
/@DFT_OBJ_SUBDIR@
/link_test
$o $(TEST_LDFLAGS
)
282 ..
/@DFT_OBJ_SUBDIR@
/dump_entry
$o:
283 cd ..
/progs
&& $(MAKE
) ..
/@DFT_OBJ_SUBDIR@
/dump_entry
$o
285 ###############################################################################
286 # The remainder of this file is automatically generated during configuration
287 ###############################################################################