1 # $Id: Makefile.in,v 1.78 2006/10/21 17:07:49 tom Exp $
2 ##############################################################################
3 # Copyright (c) 1998-2005,2006 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@
60 INSTALL_DATA = @INSTALL_DATA@
66 CXX_AR_OPTS = @CXX_AR_OPTS@
71 CXXFLAGS = @CXXFLAGS@ @EXTRA_CXXFLAGS@
75 CPPFLAGS = -I../c++ -I$(INCDIR) -I$(srcdir) -DHAVE_CONFIG_H @CPPFLAGS@
77 CCFLAGS = $(CPPFLAGS) $(CXXFLAGS)
79 CFLAGS_LIBTOOL = $(CCFLAGS)
80 CFLAGS_NORMAL = $(CCFLAGS)
81 CFLAGS_DEBUG = $(CCFLAGS) @CXX_G_OPT@ -DTRACE
82 CFLAGS_PROFILE = $(CCFLAGS) -pg
83 CFLAGS_SHARED = $(CCFLAGS) @CC_SHARED_OPTS@
85 CFLAGS_DEFAULT = $(CFLAGS_@DFT_UPR_MODEL@)
87 NCURSES_MAJOR = @NCURSES_MAJOR@
88 NCURSES_MINOR = @NCURSES_MINOR@
89 REL_VERSION = @cf_cv_rel_version@
90 ABI_VERSION = @cf_cv_abi_version@
92 LOCAL_LIBDIR = @top_builddir@/lib
94 LINK = @LINK_PROGS@ $(LIBTOOL_LINK) $(CXX) @CXXLDFLAGS@
96 SHLIB_LIST = $(SHLIB_DIRS) -lncurses@LIB_SUFFIX@ @SHLIB_LIST@
100 LIBNAME_LIBTOOL = @LIB_PREFIX@$(LIBROOT)@LIB_SUFFIX@.la
101 LIBNAME_NORMAL = @LIB_PREFIX@$(LIBROOT)@LIB_SUFFIX@.a
102 LIBNAME = @LIB_PREFIX@$(LIBROOT)@CXX_LIB_SUFFIX@
104 LINK_FLAGS = @EXTRA_LDFLAGS@ -L../lib -l$(LIBROOT)@LIB_SUFFIX@
106 LINK_LIBTOOL = @EXTRA_LDFLAGS@ -L../lib ../lib/$(LIBNAME)
107 LINK_NORMAL = $(LINK_FLAGS)
108 LINK_DEBUG = $(LINK_FLAGS)
109 LINK_PROFILE = $(LINK_FLAGS)
110 LINK_SHARED = $(LINK_FLAGS)
112 LDFLAGS = @TEST_ARGS@ @LDFLAGS@ \
113 @LD_MODEL@ @LIBS@ @LOCAL_LDFLAGS@ $(CXXLIBS)
115 LDFLAGS_LIBTOOL = $(LDFLAGS) $(CFLAGS_LIBTOOL)
116 LDFLAGS_NORMAL = $(LDFLAGS) $(CFLAGS_NORMAL)
117 LDFLAGS_DEBUG = $(LDFLAGS) $(CFLAGS_DEBUG)
118 LDFLAGS_PROFILE = $(LDFLAGS) $(CFLAGS_PROFILE)
119 LDFLAGS_SHARED = $(LDFLAGS) $(CFLAGS_SHARED) @LD_SHARED_OPTS@
121 LDFLAGS_DEFAULT = $(LINK_@DFT_UPR_MODEL@) $(LDFLAGS_@DFT_UPR_MODEL@)
127 libs :: $(AUTO_SRC) ../lib/$(LIBNAME)
131 sources : $(AUTO_SRC)
138 # Build a conventional library for installing, since a shared library would
139 # pull in all of the ncurses libraries (panel, menu, form, ncurses) as direct
145 $(MODEL)/cursespad$o \
148 $(MODEL)/cursesapp$o \
149 $(MODEL)/cursesmain$o
151 ../lib/$(LIBNAME_NORMAL) : $(LIB_OBJS)
152 $(CXX_AR) $(CXX_AR_OPTS) $@ $?
155 ../lib/$(LIBNAME_LIBTOOL) : $(LIB_OBJS)
156 cd ../lib && $(LIBTOOL_LINK) $(CXX) $(CXXFLAGS) \
157 -o $(LIBNAME) $(LIB_OBJS:$o=.lo) \
158 -rpath $(INSTALL_PREFIX)$(libdir) \
159 -version-info $(NCURSES_MAJOR):$(NCURSES_MINOR) $(SHLIB_LIST)
161 OBJS_DEMO = $(MODEL)/demo$o
163 $(MODEL)/demo$o : $(srcdir)/demo.cc \
164 $(cursesf_h) $(cursesm_h) $(cursesapp_h)
166 demo$x: $(OBJS_DEMO) \
169 @ECHO_LINK@ $(LINK) -o $@ $(OBJS_DEMO) $(LDFLAGS_DEFAULT)
171 etip.h: $(srcdir)/etip.h.in $(srcdir)/edit_cfg.sh
172 cp $(srcdir)/etip.h.in $@
173 sh $(srcdir)/edit_cfg.sh ../include/ncurses_cfg.h $@
175 $(DESTDIR)$(libdir) :
176 sh $(srcdir)/../mkinstalldirs $@
179 install.libs:: ../lib/$(LIBNAME) $(DESTDIR)$(libdir)
180 $(LIBTOOL_INSTALL) $(INSTALL) ../lib/$(LIBNAME) $(DESTDIR)$(libdir)/$(LIBNAME)
184 -$(LIBTOOL_UNINSTALL) rm -f $(DESTDIR)$(libdir)/$(LIBNAME)
187 -rm -f core tags TAGS *~ *.bak *.i *.ii *.ln *.atac trace
190 -sh -c "if test -n '$x' ; then $(MAKE) clean x=''; fi"
191 -rm -rf $(MODEL)/SunWS_cache
192 -$(LIBTOOL_CLEAN) rm -f demo$x $(AUTO_SRC) ../lib/$(LIBNAME) $(LIB_OBJS) $(OBJS_DEMO)
198 realclean :: distclean
200 ###############################################################################
202 cursesw_h = $(srcdir)/cursesw.h \
206 cursesp_h = $(srcdir)/cursesp.h \
210 cursesf_h = $(srcdir)/cursesf.h \
214 cursesm_h = $(srcdir)/cursesm.h \
218 cursslk_h = $(srcdir)/cursslk.h \
221 cursesapp_h = $(srcdir)/cursesapp.h \
225 cd ../form && $(MAKE) $@
228 cd ../menu && $(MAKE) $@
231 cd ../panel && $(MAKE) $@
233 ###############################################################################
234 # The remainder of this file is automatically generated during configuration
235 ###############################################################################