ncurses 6.2 - patch 20210619
[ncurses.git] / c++ / Makefile.in
1 # $Id: Makefile.in,v 1.131 2021/06/17 21:11:08 tom Exp $
2 ##############################################################################
3 # Copyright 2018-2020,2021 Thomas E. Dickey                                  #
4 # Copyright 1998-2015,2016 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
32 #
33 #  Simple makefile for c++ window class demo
34
35 # turn off _all_ suffix rules; we'll generate our own
36 .SUFFIXES:
37
38 SHELL           = @SHELL@
39 VPATH           = @srcdir@
40
41 CF_MFLAGS       = @cf_cv_makeflags@
42 @SET_MAKE@
43 x               = @EXEEXT@
44 o               = .@OBJEXT@
45
46 MODEL           = ../@DFT_OBJ_SUBDIR@
47 DESTDIR         = @DESTDIR@
48 top_srcdir      = @top_srcdir@
49 srcdir          = @srcdir@
50 prefix          = @prefix@
51 exec_prefix     = @exec_prefix@
52 bindir          = @bindir@
53 libdir          = @libdir@
54 includedir      = @includedir@
55 includesubdir   = @includesubdir@
56
57 INCLUDEDIR      = $(DESTDIR)$(includedir)$(includesubdir)
58
59 PACKAGE         = @PACKAGE@
60
61 LIBTOOL         = @LIBTOOL_CXX@
62 LIBTOOL_OPTS    = @LIBTOOL_OPTS@ @LIBTOOL_OPTS_CXX@
63 LIBTOOL_CLEAN   = @LIB_CLEAN@
64 LIBTOOL_COMPILE = @LIB_COMPILE@
65 LIBTOOL_LINK    = @LIB_LINK@
66 LIBTOOL_INSTALL = @LIB_INSTALL@
67 LIBTOOL_UNINSTALL = @LIB_UNINSTALL@
68 LIBTOOL_VERSION = @LIBTOOL_VERSION@
69 LT_UNDEF        = @LT_UNDEF@
70
71 INSTALL         = @INSTALL@
72 INSTALL_LIB     = $(INSTALL) @INSTALL_LIB@
73 INSTALL_DATA    = @INSTALL_DATA@
74 INSTALL_OPT_P   = @INSTALL_OPT_P@
75
76 AR              = @AR@
77 ARFLAGS         = @ARFLAGS@
78 AWK             = @AWK@
79 LD              = @LD@
80 LN_S            = @LN_S@
81
82 CXX_AR          = @CXX_AR@
83 CXX_ARFLAGS     = @CXX_ARFLAGS@
84 RANLIB          = @LIB_PREP@
85
86 CXX             = @CXX@
87 CPP             = @CXXCPP@
88 CXXFLAGS        = @CXXFLAGS@ @EXTRA_CXXFLAGS@
89 CXXLIBS         = @CXXLIBS@
90
91 INCDIR          = ../include
92 CPPFLAGS        = -DHAVE_CONFIG_H -DBUILDING_NCURSES_CXX -I../c++ @CPPFLAGS@
93
94 CTAGS           = @CTAGS@
95 ETAGS           = @ETAGS@
96
97 CC              = ${CXX}
98 CCFLAGS         = $(CPPFLAGS) $(CXXFLAGS)
99
100 CFLAGS_LIBTOOL  = $(CCFLAGS)
101 CFLAGS_NORMAL   = $(CCFLAGS) -DNCURSES_STATIC
102 CFLAGS_DEBUG    = $(CCFLAGS) -DNCURSES_STATIC @CXX_G_OPT@ -DTRACE
103 CFLAGS_PROFILE  = $(CCFLAGS) -DNCURSES_STATIC -pg
104 CFLAGS_SHARED   = $(CCFLAGS) @CC_SHARED_OPTS@
105
106 CFLAGS_DEFAULT  = $(CFLAGS_@DFT_UPR_MODEL@)
107
108 NCURSES_MAJOR   = @NCURSES_MAJOR@
109 NCURSES_MINOR   = @NCURSES_MINOR@
110 REL_VERSION     = @cf_cv_rel_version@
111 ABI_VERSION     = @cf_cv_abi_version@
112
113 LOCAL_LIBDIR    = @top_builddir@/lib
114
115 LINK            = @LINK_PROGS@ $(LIBTOOL_LINK) @CXXLDFLAGS@
116 SHLIB_DIRS      = -L../lib
117 SHLIB_LIST      = $(SHLIB_DIRS) \
118                 -l@FORM_NAME@@USE_LIB_SUFFIX@ \
119                 -l@MENU_NAME@@USE_LIB_SUFFIX@ \
120                 -l@PANEL_NAME@@USE_LIB_SUFFIX@ \
121                 -lncurses@USE_LIB_SUFFIX@ @SHLIB_LIST@
122
123 LIBROOT         = ncurses++
124
125 LIBNAME_LIBTOOL = @LIB_PREFIX@$(LIBROOT)@USE_LIB_SUFFIX@.la
126 LIBNAME_NORMAL  = @LIB_PREFIX@$(LIBROOT)@USE_LIB_SUFFIX@.a
127 LIBNAME         = @LIB_PREFIX@$(LIBROOT)@CXX_LIB_SUFFIX@
128
129 LIBRARIES       = @Libs_To_Make@
130
131 LINT            = @LINT@
132 LINT_OPTS       = @LINT_OPTS@
133 LINT_LIBS       = -lncurses @LIBS@
134
135 LINK_FLAGS      = @EXTRA_LDFLAGS@ -L../lib -l$(LIBROOT)@USE_LIB_SUFFIX@
136 RPATH_LIST      = @RPATH_LIST@
137 MK_SHARED_LIB   = @MK_SHARED_LIB@
138
139 LINK_LIBTOOL    = @EXTRA_LDFLAGS@ -L../lib $(LIBRARIES)
140 LINK_NORMAL     = $(LINK_FLAGS)
141 LINK_DEBUG      = $(LINK_FLAGS)
142 LINK_PROFILE    = $(LINK_FLAGS)
143 LINK_SHARED     = $(LINK_FLAGS)
144
145 # flags for test-programs
146 TEST_LIBS       = @TEST_LIBS@
147 TEST_ARGS       = @LDFLAGS_STATIC@ @TEST_ARGS@ @LDFLAGS_SHARED@
148 TEST_LDFLAGS    = $(TEST_ARGS) @LDFLAGS@ \
149         @LD_MODEL@ $(TEST_LIBS) @LIBS@ @LOCAL_LDFLAGS@ $(CXXLIBS)
150
151 LDFLAGS_LIBTOOL = $(TEST_LDFLAGS) $(CFLAGS_LIBTOOL)
152 LDFLAGS_NORMAL  = $(TEST_LDFLAGS) $(CFLAGS_NORMAL)
153 LDFLAGS_DEBUG   = $(TEST_LDFLAGS) $(CFLAGS_DEBUG)
154 LDFLAGS_PROFILE = $(TEST_LDFLAGS) $(CFLAGS_PROFILE)
155 LDFLAGS_SHARED  = $(TEST_LDFLAGS) $(CFLAGS_SHARED) @LD_SHARED_OPTS@
156
157 LDFLAGS_DEFAULT = $(LINK_@DFT_UPR_MODEL@) $(LDFLAGS_@DFT_UPR_MODEL@)
158
159 # flags for library built by this makefile
160 LDFLAGS         = $(TEST_ARGS) @LDFLAGS@ \
161         @LD_MODEL@ $(TEST_LIBS) @LIBS@ $(CXXLIBS)
162
163 AUTO_SRC        = \
164                 etip.h
165
166 all \
167 libs ::         $(AUTO_SRC) $(LIBRARIES)
168
169 @MAKE_TESTS@all ::              demo$x
170
171 sources :       $(AUTO_SRC)
172
173 depend :
174
175 tags:
176         $(CTAGS) *.[h] *.cc
177
178 $(DESTDIR)$(libdir) :
179         mkdir -p $@
180
181 mostlyclean ::
182         -rm -f core tags TAGS *~ *.bak *.i *.ii *.ln *.atac trace
183
184 clean :: mostlyclean
185         -$(SHELL) -c "if test -n '$x' ; then $(MAKE) clean x=''; fi"
186         -rm -rf $(MODEL)/SunWS_cache
187         -$(LIBTOOL_CLEAN) rm -f demo$x $(AUTO_SRC) $(LIBRARIES) $(OBJS_DEMO)
188         -rm -rf .libs *.dSYM
189
190 distclean :: clean
191         -rm -f Makefile
192
193 realclean :: distclean
194
195 ###############################################################################
196
197 HEADER_DEPS     = @INTERNALS_HDR@ \
198         etip.h \
199         ../include/curses.h \
200         ../include/eti.h \
201         ../include/form.h \
202         ../include/menu.h \
203         ../include/ncurses_cfg.h \
204         ../include/ncurses_def.h \
205         ../include/ncurses_dll.h \
206         ../include/panel.h \
207         ../include/unctrl.h \
208         $(INCDIR)/nc_string.h \
209         $(srcdir)/cursesp.h \
210         $(srcdir)/cursesw.h \
211         $(srcdir)/cursslk.h \
212         $(srcdir)/internal.h
213
214 cursesw_h       = $(srcdir)/cursesw.h \
215                   $(HEADER_DEPS)
216
217 cursesp_h       = $(srcdir)/cursesp.h \
218                   $(cursesw_h)
219
220 cursesf_h       = $(srcdir)/cursesf.h \
221                   $(cursesp_h)
222
223 cursesm_h       = $(srcdir)/cursesm.h \
224                   $(cursesp_h)
225
226 cursslk_h       = $(srcdir)/cursslk.h \
227                   $(cursesw_h)
228
229 cursesapp_h     = $(srcdir)/cursesapp.h \
230                   $(cursslk_h)
231
232 $(INCDIR)/form.h :
233         ( cd ../form && $(MAKE) $@ )
234
235 $(INCDIR)/menu.h :
236         ( cd ../menu && $(MAKE) $@ )
237
238 $(INCDIR)/panel.h :
239         ( cd ../panel && $(MAKE) $@ )
240
241 ###############################################################################
242
243 OBJS_DEMO = $(MODEL)/demo$o
244
245 $(MODEL)/demo$o : $(srcdir)/demo.cc \
246                 $(HEADER_DEPS) \
247                 $(cursesf_h) \
248                 $(cursesm_h) \
249                 $(cursesapp_h)
250         @echo 'compiling demo (obj_s)'
251         @( cd $(MODEL) && $(LIBTOOL_COMPILE) $(CXX) $(CFLAGS_DEFAULT) -c $(top_srcdir)/c++/demo.cc -o $@ )
252
253 demo$x: $(OBJS_DEMO) \
254         $(LIBRARIES)  \
255         @TEST_DEPS@
256         @ECHO_LD@ $(LINK) -o $@ $(OBJS_DEMO) $(LDFLAGS_DEFAULT)
257
258 etip.h: $(srcdir)/etip.h.in $(srcdir)/edit_cfg.sh
259         cp $(srcdir)/etip.h.in $@
260         $(SHELL) $(srcdir)/edit_cfg.sh ../include/ncurses_cfg.h $@
261
262 # Verify that each header-file can be compiled without including another.
263 check::
264         @$(SHELL) -c "for header in *.h;\
265                 do \
266                         [ \$${header} = etip.h ] && continue; \
267                         echo \"** testing \$${header}\" ; \
268                         echo \"#include <\$${header}>\" >headers.cc; \
269                         echo \"int main(int argc, char **argv) { (void) argc; (void) argv; return 0; }\" >>headers.cc; \
270                         $(CXX) -c $(CXXFLAGS) $(CPPFLAGS) headers.cc; \
271                 done"
272         -@rm -f headers.*
273
274 ###############################################################################
275 # The remainder of this file is automatically generated during configuration
276 ###############################################################################