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