]> ncurses.scripts.mit.edu Git - ncurses.git/blob - c++/Makefile.in
ncurses 6.3 - patch 20220703
[ncurses.git] / c++ / Makefile.in
1 # $Id: Makefile.in,v 1.133 2021/07/03 18:53:57 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 ################################################################################
167
168 @MAKE_PHONY@.PHONY :    all
169 @MAKE_PHONY@.PHONY :    check
170 @MAKE_PHONY@.PHONY :    clean
171 @MAKE_PHONY@.PHONY :    depend
172 @MAKE_PHONY@.PHONY :    distclean
173 @MAKE_PHONY@.PHONY :    install
174 @MAKE_PHONY@.PHONY :    install.libs
175 @MAKE_PHONY@.PHONY :    libs
176 @MAKE_PHONY@.PHONY :    mostlyclean
177 @MAKE_PHONY@.PHONY :    realclean
178 @MAKE_PHONY@.PHONY :    sources
179 @MAKE_PHONY@.PHONY :    uninstall
180 @MAKE_PHONY@.PHONY :    uninstall.libs
181
182 all \
183 libs ::         $(AUTO_SRC) $(LIBRARIES)
184
185 @MAKE_TESTS@all ::              demo$x
186
187 depend :
188
189 sources :       $(AUTO_SRC)
190
191 tags:
192         $(CTAGS) *.[h] *.cc
193
194 $(DESTDIR)$(libdir) :
195         mkdir -p $@
196
197 mostlyclean ::
198         -rm -f core tags TAGS *~ *.bak *.i *.ii *.ln *.atac trace
199
200 clean :: mostlyclean
201         -$(SHELL) -c "if test -n '$x' ; then $(MAKE) clean x=''; fi"
202         -rm -rf $(MODEL)/SunWS_cache
203         -$(LIBTOOL_CLEAN) rm -f demo$x $(AUTO_SRC) $(LIBRARIES) $(OBJS_DEMO)
204         -rm -rf .libs *.dSYM
205
206 distclean :: clean
207         -rm -f Makefile
208
209 realclean :: distclean
210
211 ###############################################################################
212
213 HEADER_DEPS     = @INTERNALS_HDR@ \
214         etip.h \
215         ../include/curses.h \
216         ../include/eti.h \
217         ../include/form.h \
218         ../include/menu.h \
219         ../include/ncurses_cfg.h \
220         ../include/ncurses_def.h \
221         ../include/ncurses_dll.h \
222         ../include/panel.h \
223         ../include/unctrl.h \
224         $(INCDIR)/nc_string.h \
225         $(srcdir)/cursesp.h \
226         $(srcdir)/cursesw.h \
227         $(srcdir)/cursslk.h \
228         $(srcdir)/internal.h
229
230 cursesw_h       = $(srcdir)/cursesw.h \
231                   $(HEADER_DEPS)
232
233 cursesp_h       = $(srcdir)/cursesp.h \
234                   $(cursesw_h)
235
236 cursesf_h       = $(srcdir)/cursesf.h \
237                   $(cursesp_h)
238
239 cursesm_h       = $(srcdir)/cursesm.h \
240                   $(cursesp_h)
241
242 cursslk_h       = $(srcdir)/cursslk.h \
243                   $(cursesw_h)
244
245 cursesapp_h     = $(srcdir)/cursesapp.h \
246                   $(cursslk_h)
247
248 $(INCDIR)/form.h :
249         ( cd ../form && $(MAKE) $@ )
250
251 $(INCDIR)/menu.h :
252         ( cd ../menu && $(MAKE) $@ )
253
254 $(INCDIR)/panel.h :
255         ( cd ../panel && $(MAKE) $@ )
256
257 ###############################################################################
258
259 OBJS_DEMO = $(MODEL)/demo$o
260
261 $(MODEL)/demo$o : $(srcdir)/demo.cc \
262                 $(HEADER_DEPS) \
263                 $(cursesf_h) \
264                 $(cursesm_h) \
265                 $(cursesapp_h)
266         @echo 'compiling demo (obj_s)'
267         @( cd $(MODEL) && $(LIBTOOL_COMPILE) $(CXX) $(CFLAGS_DEFAULT) -c $(top_srcdir)/c++/demo.cc -o $@ )
268
269 demo$x: $(OBJS_DEMO) \
270         $(LIBRARIES)  \
271         @TEST_DEPS@
272         @ECHO_LD@ $(LINK) -o $@ $(OBJS_DEMO) $(LDFLAGS_DEFAULT)
273
274 etip.h: $(srcdir)/etip.h.in $(srcdir)/edit_cfg.sh
275         cp $(srcdir)/etip.h.in $@
276         $(SHELL) $(srcdir)/edit_cfg.sh ../include/ncurses_cfg.h $@
277
278 # Verify that each header-file can be compiled without including another.
279 check ::
280         @$(SHELL) -c "for header in *.h;\
281                 do \
282                         [ \$${header} = etip.h ] && continue; \
283                         echo \"** testing \$${header}\" ; \
284                         echo \"#include <\$${header}>\" >headers.cc; \
285                         echo \"int main(int argc, char **argv) { (void) argc; (void) argv; return 0; }\" >>headers.cc; \
286                         $(CXX) -c $(CXXFLAGS) $(CPPFLAGS) headers.cc; \
287                 done"
288         -@rm -f headers.*
289
290 ###############################################################################
291 # The remainder of this file is automatically generated during configuration
292 ###############################################################################