micky387 | 9b9f5e7 | 2025-07-08 18:04:53 -0400 | [diff] [blame] | 1 | # $Id: Makefile.in,v 1.53 2021/07/03 18:56:51 tom Exp $ |
Amit Daniel Kachhap | e6a01f5 | 2011-07-20 11:45:59 +0530 | [diff] [blame] | 2 | ############################################################################## |
micky387 | 9b9f5e7 | 2025-07-08 18:04:53 -0400 | [diff] [blame] | 3 | # Copyright 2019-2020,2021 Thomas E. Dickey # |
| 4 | # Copyright 1998-2013,2015 Free Software Foundation, Inc. # |
Amit Daniel Kachhap | e6a01f5 | 2011-07-20 11:45:59 +0530 | [diff] [blame] | 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 | # |
micky387 | 9b9f5e7 | 2025-07-08 18:04:53 -0400 | [diff] [blame] | 31 | # Author: Thomas E. Dickey 1996-on |
Amit Daniel Kachhap | e6a01f5 | 2011-07-20 11:45:59 +0530 | [diff] [blame] | 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 | |
Steve Kondik | ae271bc | 2015-11-15 02:50:53 +0100 | [diff] [blame] | 43 | SHELL = @SHELL@ |
| 44 | VPATH = @srcdir@ |
Amit Daniel Kachhap | e6a01f5 | 2011-07-20 11:45:59 +0530 | [diff] [blame] | 45 | THIS = Makefile |
| 46 | |
| 47 | DESTDIR = @DESTDIR@ |
| 48 | srcdir = @srcdir@ |
| 49 | prefix = @prefix@ |
| 50 | exec_prefix = @exec_prefix@ |
| 51 | includedir = @includedir@ |
Steve Kondik | ae271bc | 2015-11-15 02:50:53 +0100 | [diff] [blame] | 52 | includesubdir = @includesubdir@ |
| 53 | |
| 54 | INCLUDEDIR = $(DESTDIR)$(includedir)$(includesubdir) |
Amit Daniel Kachhap | e6a01f5 | 2011-07-20 11:45:59 +0530 | [diff] [blame] | 55 | |
| 56 | INSTALL = @INSTALL@ |
| 57 | INSTALL_DATA = @INSTALL_DATA@ |
| 58 | |
| 59 | AWK = @AWK@ |
| 60 | LN_S = @LN_S@ |
| 61 | |
micky387 | 9b9f5e7 | 2025-07-08 18:04:53 -0400 | [diff] [blame] | 62 | CC = @CC@ |
| 63 | CFLAGS = @CFLAGS@ @EXTRA_CFLAGS@ |
| 64 | CPPFLAGS = -DHAVE_CONFIG_H -I. @CPPFLAGS@ |
| 65 | |
Steve Kondik | ae271bc | 2015-11-15 02:50:53 +0100 | [diff] [blame] | 66 | CTAGS = @CTAGS@ |
| 67 | ETAGS = @ETAGS@ |
| 68 | |
Amit Daniel Kachhap | e6a01f5 | 2011-07-20 11:45:59 +0530 | [diff] [blame] | 69 | VERSION = @cf_cv_rel_version@ |
| 70 | |
| 71 | # The "Caps" file specifies the terminfo database format, as well as the list |
| 72 | # of function keys. |
| 73 | TERMINFO_CAPS = $(srcdir)/@TERMINFO_CAPS@ |
micky387 | 9b9f5e7 | 2025-07-08 18:04:53 -0400 | [diff] [blame] | 74 | CAPLIST = $(TERMINFO_CAPS) \ |
| 75 | $(srcdir)/Caps-ncurses |
Amit Daniel Kachhap | e6a01f5 | 2011-07-20 11:45:59 +0530 | [diff] [blame] | 76 | |
| 77 | # These files are generated by the configure script |
| 78 | CONFIG_SRC = \ |
| 79 | MKterm.h.awk \ |
| 80 | curses.head \ |
Steve Kondik | ae271bc | 2015-11-15 02:50:53 +0100 | [diff] [blame] | 81 | ncurses_dll.h \ |
Amit Daniel Kachhap | e6a01f5 | 2011-07-20 11:45:59 +0530 | [diff] [blame] | 82 | termcap.h \ |
| 83 | unctrl.h |
| 84 | |
| 85 | # These files are generated by this makefile |
| 86 | AUTO_SRC = \ |
| 87 | curses.h \ |
| 88 | hashsize.h \ |
| 89 | ncurses_def.h \ |
| 90 | parametrized.h \ |
Steve Kondik | ae271bc | 2015-11-15 02:50:53 +0100 | [diff] [blame] | 91 | config.h \ |
Amit Daniel Kachhap | e6a01f5 | 2011-07-20 11:45:59 +0530 | [diff] [blame] | 92 | term.h |
| 93 | |
| 94 | ################################################################################ |
micky387 | 9b9f5e7 | 2025-07-08 18:04:53 -0400 | [diff] [blame] | 95 | |
| 96 | @MAKE_PHONY@.PHONY : all |
| 97 | @MAKE_PHONY@.PHONY : check |
| 98 | @MAKE_PHONY@.PHONY : clean |
| 99 | @MAKE_PHONY@.PHONY : depend |
| 100 | @MAKE_PHONY@.PHONY : distclean |
| 101 | @MAKE_PHONY@.PHONY : install |
| 102 | @MAKE_PHONY@.PHONY : install.libs |
| 103 | @MAKE_PHONY@.PHONY : libs |
| 104 | @MAKE_PHONY@.PHONY : mostlyclean |
| 105 | @MAKE_PHONY@.PHONY : realclean |
| 106 | @MAKE_PHONY@.PHONY : sources |
| 107 | @MAKE_PHONY@.PHONY : uninstall |
| 108 | @MAKE_PHONY@.PHONY : uninstall.libs |
| 109 | |
Amit Daniel Kachhap | e6a01f5 | 2011-07-20 11:45:59 +0530 | [diff] [blame] | 110 | all \ |
| 111 | libs \ |
| 112 | depend \ |
| 113 | sources \ |
| 114 | install :: $(AUTO_SRC) |
| 115 | |
micky387 | 9b9f5e7 | 2025-07-08 18:04:53 -0400 | [diff] [blame] | 116 | curses.h : $(CAPLIST) \ |
Amit Daniel Kachhap | e6a01f5 | 2011-07-20 11:45:59 +0530 | [diff] [blame] | 117 | curses.head \ |
| 118 | $(srcdir)/curses.tail \ |
| 119 | $(srcdir)/MKkey_defs.sh |
| 120 | cat curses.head >$@ |
micky387 | 9b9f5e7 | 2025-07-08 18:04:53 -0400 | [diff] [blame] | 121 | AWK=$(AWK) $(SHELL) $(srcdir)/MKkey_defs.sh $(CAPLIST) >>$@ |
| 122 | $(SHELL) -c 'if test "@NCURSES_WGETCH_EVENTS@" = "1" ; then cat $(srcdir)/curses.events >>$@ ; fi' |
Steve Kondik | ae271bc | 2015-11-15 02:50:53 +0100 | [diff] [blame] | 123 | $(SHELL) -c 'if test "@NCURSES_CH_T@" = "cchar_t" ; then cat $(srcdir)/curses.wide >>$@ ; fi' |
Amit Daniel Kachhap | e6a01f5 | 2011-07-20 11:45:59 +0530 | [diff] [blame] | 124 | cat $(srcdir)/curses.tail >>$@ |
| 125 | |
micky387 | 9b9f5e7 | 2025-07-08 18:04:53 -0400 | [diff] [blame] | 126 | term.h: $(CAPLIST) \ |
| 127 | MKterm.h.awk |
| 128 | $(AWK) -f MKterm.h.awk $(CAPLIST) > $@ |
Steve Kondik | ae271bc | 2015-11-15 02:50:53 +0100 | [diff] [blame] | 129 | $(SHELL) $(srcdir)/edit_cfg.sh ../include/ncurses_cfg.h $@ |
Amit Daniel Kachhap | e6a01f5 | 2011-07-20 11:45:59 +0530 | [diff] [blame] | 130 | |
micky387 | 9b9f5e7 | 2025-07-08 18:04:53 -0400 | [diff] [blame] | 131 | hashsize.h: $(CAPLIST) \ |
| 132 | $(srcdir)/MKhashsize.sh |
| 133 | $(SHELL) $(srcdir)/MKhashsize.sh $(CAPLIST) >$@ |
Amit Daniel Kachhap | e6a01f5 | 2011-07-20 11:45:59 +0530 | [diff] [blame] | 134 | |
| 135 | ncurses_def.h: $(srcdir)/ncurses_defs $(srcdir)/MKncurses_def.sh |
Steve Kondik | ae271bc | 2015-11-15 02:50:53 +0100 | [diff] [blame] | 136 | AWK=$(AWK) $(SHELL) $(srcdir)/MKncurses_def.sh $(srcdir)/ncurses_defs >$@ |
Amit Daniel Kachhap | e6a01f5 | 2011-07-20 11:45:59 +0530 | [diff] [blame] | 137 | |
micky387 | 9b9f5e7 | 2025-07-08 18:04:53 -0400 | [diff] [blame] | 138 | parametrized.h: $(CAPLIST) \ |
| 139 | $(srcdir)/MKparametrized.sh |
| 140 | AWK=$(AWK) $(SHELL) $(srcdir)/MKparametrized.sh $(CAPLIST) >$@ |
Steve Kondik | ae271bc | 2015-11-15 02:50:53 +0100 | [diff] [blame] | 141 | |
| 142 | # This is required by pthread.h on MinGW |
| 143 | config.h: |
| 144 | touch $@ |
Amit Daniel Kachhap | e6a01f5 | 2011-07-20 11:45:59 +0530 | [diff] [blame] | 145 | |
| 146 | tags: |
Steve Kondik | ae271bc | 2015-11-15 02:50:53 +0100 | [diff] [blame] | 147 | $(CTAGS) *.[ch] |
Amit Daniel Kachhap | e6a01f5 | 2011-07-20 11:45:59 +0530 | [diff] [blame] | 148 | |
| 149 | @MAKE_UPPER_TAGS@TAGS: |
Steve Kondik | ae271bc | 2015-11-15 02:50:53 +0100 | [diff] [blame] | 150 | @MAKE_UPPER_TAGS@ $(ETAGS) *.[ch] |
Amit Daniel Kachhap | e6a01f5 | 2011-07-20 11:45:59 +0530 | [diff] [blame] | 151 | |
| 152 | mostlyclean :: |
| 153 | -rm -f core tags TAGS *~ *.bak *.i *.ln *.atac trace |
| 154 | |
| 155 | clean :: mostlyclean |
| 156 | -rm -f $(AUTO_SRC) |
Steve Kondik | ae271bc | 2015-11-15 02:50:53 +0100 | [diff] [blame] | 157 | -rm -rf *.dSYM |
Amit Daniel Kachhap | e6a01f5 | 2011-07-20 11:45:59 +0530 | [diff] [blame] | 158 | |
| 159 | distclean :: clean |
Steve Kondik | ae271bc | 2015-11-15 02:50:53 +0100 | [diff] [blame] | 160 | -rm -f Makefile $(CONFIG_SRC) config.h |
Amit Daniel Kachhap | e6a01f5 | 2011-07-20 11:45:59 +0530 | [diff] [blame] | 161 | |
| 162 | realclean :: distclean |
| 163 | |
micky387 | 9b9f5e7 | 2025-07-08 18:04:53 -0400 | [diff] [blame] | 164 | # Verify that each header-file can be compiled without including another. |
| 165 | check: |
| 166 | @$(SHELL) -c "for header in *.h;\ |
| 167 | do \ |
| 168 | echo \"** testing \$${header}\" ; \ |
| 169 | echo \"#include <\$${header}>\" >headers.c; \ |
| 170 | echo \"int main(void) { return 0; }\" >>headers.c; \ |
| 171 | $(CC) -c $(CFLAGS) $(CPPFLAGS) headers.c; \ |
| 172 | done" |
| 173 | -@rm -f headers.* |
| 174 | |
Amit Daniel Kachhap | e6a01f5 | 2011-07-20 11:45:59 +0530 | [diff] [blame] | 175 | ############################################################################### |
| 176 | # The remainder of this file is automatically generated during configuration |
| 177 | ############################################################################### |