ncurses 6.1 - patch 20180901
[ncurses.git] / c++ / Makefile.in
1 # $Id: Makefile.in,v 1.118 2018/08/12 00:06:34 tom Exp $
2 ##############################################################################
3 # Copyright (c) 1998-2017,2018 Free Software Foundation, Inc.                #
4 #                                                                            #
5 # Permission is hereby granted, free of charge, to any person obtaining a    #
6 # copy of this software and associated documentation files (the "Software"), #
7 # to deal in the Software without restriction, including without limitation  #
8 # the rights to use, copy, modify, merge, publish, distribute, distribute    #
9 # with modifications, sublicense, and/or sell copies of the Software, and to #
10 # permit persons to whom the Software is furnished to do so, subject to the  #
11 # following conditions:                                                      #
12 #                                                                            #
13 # The above copyright notice and this permission notice shall be included in #
14 # all copies or substantial portions of the Software.                        #
15 #                                                                            #
16 # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR #
17 # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,   #
18 # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL    #
19 # THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER      #
20 # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING    #
21 # FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER        #
22 # DEALINGS IN THE SOFTWARE.                                                  #
23 #                                                                            #
24 # Except as contained in this notice, the name(s) of the above copyright     #
25 # holders shall not be used in advertising or otherwise to promote the sale, #
26 # use or other dealings in this Software without prior written               #
27 # authorization.                                                             #
28 ##############################################################################
29 #
30 # Author: Thomas E. Dickey
31 #
32 #  Simple makefile for c++ window class demo
33
34 # turn off _all_ suffix rules; we'll generate our own
35 .SUFFIXES:
36
37 SHELL           = @SHELL@
38 VPATH           = @srcdir@
39
40 CF_MFLAGS       = @cf_cv_makeflags@
41 @SET_MAKE@
42 x               = @EXEEXT@
43 o               = .@OBJEXT@
44
45 MODEL           = ../@DFT_OBJ_SUBDIR@
46 DESTDIR         = @DESTDIR@
47 top_srcdir      = @top_srcdir@
48 srcdir          = @srcdir@
49 prefix          = @prefix@
50 exec_prefix     = @exec_prefix@
51 bindir          = @bindir@
52 libdir          = @libdir@
53 includedir      = @includedir@
54 includesubdir   = @includesubdir@
55
56 INCLUDEDIR      = $(DESTDIR)$(includedir)$(includesubdir)
57
58 PACKAGE         = @PACKAGE@
59
60 LIBTOOL         = @LIBTOOL_CXX@
61 LIBTOOL_OPTS    = @LIBTOOL_OPTS@ @LIBTOOL_OPTS_CXX@
62 LIBTOOL_CLEAN   = @LIB_CLEAN@
63 LIBTOOL_COMPILE = @LIB_COMPILE@
64 LIBTOOL_LINK    = @LIB_LINK@
65 LIBTOOL_INSTALL = @LIB_INSTALL@
66 LIBTOOL_UNINSTALL = @LIB_UNINSTALL@
67 LIBTOOL_VERSION = @LIBTOOL_VERSION@
68 LT_UNDEF        = @LT_UNDEF@
69
70 INSTALL         = @INSTALL@ 
71 INSTALL_LIB     = $(INSTALL) @INSTALL_LIB@
72 INSTALL_DATA    = @INSTALL_DATA@
73 INSTALL_OPT_P   = @INSTALL_OPT_P@
74
75 AR              = @AR@
76 ARFLAGS         = @ARFLAGS@
77 AWK             = @AWK@
78 LD              = @LD@
79 LN_S            = @LN_S@
80
81 CXX_AR          = @CXX_AR@
82 CXX_ARFLAGS     = @CXX_ARFLAGS@
83 RANLIB          = @LIB_PREP@
84
85 CXX             = @CXX@
86 CPP             = @CXXCPP@
87 CXXFLAGS        = @CXXFLAGS@ @EXTRA_CXXFLAGS@
88 CXXLIBS         = @CXXLIBS@
89
90 INCDIR          = ../include
91 CPPFLAGS        = -DHAVE_CONFIG_H -I../c++ @CPPFLAGS@
92
93 CTAGS           = @CTAGS@
94 ETAGS           = @ETAGS@
95
96 CC              = ${CXX}
97 CCFLAGS         = $(CPPFLAGS) $(CXXFLAGS)
98
99 CFLAGS_LIBTOOL  = $(CCFLAGS)
100 CFLAGS_NORMAL   = $(CCFLAGS)
101 CFLAGS_DEBUG    = $(CCFLAGS) @CXX_G_OPT@ -DTRACE
102 CFLAGS_PROFILE  = $(CCFLAGS) -pg
103 CFLAGS_SHARED   = $(CCFLAGS) @CC_SHARED_OPTS@
104
105 CFLAGS_DEFAULT  = $(CFLAGS_@DFT_UPR_MODEL@)
106
107 NCURSES_MAJOR   = @NCURSES_MAJOR@
108 NCURSES_MINOR   = @NCURSES_MINOR@
109 REL_VERSION     = @cf_cv_rel_version@
110 ABI_VERSION     = @cf_cv_abi_version@
111
112 LOCAL_LIBDIR    = @top_builddir@/lib
113
114 LINK            = @LINK_PROGS@ $(LIBTOOL_LINK) @CXXLDFLAGS@
115 SHLIB_DIRS      = -L../lib
116 SHLIB_LIST      = $(SHLIB_DIRS) -lform@USE_LIB_SUFFIX@ -lmenu@USE_LIB_SUFFIX@ -lpanel@USE_LIB_SUFFIX@ -lncurses@USE_LIB_SUFFIX@ @SHLIB_LIST@
117
118 LIBROOT         = ncurses++
119
120 LIBNAME_LIBTOOL = @LIB_PREFIX@$(LIBROOT)@USE_LIB_SUFFIX@.la
121 LIBNAME_NORMAL  = @LIB_PREFIX@$(LIBROOT)@USE_LIB_SUFFIX@.a
122 LIBNAME         = @LIB_PREFIX@$(LIBROOT)@CXX_LIB_SUFFIX@
123
124 LIBRARIES       = @Libs_To_Make@
125
126 LINK_FLAGS      = @EXTRA_LDFLAGS@ -L../lib -l$(LIBROOT)@USE_LIB_SUFFIX@
127 RPATH_LIST      = @RPATH_LIST@
128 MK_SHARED_LIB   = @MK_SHARED_LIB@
129
130 LINK_LIBTOOL    = @EXTRA_LDFLAGS@ -L../lib $(LIBRARIES)
131 LINK_NORMAL     = $(LINK_FLAGS)
132 LINK_DEBUG      = $(LINK_FLAGS)
133 LINK_PROFILE    = $(LINK_FLAGS)
134 LINK_SHARED     = $(LINK_FLAGS)
135
136 # flags for test-programs
137 TEST_LIBS       = @TEST_LIBS@
138 TEST_ARGS       = @LDFLAGS_STATIC@ @TEST_ARGS@ @LDFLAGS_SHARED@ 
139 TEST_LDFLAGS    = $(TEST_ARGS) @LDFLAGS@ \
140         @LD_MODEL@ $(TEST_LIBS) @LIBS@ @LOCAL_LDFLAGS@ $(CXXLIBS)
141
142 LDFLAGS_LIBTOOL = $(TEST_LDFLAGS) $(CFLAGS_LIBTOOL)
143 LDFLAGS_NORMAL  = $(TEST_LDFLAGS) $(CFLAGS_NORMAL)
144 LDFLAGS_DEBUG   = $(TEST_LDFLAGS) $(CFLAGS_DEBUG)
145 LDFLAGS_PROFILE = $(TEST_LDFLAGS) $(CFLAGS_PROFILE)
146 LDFLAGS_SHARED  = $(TEST_LDFLAGS) $(CFLAGS_SHARED) @LD_SHARED_OPTS@
147
148 LDFLAGS_DEFAULT = $(LINK_@DFT_UPR_MODEL@) $(LDFLAGS_@DFT_UPR_MODEL@)
149
150 # flags for library built by this makefile
151 LDFLAGS         = $(TEST_ARGS) @LDFLAGS@ \
152         @LD_MODEL@ $(TEST_LIBS) @LIBS@ $(CXXLIBS)
153
154 AUTO_SRC        = \
155                 etip.h
156
157 all \
158 libs ::         $(AUTO_SRC) $(LIBRARIES)
159
160 @MAKE_TESTS@all ::              demo$x
161
162 sources :       $(AUTO_SRC)
163
164 depend :
165
166 tags:
167         $(CTAGS) *.[h] *.cc
168
169 $(DESTDIR)$(libdir) :
170         mkdir -p $@
171
172 mostlyclean ::
173         -rm -f core tags TAGS *~ *.bak *.i *.ii *.ln *.atac trace
174
175 clean :: mostlyclean
176         -$(SHELL) -c "if test -n '$x' ; then $(MAKE) clean x=''; fi"
177         -rm -rf $(MODEL)/SunWS_cache
178         -$(LIBTOOL_CLEAN) rm -f demo$x $(AUTO_SRC) $(LIBRARIES) $(OBJS_DEMO)
179         -rm -rf .libs *.dSYM
180
181 distclean :: clean
182         -rm -f Makefile
183
184 realclean :: distclean
185
186 ###############################################################################
187
188 internal_h      = $(srcdir)/internal.h \
189                   $(INCDIR)/ncurses_cfg.h \
190                   $(INCDIR)/nc_mingw.h \
191                   $(INCDIR)/nc_string.h
192
193 etip_h          = etip.h \
194                   $(INCDIR)/ncurses_dll.h
195
196 cursesw_h       = $(srcdir)/cursesw.h \
197                   $(etip_h) \
198                   $(INCDIR)/curses.h
199
200 cursesp_h       = $(srcdir)/cursesp.h \
201                   $(cursesw_h) \
202                   $(INCDIR)/panel.h
203
204 cursesf_h       = $(srcdir)/cursesf.h \
205                   $(cursesp_h) \
206                   $(INCDIR)/form.h
207
208 cursesm_h       = $(srcdir)/cursesm.h \
209                   $(cursesp_h) \
210                   $(INCDIR)/menu.h
211
212 cursslk_h       = $(srcdir)/cursslk.h \
213                   $(cursesw_h)
214
215 cursesapp_h     = $(srcdir)/cursesapp.h \
216                   $(cursslk_h)
217
218 $(INCDIR)/form.h :
219         cd ../form && $(MAKE) $@
220
221 $(INCDIR)/menu.h :
222         cd ../menu && $(MAKE) $@
223
224 $(INCDIR)/panel.h :
225         cd ../panel && $(MAKE) $@
226
227 ###############################################################################
228
229 OBJS_DEMO = $(MODEL)/demo$o
230
231 $(MODEL)/demo$o : $(srcdir)/demo.cc \
232                 $(internal_h) \
233                 $(cursesf_h) \
234                 $(cursesm_h) \
235                 $(cursesapp_h)
236         @echo 'compiling demo (obj_s)'
237         @$(LIBTOOL_COMPILE) $(CXX) $(CFLAGS_DEFAULT) -c $(srcdir)/demo.cc -o $@
238
239 demo$x: $(OBJS_DEMO) \
240         $(LIBRARIES)  \
241         @TEST_DEPS@
242         @ECHO_LD@ $(LINK) -o $@ $(OBJS_DEMO) $(LDFLAGS_DEFAULT)
243
244 etip.h: $(srcdir)/etip.h.in $(srcdir)/edit_cfg.sh
245         cp $(srcdir)/etip.h.in $@
246         $(SHELL) $(srcdir)/edit_cfg.sh ../include/ncurses_cfg.h $@
247
248 ###############################################################################
249 # The remainder of this file is automatically generated during configuration
250 ###############################################################################