1 # $Id: Makefile.in,v 1.89 2010/04/03 15:23:13 tom Exp $
2 ##############################################################################
3 # Copyright (c) 1998-2009,2010 Free Software Foundation, Inc. #
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: #
13 # The above copyright notice and this permission notice shall be included in #
14 # all copies or substantial portions of the Software. #
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. #
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 #
28 ##############################################################################
30 # Author: Thomas E. Dickey
32 # Simple makefile for c++ window class demo
34 # turn off _all_ suffix rules; we'll generate our own
39 CF_MFLAGS = @cf_cv_makeflags@
44 MODEL = ../@DFT_OBJ_SUBDIR@
48 exec_prefix = @exec_prefix@
50 includedir = @includedir@
52 LIBTOOL = @LIBTOOL_CXX@
53 LIBTOOL_CLEAN = @LIB_CLEAN@
54 LIBTOOL_COMPILE = @LIB_COMPILE@
55 LIBTOOL_LINK = @LIB_LINK@
56 LIBTOOL_INSTALL = @LIB_INSTALL@
57 LIBTOOL_UNINSTALL = @LIB_UNINSTALL@
61 INSTALL_LIB = @INSTALL@ @INSTALL_LIB@
62 INSTALL_DATA = @INSTALL_DATA@
68 CXX_ARFLAGS = @CXX_ARFLAGS@
73 CXXFLAGS = @CXXFLAGS@ @EXTRA_CXXFLAGS@
77 CPPFLAGS = -I../c++ -I$(INCDIR) -I$(srcdir) -DHAVE_CONFIG_H @CPPFLAGS@
83 CCFLAGS = $(CPPFLAGS) $(CXXFLAGS)
85 CFLAGS_LIBTOOL = $(CCFLAGS)
86 CFLAGS_NORMAL = $(CCFLAGS)
87 CFLAGS_DEBUG = $(CCFLAGS) @CXX_G_OPT@ -DTRACE
88 CFLAGS_PROFILE = $(CCFLAGS) -pg
89 CFLAGS_SHARED = $(CCFLAGS) @CC_SHARED_OPTS@
91 CFLAGS_DEFAULT = $(CFLAGS_@DFT_UPR_MODEL@)
93 NCURSES_MAJOR = @NCURSES_MAJOR@
94 NCURSES_MINOR = @NCURSES_MINOR@
95 REL_VERSION = @cf_cv_rel_version@
96 ABI_VERSION = @cf_cv_abi_version@
98 LOCAL_LIBDIR = @top_builddir@/lib
100 LINK = @LINK_PROGS@ $(LIBTOOL_LINK) @CXXLDFLAGS@
101 SHLIB_DIRS = -L../lib
102 SHLIB_LIST = $(SHLIB_DIRS) -lform@LIB_SUFFIX@ -lmenu@LIB_SUFFIX@ -lpanel@LIB_SUFFIX@ -lncurses@LIB_SUFFIX@ @SHLIB_LIST@
106 LIBNAME_LIBTOOL = @LIB_PREFIX@$(LIBROOT)@LIB_SUFFIX@.la
107 LIBNAME_NORMAL = @LIB_PREFIX@$(LIBROOT)@LIB_SUFFIX@.a
108 LIBNAME = @LIB_PREFIX@$(LIBROOT)@CXX_LIB_SUFFIX@
110 LINK_FLAGS = @EXTRA_LDFLAGS@ -L../lib -l$(LIBROOT)@LIB_SUFFIX@
112 LINK_LIBTOOL = @EXTRA_LDFLAGS@ -L../lib ../lib/$(LIBNAME)
113 LINK_NORMAL = $(LINK_FLAGS)
114 LINK_DEBUG = $(LINK_FLAGS)
115 LINK_PROFILE = $(LINK_FLAGS)
116 LINK_SHARED = $(LINK_FLAGS)
118 TEST_LIBS = @TEST_LIBS@
119 TEST_ARGS = @LDFLAGS_STATIC@ @TEST_ARGS@ @LDFLAGS_SHARED@
121 LDFLAGS = $(TEST_ARGS) @LDFLAGS@ \
122 @LD_MODEL@ $(TEST_LIBS) @LIBS@ @LOCAL_LDFLAGS@ $(CXXLIBS)
124 LDFLAGS_LIBTOOL = $(LDFLAGS) $(CFLAGS_LIBTOOL)
125 LDFLAGS_NORMAL = $(LDFLAGS) $(CFLAGS_NORMAL)
126 LDFLAGS_DEBUG = $(LDFLAGS) $(CFLAGS_DEBUG)
127 LDFLAGS_PROFILE = $(LDFLAGS) $(CFLAGS_PROFILE)
128 LDFLAGS_SHARED = $(LDFLAGS) $(CFLAGS_SHARED) @LD_SHARED_OPTS@
130 LDFLAGS_DEFAULT = $(LINK_@DFT_UPR_MODEL@) $(LDFLAGS_@DFT_UPR_MODEL@)
136 libs :: $(AUTO_SRC) ../lib/$(LIBNAME)
140 sources : $(AUTO_SRC)
147 # Build a conventional library for installing, since a shared library would
148 # pull in all of the ncurses libraries (panel, menu, form, ncurses) as direct
154 $(MODEL)/cursespad$o \
157 $(MODEL)/cursesapp$o \
158 $(MODEL)/cursesmain$o
160 ../lib/$(LIBNAME_NORMAL) : $(LIB_OBJS)
161 $(CXX_AR) $(CXX_ARFLAGS) $@ $?
164 ../lib/$(LIBNAME_LIBTOOL) : $(LIB_OBJS)
165 cd ../lib && $(LIBTOOL_LINK) $(CXX) $(CXXFLAGS) \
166 -o $(LIBNAME) $(LIB_OBJS:$o=.lo) \
167 -rpath $(INSTALL_PREFIX)$(libdir) \
168 -version-info $(NCURSES_MAJOR):$(NCURSES_MINOR) $(LT_UNDEF) $(SHLIB_LIST)
170 OBJS_DEMO = $(MODEL)/demo$o
172 $(MODEL)/demo$o : $(srcdir)/demo.cc \
173 $(cursesf_h) $(cursesm_h) $(cursesapp_h)
175 demo$x: $(OBJS_DEMO) \
178 @ECHO_LINK@ $(LINK) -o $@ $(OBJS_DEMO) $(LDFLAGS_DEFAULT)
180 etip.h: $(srcdir)/etip.h.in $(srcdir)/edit_cfg.sh
181 cp $(srcdir)/etip.h.in $@
182 sh $(srcdir)/edit_cfg.sh ../include/ncurses_cfg.h $@
184 $(DESTDIR)$(libdir) :
185 sh $(srcdir)/../mkdirs.sh $@
188 install.libs:: ../lib/$(LIBNAME) $(DESTDIR)$(libdir)
189 $(LIBTOOL_INSTALL) $(INSTALL_LIB) ../lib/$(LIBNAME) $(DESTDIR)$(libdir)/$(LIBNAME)
193 -$(LIBTOOL_UNINSTALL) rm -f $(DESTDIR)$(libdir)/$(LIBNAME)
196 -rm -f core tags TAGS *~ *.bak *.i *.ii *.ln *.atac trace
199 -sh -c "if test -n '$x' ; then $(MAKE) clean x=''; fi"
200 -rm -rf $(MODEL)/SunWS_cache
201 -$(LIBTOOL_CLEAN) rm -f demo$x $(AUTO_SRC) ../lib/$(LIBNAME) $(LIB_OBJS) $(OBJS_DEMO)
207 realclean :: distclean
209 ###############################################################################
211 cursesw_h = $(srcdir)/cursesw.h \
215 cursesp_h = $(srcdir)/cursesp.h \
219 cursesf_h = $(srcdir)/cursesf.h \
223 cursesm_h = $(srcdir)/cursesm.h \
227 cursslk_h = $(srcdir)/cursslk.h \
230 cursesapp_h = $(srcdir)/cursesapp.h \
234 cd ../form && $(MAKE) $@
237 cd ../menu && $(MAKE) $@
240 cd ../panel && $(MAKE) $@
242 ###############################################################################
243 # The remainder of this file is automatically generated during configuration
244 ###############################################################################