ncurses 5.9 - patch 20140927
[ncurses.git] / c++ / Makefile.in
1 # $Id: Makefile.in,v 1.107 2014/07/26 22:51:31 tom Exp $
2 ##############################################################################
3 # Copyright (c) 1998-2013,2014 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           = /bin/sh
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 srcdir          = @srcdir@
48 prefix          = @prefix@
49 exec_prefix     = @exec_prefix@
50 bindir          = @bindir@
51 libdir          = @libdir@
52 includedir      = @includedir@
53 includesubdir   = @includesubdir@
54
55 INCLUDEDIR      = $(DESTDIR)$(includedir)$(includesubdir)
56
57 LIBTOOL         = @LIBTOOL_CXX@
58 LIBTOOL_CLEAN   = @LIB_CLEAN@
59 LIBTOOL_COMPILE = @LIB_COMPILE@
60 LIBTOOL_LINK    = @LIB_LINK@
61 LIBTOOL_INSTALL = @LIB_INSTALL@
62 LIBTOOL_UNINSTALL = @LIB_UNINSTALL@
63 LIBTOOL_VERSION = @LIBTOOL_VERSION@
64 LT_UNDEF        = @LT_UNDEF@
65
66 INSTALL         = @INSTALL@
67 INSTALL_LIB     = @INSTALL@ @INSTALL_LIB@
68 INSTALL_DATA    = @INSTALL_DATA@
69
70 AR              = @AR@
71 ARFLAGS         = @ARFLAGS@
72 AWK             = @AWK@
73 LD              = @LD@
74 LN_S            = @LN_S@
75
76 CXX_AR          = @CXX_AR@
77 CXX_ARFLAGS     = @CXX_ARFLAGS@
78 RANLIB          = @LIB_PREP@
79
80 CXX             = @CXX@
81 CPP             = @CXXCPP@
82 CXXFLAGS        = @CXXFLAGS@ @EXTRA_CXXFLAGS@
83 CXXLIBS         = @CXXLIBS@
84
85 INCDIR          = ../include
86 CPPFLAGS        = -DHAVE_CONFIG_H @CPPFLAGS@
87
88 CTAGS           = @CTAGS@
89 ETAGS           = @ETAGS@
90
91 CC              = ${CXX}
92 CCFLAGS         = $(CPPFLAGS) $(CXXFLAGS)
93
94 CFLAGS_LIBTOOL  = $(CCFLAGS)
95 CFLAGS_NORMAL   = $(CCFLAGS)
96 CFLAGS_DEBUG    = $(CCFLAGS) @CXX_G_OPT@ -DTRACE
97 CFLAGS_PROFILE  = $(CCFLAGS) -pg
98 CFLAGS_SHARED   = $(CCFLAGS) @CC_SHARED_OPTS@
99
100 CFLAGS_DEFAULT  = $(CFLAGS_@DFT_UPR_MODEL@)
101
102 NCURSES_MAJOR   = @NCURSES_MAJOR@
103 NCURSES_MINOR   = @NCURSES_MINOR@
104 REL_VERSION     = @cf_cv_rel_version@
105 ABI_VERSION     = @cf_cv_abi_version@
106
107 LOCAL_LIBDIR    = @top_builddir@/lib
108
109 LINK            = @LINK_PROGS@ $(LIBTOOL_LINK) @CXXLDFLAGS@
110 SHLIB_DIRS      = -L../lib
111 SHLIB_LIST      = $(SHLIB_DIRS) -lform@LIB_SUFFIX@ -lmenu@LIB_SUFFIX@ -lpanel@LIB_SUFFIX@ -lncurses@LIB_SUFFIX@ @SHLIB_LIST@
112
113 LIBROOT         = ncurses++
114
115 LIBNAME_LIBTOOL = @LIB_PREFIX@$(LIBROOT)@LIB_SUFFIX@.la
116 LIBNAME_NORMAL  = @LIB_PREFIX@$(LIBROOT)@LIB_SUFFIX@.a
117 LIBNAME         = @LIB_PREFIX@$(LIBROOT)@CXX_LIB_SUFFIX@
118
119 LIBRARIES       = @Libs_To_Make@
120
121 LINK_FLAGS      = @EXTRA_LDFLAGS@ -L../lib -l$(LIBROOT)@LIB_SUFFIX@
122 RPATH_LIST      = @RPATH_LIST@
123 MK_SHARED_LIB   = @MK_SHARED_LIB@
124
125 LINK_LIBTOOL    = @EXTRA_LDFLAGS@ -L../lib $(LIBRARIES)
126 LINK_NORMAL     = $(LINK_FLAGS)
127 LINK_DEBUG      = $(LINK_FLAGS)
128 LINK_PROFILE    = $(LINK_FLAGS)
129 LINK_SHARED     = $(LINK_FLAGS)
130
131 # flags for test-programs
132 TEST_LIBS       = @TEST_LIBS@
133 TEST_ARGS       = @LDFLAGS_STATIC@ @TEST_ARGS@ @LDFLAGS_SHARED@ 
134 TEST_LDFLAGS    = $(TEST_ARGS) @LDFLAGS@ \
135         @LD_MODEL@ $(TEST_LIBS) @LIBS@ @LOCAL_LDFLAGS@ $(CXXLIBS)
136
137 LDFLAGS_LIBTOOL = $(TEST_LDFLAGS) $(CFLAGS_LIBTOOL)
138 LDFLAGS_NORMAL  = $(TEST_LDFLAGS) $(CFLAGS_NORMAL)
139 LDFLAGS_DEBUG   = $(TEST_LDFLAGS) $(CFLAGS_DEBUG)
140 LDFLAGS_PROFILE = $(TEST_LDFLAGS) $(CFLAGS_PROFILE)
141 LDFLAGS_SHARED  = $(TEST_LDFLAGS) $(CFLAGS_SHARED) @LD_SHARED_OPTS@
142
143 LDFLAGS_DEFAULT = $(LINK_@DFT_UPR_MODEL@) $(LDFLAGS_@DFT_UPR_MODEL@)
144
145 # flags for library built by this makefile
146 LDFLAGS         = $(TEST_ARGS) @LDFLAGS@ \
147         @LD_MODEL@ $(TEST_LIBS) @LIBS@ $(CXXLIBS)
148
149 AUTO_SRC        = \
150                 etip.h
151
152 all \
153 libs ::         $(AUTO_SRC) $(LIBRARIES)
154
155 @MAKE_TESTS@all ::              demo$x
156
157 sources :       $(AUTO_SRC)
158
159 depend :
160
161 tags:
162         $(CTAGS) *.[h] *.cc
163
164 $(DESTDIR)$(libdir) :
165         mkdir -p $@
166
167 mostlyclean ::
168         -rm -f core tags TAGS *~ *.bak *.i *.ii *.ln *.atac trace
169
170 clean :: mostlyclean
171         -sh -c "if test -n '$x' ; then $(MAKE) clean x=''; fi"
172         -rm -rf $(MODEL)/SunWS_cache
173         -$(LIBTOOL_CLEAN) rm -f demo$x $(AUTO_SRC) $(LIBRARIES) $(OBJS_DEMO)
174         -rm -rf .libs
175
176 distclean :: clean
177         -rm -f Makefile
178
179 realclean :: distclean
180
181 ###############################################################################
182
183 internal_h      = $(srcdir)/internal.h \
184                   $(INCDIR)/ncurses_cfg.h \
185                   $(INCDIR)/nc_mingw.h \
186                   $(INCDIR)/nc_string.h
187
188 etip_h          = etip.h \
189                   $(INCDIR)/ncurses_dll.h
190
191 cursesw_h       = $(srcdir)/cursesw.h \
192                   $(etip_h) \
193                   $(INCDIR)/curses.h
194
195 cursesp_h       = $(srcdir)/cursesp.h \
196                   $(cursesw_h) \
197                   $(INCDIR)/panel.h
198
199 cursesf_h       = $(srcdir)/cursesf.h \
200                   $(cursesp_h) \
201                   $(INCDIR)/form.h
202
203 cursesm_h       = $(srcdir)/cursesm.h \
204                   $(cursesp_h) \
205                   $(INCDIR)/menu.h
206
207 cursslk_h       = $(srcdir)/cursslk.h \
208                   $(cursesw_h)
209
210 cursesapp_h     = $(srcdir)/cursesapp.h \
211                   $(cursslk_h)
212
213 $(INCDIR)/form.h :
214         cd ../form && $(MAKE) $@
215
216 $(INCDIR)/menu.h :
217         cd ../menu && $(MAKE) $@
218
219 $(INCDIR)/panel.h :
220         cd ../panel && $(MAKE) $@
221
222 ###############################################################################
223
224 OBJS_DEMO = $(MODEL)/demo$o
225
226 $(MODEL)/demo$o : $(srcdir)/demo.cc \
227                 $(internal_h) \
228                 $(cursesf_h) \
229                 $(cursesm_h) \
230                 $(cursesapp_h)
231         @echo 'compiling demo (obj_s)'
232         @$(LIBTOOL_COMPILE) $(CXX) $(CFLAGS_DEFAULT) -c $(srcdir)/demo.cc -o $@
233
234 demo$x: $(OBJS_DEMO) \
235         $(LIBRARIES)  \
236         @TEST_DEPS@
237         @ECHO_LD@ $(LINK) -o $@ $(OBJS_DEMO) $(LDFLAGS_DEFAULT)
238
239 etip.h: $(srcdir)/etip.h.in $(srcdir)/edit_cfg.sh
240         cp $(srcdir)/etip.h.in $@
241         sh $(srcdir)/edit_cfg.sh ../include/ncurses_cfg.h $@
242
243 ###############################################################################
244 # The remainder of this file is automatically generated during configuration
245 ###############################################################################