1 # $Id: Makefile.in,v 1.77 2005/06/12 22:52:56 tom Exp $
2 ##############################################################################
3 # Copyright (c) 1998-2004,2005 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 LINK = @LINK_PROGS@ $(LIBTOOL_LINK) $(CXX) @CXXLDFLAGS@
94 SHLIB_LIST = $(SHLIB_DIRS) -lncurses@LIB_SUFFIX@ @SHLIB_LIST@
98 LIBNAME_LIBTOOL = @LIB_PREFIX@$(LIBROOT)@LIB_SUFFIX@.la
99 LIBNAME_NORMAL = @LIB_PREFIX@$(LIBROOT)@LIB_SUFFIX@.a
100 LIBNAME = @LIB_PREFIX@$(LIBROOT)@CXX_LIB_SUFFIX@
102 LINK_FLAGS = @EXTRA_LDFLAGS@ -L../lib -l$(LIBROOT)@LIB_SUFFIX@
104 LINK_LIBTOOL = @EXTRA_LDFLAGS@ -L../lib ../lib/$(LIBNAME)
105 LINK_NORMAL = $(LINK_FLAGS)
106 LINK_DEBUG = $(LINK_FLAGS)
107 LINK_PROFILE = $(LINK_FLAGS)
108 LINK_SHARED = $(LINK_FLAGS)
110 LDFLAGS = @TEST_ARGS@ @LDFLAGS@ \
111 @LD_MODEL@ @LIBS@ @LOCAL_LDFLAGS@ $(CXXLIBS)
113 LDFLAGS_LIBTOOL = $(LDFLAGS) $(CFLAGS_LIBTOOL)
114 LDFLAGS_NORMAL = $(LDFLAGS) $(CFLAGS_NORMAL)
115 LDFLAGS_DEBUG = $(LDFLAGS) $(CFLAGS_DEBUG)
116 LDFLAGS_PROFILE = $(LDFLAGS) $(CFLAGS_PROFILE)
117 LDFLAGS_SHARED = $(LDFLAGS) $(CFLAGS_SHARED) @LD_SHARED_OPTS@
119 LDFLAGS_DEFAULT = $(LINK_@DFT_UPR_MODEL@) $(LDFLAGS_@DFT_UPR_MODEL@)
125 libs :: $(AUTO_SRC) ../lib/$(LIBNAME)
129 sources : $(AUTO_SRC)
136 # Build a conventional library for installing, since a shared library would
137 # pull in all of the ncurses libraries (panel, menu, form, ncurses) as direct
143 $(MODEL)/cursespad$o \
146 $(MODEL)/cursesapp$o \
147 $(MODEL)/cursesmain$o
149 ../lib/$(LIBNAME_NORMAL) : $(LIB_OBJS)
150 $(CXX_AR) $(CXX_AR_OPTS) $@ $?
153 ../lib/$(LIBNAME_LIBTOOL) : $(LIB_OBJS)
154 cd ../lib && $(LIBTOOL_LINK) $(CXX) $(CXXFLAGS) \
155 -o $(LIBNAME) $(LIB_OBJS:$o=.lo) \
156 -rpath $(INSTALL_PREFIX)$(libdir) \
157 -version-info $(NCURSES_MAJOR):$(NCURSES_MINOR) $(SHLIB_LIST)
159 OBJS_DEMO = $(MODEL)/demo$o
161 $(MODEL)/demo$o : $(srcdir)/demo.cc \
162 $(cursesf_h) $(cursesm_h) $(cursesapp_h)
164 demo$x: $(OBJS_DEMO) \
167 @ECHO_LINK@ $(LINK) -o $@ $(OBJS_DEMO) $(LDFLAGS_DEFAULT)
169 etip.h: $(srcdir)/etip.h.in $(srcdir)/edit_cfg.sh
170 cp $(srcdir)/etip.h.in $@
171 sh $(srcdir)/edit_cfg.sh ../include/ncurses_cfg.h $@
173 $(DESTDIR)$(libdir) :
174 sh $(srcdir)/../mkinstalldirs $@
177 install.libs:: ../lib/$(LIBNAME) $(DESTDIR)$(libdir)
178 $(LIBTOOL_INSTALL) $(INSTALL) ../lib/$(LIBNAME) $(DESTDIR)$(libdir)/$(LIBNAME)
182 -$(LIBTOOL_UNINSTALL) rm -f $(DESTDIR)$(libdir)/$(LIBNAME)
185 -rm -f core tags TAGS *~ *.bak *.i *.ii *.ln *.atac trace
188 -sh -c "if test -n '$x' ; then $(MAKE) clean x=''; fi"
189 -rm -rf $(MODEL)/SunWS_cache
190 -$(LIBTOOL_CLEAN) rm -f demo$x $(AUTO_SRC) ../lib/$(LIBNAME) $(LIB_OBJS) $(OBJS_DEMO)
196 realclean :: distclean
198 ###############################################################################
200 cursesw_h = $(srcdir)/cursesw.h \
204 cursesp_h = $(srcdir)/cursesp.h \
208 cursesf_h = $(srcdir)/cursesf.h \
212 cursesm_h = $(srcdir)/cursesm.h \
216 cursslk_h = $(srcdir)/cursslk.h \
219 cursesapp_h = $(srcdir)/cursesapp.h \
223 cd ../form && $(MAKE) $@
226 cd ../menu && $(MAKE) $@
229 cd ../panel && $(MAKE) $@
231 ###############################################################################
232 # The remainder of this file is automatically generated during configuration
233 ###############################################################################