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