ncurses 6.2 - patch 20200718
[ncurses.git] / c++ / Makefile.in
1 # $Id: Makefile.in,v 1.125 2020/07/18 20:33:27 tom Exp $
2 ##############################################################################
3 # Copyright 2018,2020 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 LINK_FLAGS      = @EXTRA_LDFLAGS@ -L../lib -l$(LIBROOT)@USE_LIB_SUFFIX@
132 RPATH_LIST      = @RPATH_LIST@
133 MK_SHARED_LIB   = @MK_SHARED_LIB@
134
135 LINK_LIBTOOL    = @EXTRA_LDFLAGS@ -L../lib $(LIBRARIES)
136 LINK_NORMAL     = $(LINK_FLAGS)
137 LINK_DEBUG      = $(LINK_FLAGS)
138 LINK_PROFILE    = $(LINK_FLAGS)
139 LINK_SHARED     = $(LINK_FLAGS)
140
141 # flags for test-programs
142 TEST_LIBS       = @TEST_LIBS@
143 TEST_ARGS       = @LDFLAGS_STATIC@ @TEST_ARGS@ @LDFLAGS_SHARED@ 
144 TEST_LDFLAGS    = $(TEST_ARGS) @LDFLAGS@ \
145         @LD_MODEL@ $(TEST_LIBS) @LIBS@ @LOCAL_LDFLAGS@ $(CXXLIBS)
146
147 LDFLAGS_LIBTOOL = $(TEST_LDFLAGS) $(CFLAGS_LIBTOOL)
148 LDFLAGS_NORMAL  = $(TEST_LDFLAGS) $(CFLAGS_NORMAL)
149 LDFLAGS_DEBUG   = $(TEST_LDFLAGS) $(CFLAGS_DEBUG)
150 LDFLAGS_PROFILE = $(TEST_LDFLAGS) $(CFLAGS_PROFILE)
151 LDFLAGS_SHARED  = $(TEST_LDFLAGS) $(CFLAGS_SHARED) @LD_SHARED_OPTS@
152
153 LDFLAGS_DEFAULT = $(LINK_@DFT_UPR_MODEL@) $(LDFLAGS_@DFT_UPR_MODEL@)
154
155 # flags for library built by this makefile
156 LDFLAGS         = $(TEST_ARGS) @LDFLAGS@ \
157         @LD_MODEL@ $(TEST_LIBS) @LIBS@ $(CXXLIBS)
158
159 AUTO_SRC        = \
160                 etip.h
161
162 all \
163 libs ::         $(AUTO_SRC) $(LIBRARIES)
164
165 @MAKE_TESTS@all ::              demo$x
166
167 sources :       $(AUTO_SRC)
168
169 depend :
170
171 tags:
172         $(CTAGS) *.[h] *.cc
173
174 $(DESTDIR)$(libdir) :
175         mkdir -p $@
176
177 mostlyclean ::
178         -rm -f core tags TAGS *~ *.bak *.i *.ii *.ln *.atac trace
179
180 clean :: mostlyclean
181         -$(SHELL) -c "if test -n '$x' ; then $(MAKE) clean x=''; fi"
182         -rm -rf $(MODEL)/SunWS_cache
183         -$(LIBTOOL_CLEAN) rm -f demo$x $(AUTO_SRC) $(LIBRARIES) $(OBJS_DEMO)
184         -rm -rf .libs *.dSYM
185
186 distclean :: clean
187         -rm -f Makefile
188
189 realclean :: distclean
190
191 ###############################################################################
192
193 HEADER_DEPS     = \
194         etip.h \
195         ../include/curses.h \
196         ../include/eti.h \
197         ../include/form.h \
198         ../include/menu.h \
199         ../include/ncurses_cfg.h \
200         ../include/ncurses_def.h \
201         ../include/ncurses_dll.h \
202         ../include/panel.h \
203         ../include/unctrl.h \
204         $(INCDIR)/nc_mingw.h \
205         $(INCDIR)/nc_string.h \
206         $(srcdir)/cursesp.h \
207         $(srcdir)/cursesw.h \
208         $(srcdir)/cursslk.h \
209         $(srcdir)/internal.h
210
211 cursesw_h       = $(srcdir)/cursesw.h \
212                   $(HEADER_DEPS)
213
214 cursesp_h       = $(srcdir)/cursesp.h \
215                   $(cursesw_h)
216
217 cursesf_h       = $(srcdir)/cursesf.h \
218                   $(cursesp_h)
219
220 cursesm_h       = $(srcdir)/cursesm.h \
221                   $(cursesp_h)
222
223 cursslk_h       = $(srcdir)/cursslk.h \
224                   $(cursesw_h)
225
226 cursesapp_h     = $(srcdir)/cursesapp.h \
227                   $(cursslk_h)
228
229 $(INCDIR)/form.h :
230         cd ../form && $(MAKE) $@
231
232 $(INCDIR)/menu.h :
233         cd ../menu && $(MAKE) $@
234
235 $(INCDIR)/panel.h :
236         cd ../panel && $(MAKE) $@
237
238 ###############################################################################
239
240 OBJS_DEMO = $(MODEL)/demo$o
241
242 $(MODEL)/demo$o : $(srcdir)/demo.cc \
243                 $(HEADER_DEPS) \
244                 $(cursesf_h) \
245                 $(cursesm_h) \
246                 $(cursesapp_h)
247         @echo 'compiling demo (obj_s)'
248         @cd $(MODEL) && $(LIBTOOL_COMPILE) $(CXX) $(CFLAGS_DEFAULT) -c $(top_srcdir)/c++/demo.cc -o $@
249
250 demo$x: $(OBJS_DEMO) \
251         $(LIBRARIES)  \
252         @TEST_DEPS@
253         @ECHO_LD@ $(LINK) -o $@ $(OBJS_DEMO) $(LDFLAGS_DEFAULT)
254
255 etip.h: $(srcdir)/etip.h.in $(srcdir)/edit_cfg.sh
256         cp $(srcdir)/etip.h.in $@
257         $(SHELL) $(srcdir)/edit_cfg.sh ../include/ncurses_cfg.h $@
258
259 ###############################################################################
260 # The remainder of this file is automatically generated during configuration
261 ###############################################################################