]> ncurses.scripts.mit.edu Git - ncurses.git/blob - ncurses/Makefile.in
c76ec18863d0af2ed10ebb6933a9d1ac21ccd4e9
[ncurses.git] / ncurses / Makefile.in
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.                                                         #
5 #                                                                              #
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.
22 #
23 # This makes the following:
24 #       programs
25 #       includes
26 #       libraries (normal/debug/profile/shared)
27 #
28 # The variable 'srcdir' refers to the source-distribution, and can be set with
29 # the configure script by "--srcdir=DIR".
30 #
31 # The rules are organized to produce the libraries for the configured models,
32 # and the programs with the configured default model.
33
34 # turn off _all_ suffix rules; we'll generate our own
35 .SUFFIXES:
36
37 SHELL           = /bin/sh
38 THIS            = Makefile
39
40 NC_MFLAGS       = @nc_cv_makeflags@
41 @SET_MAKE@
42
43 MODEL           = @DFT_LWR_MODEL@
44 INSTALL_PREFIX  = @INSTALL_PREFIX@
45 srcdir          = @srcdir@
46 prefix          = @prefix@
47 exec_prefix     = @exec_prefix@
48 libdir          = @libdir@
49 includedir      = @includedir@
50 datadir         = @datadir@
51
52 ticdir          = $(datadir)/terminfo
53
54 INSTALL         = @INSTALL@
55 INSTALL_DATA    = @INSTALL_DATA@
56
57 AR              = @AR@
58 AR_OPTS         = @AR_OPTS@
59 AWK             = @AWK@
60 LD              = @LD@
61 LN_S            = @LN_S@
62
63 CC              = @CC@
64 CPP             = @CPP@
65 CFLAGS          = @CFLAGS@
66
67 INCDIR          = $(srcdir)/../include
68 CPPFLAGS        = -I../ncurses -I$(srcdir) @CPPFLAGS@ \
69                   -DHAVE_CONFIG_H -DTERMINFO=\"$(ticdir)\"
70
71 CCFLAGS         = $(CPPFLAGS) $(CFLAGS)
72
73 CFLAGS_NORMAL   = $(CCFLAGS)
74 CFLAGS_DEBUG    = $(CCFLAGS) @CC_G_OPT@ -DTRACE
75 CFLAGS_PROFILE  = $(CCFLAGS) -pg
76 CFLAGS_SHARED   = $(CCFLAGS) @CC_SHARED_OPTS@
77
78 CFLAGS_DEFAULT  = $(CFLAGS_@DFT_UPR_MODEL@)
79
80 LINK            = $(CC)
81 LDFLAGS         = @LDFLAGS@ @LD_MODEL@ @LIBS@
82
83 MK_SHARED_LIB   = @MK_SHARED_LIB@
84 REL_VERSION     = @nc_cv_rel_version@
85 ABI_VERSION     = @nc_cv_abi_version@
86
87 RANLIB          = @RANLIB@
88
89 LIBRARIES       = @LIBS_TO_MAKE@
90
91 LINT            = @LINT@
92 LINT_OPTS       = @LINT_OPTS@
93 LINT_LIBS       = -lncurses @LIBS@
94
95 AUTO_SRC = \
96         ../include/nomacros.h \
97         ./comp_captab.c \
98         ./expanded.c \
99         ./fallback.c \
100         keys.tries \
101         ./lib_keyname.c \
102         ./lib_gen.c \
103         ./codes.c \
104         ./names.c \
105         ./unctrl.c
106
107 ################################################################################
108 all ::  ../lib $(AUTO_SRC) $(LIBRARIES)
109
110 $(INSTALL_PREFIX)$(libdir) :
111         $(srcdir)/../mkinstalldirs $@
112
113 ../lib : ; mkdir $@
114
115 ./fallback.c : $(srcdir)/MKfallback.sh
116         sh $(srcdir)/MKfallback.sh >$@
117
118 ./lib_gen.c : $(srcdir)/MKlib_gen.sh ../include/curses.h
119         sh $(srcdir)/MKlib_gen.sh "$(CPP)" "$(AWK)" <../include/curses.h >$@
120
121 ../include/nomacros.h : $(srcdir)/MKlib_gen.sh ../include/curses.h
122         sh $(srcdir)/MKlib_gen.sh "$(CPP)" "$(AWK)" <../include/curses.h | \
123                 fgrep undef >$@
124
125 keys.tries: $(srcdir)/keys.list
126         $(AWK) -f $(srcdir)/MKkeys.awk $(srcdir)/keys.list > keys.tries
127
128 make_hash : \
129                 $(srcdir)/comp_hash.c \
130                 ../include/hashsize.h
131         $(CC) -o $@ $(CCFLAGS) -DMAIN_PROGRAM $(srcdir)/comp_hash.c $(LDFLAGS)
132
133 ./expanded.c : $(srcdir)/MKexpanded.sh
134         sh $(srcdir)/MKexpanded.sh "$(CPP)" $(CPPFLAGS)
135
136 ./comp_captab.c: \
137                 make_hash \
138                 ../include/hashsize.h \
139                 $(srcdir)/MKcaptab.awk
140         sh $(srcdir)/MKcaptab.awk $(AWK) $(srcdir)/../include/Caps > $@
141
142 ./lib_keyname.c: $(srcdir)/keys.list $(srcdir)/MKkeyname.awk
143         $(AWK) -f $(srcdir)/MKkeyname.awk $(srcdir)/keys.list > $@
144
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
150
151 ./unctrl.c: $(srcdir)/MKunctrl.awk
152         echo | $(AWK) -f $(srcdir)/MKunctrl.awk >$@
153
154 tags:
155         ctags *.[ch]
156
157 TAGS:
158         etags *.[ch]
159
160 mostlyclean ::
161         -rm -f tags TAGS *~
162
163 clean :: mostlyclean
164         -rm -f $(AUTO_SRC)
165         -rm -f make_hash
166
167 distclean :: clean
168         -rm -f Makefile
169
170 realclean :: distclean
171
172 # These rules are used to allow "make -n" to work on a clean directory-tree
173 ../include/hashsize.h \
174 ../include/parametrized.h \
175 ../include/term.h :
176         cd ../include; $(MAKE) $(NC_MFLAGS)
177
178 ###############################################################################
179 # The remainder of this file is automatically generated during configuration
180 ###############################################################################