1 # $Id: Makefile.in,v 1.130 2010/11/27 21:45:27 tom Exp $
2 ##############################################################################
3 # Copyright (c) 1998-2009,2010 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-on
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
52 CF_MFLAGS
= @cf_cv_makeflags@
58 MODEL
= @DFT_LWR_MODEL@
60 top_srcdir
= @top_srcdir@
63 exec_prefix = @
exec_prefix@
66 includedir = @
includedir@
70 LIBTOOL_CLEAN
= @LIB_CLEAN@
71 LIBTOOL_COMPILE
= @LIB_COMPILE@
72 LIBTOOL_LINK
= @LIB_LINK@
73 LIBTOOL_INSTALL
= @LIB_INSTALL@
74 LIBTOOL_UNINSTALL
= @LIB_UNINSTALL@
78 INSTALL_LIB
= @INSTALL@ @INSTALL_LIB@
79 INSTALL_PROG
= @INSTALL_PROGRAM@
80 INSTALL_DATA
= @INSTALL_DATA@
95 INCDIR
= $(srcdir)/..
/include
96 CPPFLAGS
= -DHAVE_CONFIG_H
-I..
/ncurses
-I
$(srcdir) @CPPFLAGS@
98 CCFLAGS
= $(CPPFLAGS
) $(CFLAGS
)
100 BUILD_CPPFLAGS
= -I..
/include -DUSE_BUILD_CC @BUILD_CPPFLAGS@
101 BUILD_CC
= @BUILD_CC@
102 BUILD_CCFLAGS
= -DHAVE_CONFIG_H
-I..
/ncurses
-I
$(srcdir) -I
$(INCDIR
) $(BUILD_CPPFLAGS
) @BUILD_CFLAGS@
103 BUILD_LDFLAGS
= @BUILD_LDFLAGS@
104 BUILD_LIBS
= @BUILD_LIBS@
106 # The executables built in this directory are used for generating source that
107 # is compiled into the build, or are test-programs that are not installed.
109 BUILD_EXEEXT
= @BUILD_EXEEXT@
112 CFLAGS_LIBTOOL
= $(CCFLAGS
)
113 CFLAGS_NORMAL
= $(CCFLAGS
)
114 CFLAGS_DEBUG
= $(CCFLAGS
) @CC_G_OPT@
-DTRACE
115 CFLAGS_PROFILE
= $(CCFLAGS
) -pg
116 CFLAGS_SHARED
= $(CCFLAGS
) @CC_SHARED_OPTS@
118 CFLAGS_DEFAULT
= $(CFLAGS_@DFT_UPR_MODEL@
)
121 LDFLAGS
= @LDFLAGS@ @LD_MODEL@ @LIBS@
123 SHLIB_DIRS
= -L..
/lib
124 SHLIB_LIST
= $(SHLIB_DIRS
) @SHLIB_LIST@
125 TINFO_LIST
= $(SHLIB_DIRS
) @TINFO_LIST@
126 TICS_LIST
= $(SHLIB_DIRS
) @TICS_LIST@
128 MK_SHARED_LIB
= @MK_SHARED_LIB@
130 NCURSES_MAJOR
= @NCURSES_MAJOR@
131 NCURSES_MINOR
= @NCURSES_MINOR@
132 REL_VERSION
= @cf_cv_rel_version@
133 ABI_VERSION
= @cf_cv_abi_version@
137 LIBRARIES
= @LIBS_TO_MAKE@
140 LINT_OPTS
= @LINT_OPTS@
141 LINT_LIBS
= -lncurses @LIBS@
143 FALLBACK_LIST
= @FALLBACK_LIST@
145 USE_BIG_STRINGS
= @USE_BIG_STRINGS@
146 TERMINFO_CAPS
= $(top_srcdir
)/include/@TERMINFO_CAPS@
148 TERMINFO
= @TERMINFO@
149 TERMINFO_SRC
= @TERMINFO_SRC@
150 TIC_PATH
= @TIC_PATH@
166 $(srcdir)/curses.priv.h \
167 ..
/include/ncurses_dll.h \
168 ..
/include/ncurses_cfg.h \
169 ..
/include/curses.h \
170 $(INCDIR
)/nc_panel.h \
172 $(INCDIR
)/term_entry.h \
173 $(INCDIR
)/nc_tparm.h \
174 $(INCDIR
)/nc_alloc.h \
177 TEST_DEPS
= ..
/lib
/@LIB_PREFIX@ncurses@DFT_DEP_SUFFIX@
178 TEST_ARGS
= @LDFLAGS_STATIC@ @TEST_ARGS@ @LDFLAGS_SHARED@
179 TEST_LDFLAGS
= @LD_MODEL@
$(TEST_ARGS
) @LIBS@ @LOCAL_LDFLAGS@ @LDFLAGS@
188 base
= $(srcdir)/base
189 serial
= $(srcdir)/tty
190 tinfo
= $(srcdir)/tinfo
191 trace
= $(srcdir)/trace
192 wide
= $(srcdir)/widechar
193 win32con
= $(srcdir)/win32con
195 ################################################################################
197 libs
:: $(AUTO_SRC
) ..
/lib
$(LIBRARIES
)
201 $(DESTDIR
)$(bindir) \
202 $(DESTDIR
)$(libdir) :
207 .
/fallback.c
: $(tinfo
)/MKfallback.sh
208 sh
-e
$(tinfo
)/MKfallback.sh
$(TERMINFO
) $(TERMINFO_SRC
) $(TIC_PATH
) $(FALLBACK_LIST
) >$@
210 .
/lib_gen.c
: $(base
)/MKlib_gen.sh ..
/include/curses.h
211 sh
-e
$(base
)/MKlib_gen.sh
"$(CPP) $(CPPFLAGS)" "$(AWK)" generated
<..
/include/curses.h
>$@
213 init_keytry.h
: make_keys
$(BUILD_EXEEXT
) keys.list
214 .
/make_keys
$(BUILD_EXEEXT
) keys.list
> $@
216 keys.list
: $(tinfo
)/MKkeys_list.sh
217 AWK
=$(AWK
) sh
$(tinfo
)/MKkeys_list.sh
$(TERMINFO_CAPS
) |
sort >$@
219 make_keys
$(BUILD_EXEEXT
) : \
220 $(tinfo
)/make_keys.c \
222 $(BUILD_CC
) -o
$@
$(BUILD_CCFLAGS
) $(tinfo
)/make_keys.c
$(BUILD_LDFLAGS
) $(BUILD_LIBS
)
224 make_hash
$(BUILD_EXEEXT
) : \
225 $(tinfo
)/make_hash.c \
226 ..
/include/hashsize.h
227 $(BUILD_CC
) -o
$@
$(BUILD_CCFLAGS
) $(tinfo
)/make_hash.c
$(BUILD_LDFLAGS
) $(BUILD_LIBS
)
229 .
/expanded.c
: $(srcdir)/curses.priv.h
$(serial
)/MKexpanded.sh
230 sh
-e
$(serial
)/MKexpanded.sh
"$(CPP)" $(CPPFLAGS
) > $@
233 make_hash
$(BUILD_EXEEXT
) \
234 ..
/include/hashsize.h \
235 $(tinfo
)/MKcaptab.sh \
236 $(tinfo
)/MKcaptab.awk
237 sh
-e
$(tinfo
)/MKcaptab.sh
$(AWK
) $(USE_BIG_STRINGS
) $(tinfo
)/MKcaptab.awk
$(srcdir)/..
/include/@TERMINFO_CAPS@
> $@
239 .
/lib_keyname.c
: keys.list
$(base
)/MKkeyname.awk
240 $(AWK
) -f
$(base
)/MKkeyname.awk bigstrings
=$(USE_BIG_STRINGS
) keys.list
> $@
242 .
/codes.c
: $(tinfo
)/MKcodes.awk
243 $(AWK
) -f
$(tinfo
)/MKcodes.awk bigstrings
=$(USE_BIG_STRINGS
) $(srcdir)/..
/include/@TERMINFO_CAPS@
>$@
245 .
/names.c
: $(tinfo
)/MKnames.awk
246 $(AWK
) -f
$(tinfo
)/MKnames.awk bigstrings
=$(USE_BIG_STRINGS
) $(srcdir)/..
/include/@TERMINFO_CAPS@
>$@
248 .
/unctrl.c
: $(base
)/MKunctrl.awk
249 echo |
$(AWK
) -f
$(base
)/MKunctrl.awk bigstrings
=$(USE_BIG_STRINGS
) >$@
252 $(CTAGS
) *.
[ch
] */*.
[ch
]
254 @MAKE_UPPER_TAGS@TAGS
:
255 @MAKE_UPPER_TAGS@
$(ETAGS
) *.
[ch
] */*.
[ch
]
258 -rm -f core
tags TAGS
*~
*.bak
*.i
*.ln
*.atac trace
263 -rm -f make_keys
$(BUILD_EXEEXT
)
264 -rm -f make_hash
$(BUILD_EXEEXT
)
270 realclean :: distclean
272 # These rules are used to allow "make -n" to work on a clean directory-tree
273 ..
/include/hashsize.h \
274 ..
/include/parametrized.h \
276 cd ..
/include; $(MAKE
) $(CF_MFLAGS
)
278 # These rules build test-programs for the modules that have test-drivers
279 test_progs
: $(TEST_PROGS
)
281 .
/link_test.c
: $(base
)/MKlib_gen.sh ..
/include/curses.h
282 sh
-e
$(base
)/MKlib_gen.sh
"$(CPP) $(CPPFLAGS)" "$(AWK)" implemented
<..
/include/curses.h
>$@
284 captoinfo
$x : $(tinfo
)/captoinfo.c
$(TEST_DEPS
)
285 @ECHO_LINK@
$(LIBTOOL_LINK
) -o
$@
$(CFLAGS_DEFAULT
) -DMAIN
$(tinfo
)/captoinfo.c
$(TEST_LDFLAGS
)
287 hardscroll
$x : $(serial
)/hardscroll.c
$(TEST_DEPS
)
288 @ECHO_LINK@
$(LIBTOOL_LINK
) -o
$@
$(CFLAGS_DEFAULT
) -DSCROLLDEBUG
$(serial
)/hardscroll.c
$(TEST_LDFLAGS
)
290 hashmap
$x : $(serial
)/hashmap.c
$(serial
)/hardscroll.c
$(TEST_DEPS
)
291 @ECHO_LINK@
$(LIBTOOL_LINK
) -o
$@
$(CFLAGS_DEFAULT
) -DHASHDEBUG
$(serial
)/hashmap.c
$(serial
)/hardscroll.c
$(TEST_LDFLAGS
)
293 lib_mvcur
$x : $(serial
)/lib_mvcur.c
$(TEST_DEPS
) \
294 ..
/@DFT_OBJ_SUBDIR@
/dump_entry
$o
295 @ECHO_LINK@
$(LIBTOOL_LINK
) -o
$@
$(CFLAGS_DEFAULT
) -DNCURSES_TEST
-I
$(serial
)/..
/..
/progs
$(serial
)/lib_mvcur.c ..
/@DFT_OBJ_SUBDIR@
/dump_entry
$o $(TEST_LDFLAGS
)
297 link_test
$x : .
/link_test.c
$(TEST_DEPS
) \
298 ..
/@DFT_OBJ_SUBDIR@
/link_test
$o
299 @ECHO_LINK@
$(CC
) -o
$@
$(CFLAGS_DEFAULT
) ..
/@DFT_OBJ_SUBDIR@
/link_test
$o $(TEST_LDFLAGS
)
301 ..
/@DFT_OBJ_SUBDIR@
/dump_entry
$o:
302 cd ..
/progs
&& $(MAKE
) ..
/@DFT_OBJ_SUBDIR@
/dump_entry
$o
304 ###############################################################################
305 # The remainder of this file is automatically generated during configuration
306 ###############################################################################