1 # $Id: Makefile.in,v 1.28 1997/05/10 20:21:06 tom Exp $
2 ################################################################################
3 # Copyright 1996 by Thomas E. Dickey <dickey@clark.net> #
4 # All Rights Reserved. #
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.
23 # This makes the following:
26 # libraries (normal/debug/profile/shared)
28 # The variable 'srcdir' refers to the source-distribution, and can be set with
29 # the configure script by "--srcdir=DIR".
31 # The rules are organized to produce the libraries for the configured models,
32 # and the programs with the configured default model.
34 # turn off _all_ suffix rules; we'll generate our own
40 NC_MFLAGS = @nc_cv_makeflags@
43 MODEL = @DFT_LWR_MODEL@
44 INSTALL_PREFIX = @INSTALL_PREFIX@
47 exec_prefix = @exec_prefix@
49 includedir = @includedir@
52 ticdir = $(datadir)/terminfo
55 INSTALL_DATA = @INSTALL_DATA@
67 INCDIR = $(srcdir)/../include
68 CPPFLAGS = -I../ncurses -I$(srcdir) @CPPFLAGS@ \
69 -DHAVE_CONFIG_H -DTERMINFO=\"$(ticdir)\"
71 CCFLAGS = $(CPPFLAGS) $(CFLAGS)
73 CFLAGS_NORMAL = $(CCFLAGS)
74 CFLAGS_DEBUG = $(CCFLAGS) @CC_G_OPT@ -DTRACE
75 CFLAGS_PROFILE = $(CCFLAGS) -pg
76 CFLAGS_SHARED = $(CCFLAGS) @CC_SHARED_OPTS@
78 CFLAGS_DEFAULT = $(CFLAGS_@DFT_UPR_MODEL@)
81 LDFLAGS = @LDFLAGS@ @LD_MODEL@ @LIBS@
83 MK_SHARED_LIB = @MK_SHARED_LIB@
84 REL_VERSION = @nc_cv_rel_version@
85 ABI_VERSION = @nc_cv_abi_version@
89 LIBRARIES = @LIBS_TO_MAKE@
92 LINT_OPTS = @LINT_OPTS@
93 LINT_LIBS = -lncurses @LIBS@
96 ../include/nomacros.h \
107 ################################################################################
108 all :: ../lib $(AUTO_SRC) $(LIBRARIES)
110 $(INSTALL_PREFIX)$(libdir) :
111 $(srcdir)/../mkinstalldirs $@
115 ./fallback.c : $(srcdir)/MKfallback.sh
116 sh $(srcdir)/MKfallback.sh >$@
118 ./lib_gen.c : $(srcdir)/MKlib_gen.sh ../include/curses.h
119 sh $(srcdir)/MKlib_gen.sh "$(CPP)" "$(AWK)" <../include/curses.h >$@
121 ../include/nomacros.h : $(srcdir)/MKlib_gen.sh ../include/curses.h
122 sh $(srcdir)/MKlib_gen.sh "$(CPP)" "$(AWK)" <../include/curses.h | \
125 keys.tries: $(srcdir)/keys.list
126 $(AWK) -f $(srcdir)/MKkeys.awk $(srcdir)/keys.list > keys.tries
129 $(srcdir)/comp_hash.c \
130 ../include/hashsize.h
131 $(CC) -o $@ $(CCFLAGS) -DMAIN_PROGRAM $(srcdir)/comp_hash.c $(LDFLAGS)
133 ./expanded.c : $(srcdir)/MKexpanded.sh
134 sh $(srcdir)/MKexpanded.sh "$(CPP)" $(CPPFLAGS)
138 ../include/hashsize.h \
139 $(srcdir)/MKcaptab.awk
140 sh $(srcdir)/MKcaptab.awk $(AWK) $(srcdir)/../include/Caps > $@
142 ./lib_keyname.c: $(srcdir)/keys.list $(srcdir)/MKkeyname.awk
143 $(AWK) -f $(srcdir)/MKkeyname.awk $(srcdir)/keys.list > $@
145 ./names.c ./codes.c: $(srcdir)/MKnames.awk
146 $(AWK) -f $(srcdir)/MKnames.awk $(srcdir)/../include/Caps
147 cat namehdr boolnames boolfnames numnames numfnames strnames strfnames nameftr >./names.c
148 cat namehdr boolcodes numcodes strcodes codeftr >./codes.c
149 -rm -f namehdr nameftr codeftr boolnames boolfnames boolcodes numnames numfnames numcodes strnames strfnames strcodes
151 ./unctrl.c: $(srcdir)/MKunctrl.awk
152 echo | $(AWK) -f $(srcdir)/MKunctrl.awk >$@
170 realclean :: distclean
172 # These rules are used to allow "make -n" to work on a clean directory-tree
173 ../include/hashsize.h \
174 ../include/parametrized.h \
176 cd ../include; $(MAKE) $(NC_MFLAGS)
178 ###############################################################################
179 # The remainder of this file is automatically generated during configuration
180 ###############################################################################