1 # $Id: Makefile.in,v 1.72 2004/01/16 22:44:56 tom Exp $
2 ##############################################################################
3 # Copyright (c) 1998-2002,2003 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@
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@ @EXTRA_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)
133 # Build a conventional library for installing, since a shared library would
134 # pull in all of the ncurses libraries (panel, menu, form, ncurses) as direct
140 $(MODEL)/cursespad$o \
143 $(MODEL)/cursesapp$o \
144 $(MODEL)/cursesmain$o
146 ../lib/$(LIBNAME_NORMAL) : $(LIB_OBJS)
147 $(CXX_AR) $(CXX_AR_OPTS) $@ $?
150 ../lib/$(LIBNAME_LIBTOOL) : $(LIB_OBJS)
151 cd ../lib && $(LIBTOOL_LINK) $(CXX) $(CXXFLAGS) \
152 -o $(LIBNAME) $(LIB_OBJS:$o=.lo) \
153 -rpath $(INSTALL_PREFIX)$(libdir) \
154 -version-info $(NCURSES_MAJOR):$(NCURSES_MINOR) $(SHLIB_LIST)
156 OBJS_DEMO = $(MODEL)/demo$o
158 $(MODEL)/demo$o : $(srcdir)/demo.cc \
159 $(cursesf_h) $(cursesm_h) $(cursesapp_h)
161 demo$x: $(OBJS_DEMO) \
164 @ECHO_LINK@ $(LINK) -o $@ $(OBJS_DEMO) $(LDFLAGS_DEFAULT)
166 etip.h: $(srcdir)/etip.h.in $(srcdir)/edit_cfg.sh
167 cp $(srcdir)/etip.h.in $@
168 sh $(srcdir)/edit_cfg.sh ../include/ncurses_cfg.h $@
170 $(DESTDIR)$(libdir) :
171 sh $(srcdir)/../mkinstalldirs $@
174 install.libs:: ../lib/$(LIBNAME) $(DESTDIR)$(libdir)
175 $(LIBTOOL_INSTALL) $(INSTALL) ../lib/$(LIBNAME) $(DESTDIR)$(libdir)/$(LIBNAME)
179 -$(LIBTOOL_UNINSTALL) rm -f $(DESTDIR)$(libdir)/$(LIBNAME)
182 -rm -f core tags TAGS *~ *.bak *.i *.ii *.ln *.atac trace
185 -sh -c "if test -n '$x' ; then $(MAKE) clean x=''; fi"
186 -rm -rf $(MODEL)/SunWS_cache
187 -$(LIBTOOL_CLEAN) rm -f demo$x $(AUTO_SRC) ../lib/$(LIBNAME) $(LIB_OBJS) $(LIB_OBJS:$o=.lo) $(OBJS_DEMO)
193 realclean :: distclean
195 ###############################################################################
197 cursesw_h = $(srcdir)/cursesw.h \
201 cursesp_h = $(srcdir)/cursesp.h \
205 cursesf_h = $(srcdir)/cursesf.h \
209 cursesm_h = $(srcdir)/cursesm.h \
213 cursslk_h = $(srcdir)/cursslk.h \
216 cursesapp_h = $(srcdir)/cursesapp.h \
220 cd ../form && $(MAKE) $@
223 cd ../menu && $(MAKE) $@
226 cd ../panel && $(MAKE) $@
228 ###############################################################################
229 # The remainder of this file is automatically generated during configuration
230 ###############################################################################