xref: /freebsd/contrib/ncurses/include/Makefile.in (revision 9e5787d2284e187abb5b654d924394a65772e004)
1# $Id: Makefile.in,v 1.46 2020/02/02 23:34:34 tom Exp $
2##############################################################################
3# Copyright 2019,2020 Thomas E. Dickey                                       #
4# Copyright 1998-2013,2015 Free Software Foundation, Inc.                    #
5#                                                                            #
6# Permission is hereby granted, free of charge, to any person obtaining a    #
7# copy of this software and associated documentation files (the "Software"), #
8# to deal in the Software without restriction, including without limitation  #
9# the rights to use, copy, modify, merge, publish, distribute, distribute    #
10# with modifications, sublicense, and/or sell copies of the Software, and to #
11# permit persons to whom the Software is furnished to do so, subject to the  #
12# following conditions:                                                      #
13#                                                                            #
14# The above copyright notice and this permission notice shall be included in #
15# all copies or substantial portions of the Software.                        #
16#                                                                            #
17# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR #
18# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,   #
19# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL    #
20# THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER      #
21# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING    #
22# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER        #
23# DEALINGS IN THE SOFTWARE.                                                  #
24#                                                                            #
25# Except as contained in this notice, the name(s) of the above copyright     #
26# holders shall not be used in advertising or otherwise to promote the sale, #
27# use or other dealings in this Software without prior written               #
28# authorization.                                                             #
29##############################################################################
30#
31# Author: Thomas E. Dickey 1996-2001
32#
33# Makefile for ncurses source code.
34#
35# This makes/installs ncurses include-files
36#
37# The variable 'srcdir' refers to the source-distribution, and can be set with
38# the configure script by "--srcdir=DIR".
39
40# turn off _all_ suffix rules; we'll generate our own
41.SUFFIXES:
42
43SHELL		= @SHELL@
44VPATH		= @srcdir@
45THIS		= Makefile
46
47DESTDIR		= @DESTDIR@
48srcdir		= @srcdir@
49prefix		= @prefix@
50exec_prefix	= @exec_prefix@
51includedir	= @includedir@
52includesubdir	= @includesubdir@
53
54INCLUDEDIR	= $(DESTDIR)$(includedir)$(includesubdir)
55
56INSTALL		= @INSTALL@
57INSTALL_DATA	= @INSTALL_DATA@
58
59AWK		= @AWK@
60LN_S		= @LN_S@
61
62CTAGS		= @CTAGS@
63ETAGS		= @ETAGS@
64
65VERSION		= @cf_cv_rel_version@
66
67# The "Caps" file specifies the terminfo database format, as well as the list
68# of function keys.
69TERMINFO_CAPS	= $(srcdir)/@TERMINFO_CAPS@
70CAPLIST	=	$(TERMINFO_CAPS) \
71		$(srcdir)/Caps-ncurses
72
73# These files are generated by the configure script
74CONFIG_SRC = \
75	MKterm.h.awk \
76	curses.head \
77	ncurses_dll.h \
78	termcap.h \
79	unctrl.h
80
81# These files are generated by this makefile
82AUTO_SRC = \
83	curses.h \
84	hashsize.h \
85	ncurses_def.h \
86	parametrized.h \
87	config.h \
88	term.h
89
90################################################################################
91all \
92libs \
93depend \
94sources \
95install ::	$(AUTO_SRC)
96
97curses.h :	$(CAPLIST) \
98		curses.head \
99		$(srcdir)/curses.tail \
100		$(srcdir)/MKkey_defs.sh
101	cat curses.head >$@
102	AWK=$(AWK) $(SHELL) $(srcdir)/MKkey_defs.sh $(CAPLIST) >>$@
103	$(SHELL) -c 'if test "@NCURSES_CH_T@" = "cchar_t" ; then cat $(srcdir)/curses.wide >>$@ ; fi'
104	cat $(srcdir)/curses.tail >>$@
105
106term.h: 	$(CAPLIST) \
107		MKterm.h.awk
108	$(AWK) -f MKterm.h.awk $(CAPLIST) > $@
109	$(SHELL) $(srcdir)/edit_cfg.sh ../include/ncurses_cfg.h $@
110
111hashsize.h:	$(CAPLIST) \
112		$(srcdir)/MKhashsize.sh
113	$(SHELL) $(srcdir)/MKhashsize.sh $(CAPLIST) >$@
114
115ncurses_def.h: $(srcdir)/ncurses_defs $(srcdir)/MKncurses_def.sh
116	AWK=$(AWK) $(SHELL) $(srcdir)/MKncurses_def.sh $(srcdir)/ncurses_defs >$@
117
118parametrized.h: $(CAPLIST) \
119		$(srcdir)/MKparametrized.sh
120	AWK=$(AWK) $(SHELL) $(srcdir)/MKparametrized.sh $(CAPLIST) >$@
121
122# This is required by pthread.h on MinGW
123config.h:
124	touch $@
125
126tags:
127	$(CTAGS) *.[ch]
128
129@MAKE_UPPER_TAGS@TAGS:
130@MAKE_UPPER_TAGS@	$(ETAGS) *.[ch]
131
132mostlyclean ::
133	-rm -f core tags TAGS *~ *.bak *.i *.ln *.atac trace
134
135clean :: mostlyclean
136	-rm -f $(AUTO_SRC)
137	-rm -rf *.dSYM
138
139distclean :: clean
140	-rm -f Makefile $(CONFIG_SRC) config.h
141
142realclean :: distclean
143
144###############################################################################
145# The remainder of this file is automatically generated during configuration
146###############################################################################
147