ncurses 5.6 - patch 20080920
[ncurses.git] / c++ / Makefile.in
index 6be83aeb82319eafd78f7b611e8bbefcd4e54e9c..96d58797e25ed6bc7c56d8c4545dcbb02b523fbb 100644 (file)
@@ -1,23 +1,34 @@
-# $Id: Makefile.in,v 1.20 1997/05/04 21:15:38 tom Exp $
-################################################################################
-# Copyright 1996 by Thomas E. Dickey <dickey@clark.net>                        #
-# All Rights Reserved.                                                         #
-#                                                                              #
-# Permission to use, copy, modify, and distribute this software and its        #
-# documentation for any purpose and without fee is hereby granted, provided    #
-# that the above copyright notice appear in all copies and that both that      #
-# copyright notice and this permission notice appear in supporting             #
-# documentation, and that the name of the above listed copyright holder(s) not #
-# be used in advertising or publicity pertaining to distribution of the        #
-# software without specific, written prior permission. THE ABOVE LISTED        #
-# COPYRIGHT HOLDER(S) DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,    #
-# INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT #
-# SHALL THE ABOVE LISTED COPYRIGHT HOLDER(S) BE LIABLE FOR ANY SPECIAL,        #
-# INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM   #
-# LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE   #
-# OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR    #
-# PERFORMANCE OF THIS SOFTWARE.                                                #
-################################################################################
+# $Id: Makefile.in,v 1.84 2007/04/28 15:29:12 tom Exp $
+##############################################################################
+# Copyright (c) 1998-2006,2007 Free Software Foundation, Inc.                #
+#                                                                            #
+# Permission is hereby granted, free of charge, to any person obtaining a    #
+# copy of this software and associated documentation files (the "Software"), #
+# to deal in the Software without restriction, including without limitation  #
+# the rights to use, copy, modify, merge, publish, distribute, distribute    #
+# with modifications, sublicense, and/or sell copies of the Software, and to #
+# permit persons to whom the Software is furnished to do so, subject to the  #
+# following conditions:                                                      #
+#                                                                            #
+# The above copyright notice and this permission notice shall be included in #
+# all copies or substantial portions of the Software.                        #
+#                                                                            #
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR #
+# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,   #
+# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL    #
+# THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER      #
+# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING    #
+# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER        #
+# DEALINGS IN THE SOFTWARE.                                                  #
+#                                                                            #
+# Except as contained in this notice, the name(s) of the above copyright     #
+# holders shall not be used in advertising or otherwise to promote the sale, #
+# use or other dealings in this Software without prior written               #
+# authorization.                                                             #
+##############################################################################
+#
+# Author: Thomas E. Dickey
+#
 #  Simple makefile for c++ window class demo
 
 # turn off _all_ suffix rules; we'll generate our own
 
 SHELL          = /bin/sh
 
+CF_MFLAGS      = @cf_cv_makeflags@
+@SET_MAKE@
+x              = @EXEEXT@
+o              = .@OBJEXT@
+
 MODEL          = ../@DFT_OBJ_SUBDIR@
+DESTDIR                = @DESTDIR@
 srcdir         = @srcdir@
 prefix         = @prefix@
 exec_prefix    = @exec_prefix@
 libdir         = @libdir@
 includedir     = @includedir@
 
+LIBTOOL                = @LIBTOOL_CXX@
+LIBTOOL_CLEAN  = @LIB_CLEAN@
+LIBTOOL_COMPILE        = @LIB_COMPILE@
+LIBTOOL_LINK   = @LIB_LINK@
+LIBTOOL_INSTALL        = @LIB_INSTALL@
+LIBTOOL_UNINSTALL = @LIB_UNINSTALL@
+
+INSTALL                = @INSTALL@
+INSTALL_LIB    = @INSTALL@ @INSTALL_LIB@
+INSTALL_DATA   = @INSTALL_DATA@
+
+AR             = @AR@
+AR_OPTS                = @AR_OPTS@
+
+CXX_AR         = @CXX_AR@
+CXX_AR_OPTS    = @CXX_AR_OPTS@
+RANLIB         = @LIB_PREP@
+
 CXX            = @CXX@
-CXXFLAGS       = @CXXFLAGS@
+CPP            = @CXXCPP@
+CXXFLAGS       = @CXXFLAGS@ @EXTRA_CXXFLAGS@
 CXXLIBS                = @CXXLIBS@
 
 INCDIR         = ../include
-CPPFLAGS       = @CPPFLAGS@ -I$(INCDIR) -I$(srcdir)/../c++ -DHAVE_CONFIG_H
+CPPFLAGS       = -I../c++ -I$(INCDIR) -I$(srcdir) -DHAVE_CONFIG_H @CPPFLAGS@
 
+CC             = ${CXX}
 CCFLAGS                = $(CPPFLAGS) $(CXXFLAGS)
 
+CFLAGS_LIBTOOL = $(CCFLAGS)
 CFLAGS_NORMAL  = $(CCFLAGS)
 CFLAGS_DEBUG   = $(CCFLAGS) @CXX_G_OPT@ -DTRACE
 CFLAGS_PROFILE = $(CCFLAGS) -pg
@@ -48,41 +86,154 @@ CFLAGS_SHARED      = $(CCFLAGS) @CC_SHARED_OPTS@
 
 CFLAGS_DEFAULT = $(CFLAGS_@DFT_UPR_MODEL@)
 
-LINK           = $(CXX)
-LDFLAGS                = -L../lib \
-       -lmenu@DFT_ARG_SUFFIX@ \
-       -lpanel@DFT_ARG_SUFFIX@ \
-       -lncurses@DFT_ARG_SUFFIX@ \
-       @LDFLAGS@ \
-       @LD_MODEL@ @LIBS@ @EXTRA_LIBS@ @LOCAL_LDFLAGS@ $(CXXLIBS)
+NCURSES_MAJOR  = @NCURSES_MAJOR@
+NCURSES_MINOR  = @NCURSES_MINOR@
+REL_VERSION     = @cf_cv_rel_version@
+ABI_VERSION    = @cf_cv_abi_version@
+
+LOCAL_LIBDIR   = @top_builddir@/lib
+
+LINK           = @LINK_PROGS@ $(LIBTOOL_LINK) @CXXLDFLAGS@
+SHLIB_DIRS     = -L../lib
+SHLIB_LIST     = $(SHLIB_DIRS) -lncurses@LIB_SUFFIX@ @SHLIB_LIST@
+
+LIBROOT                = ncurses++
+
+LIBNAME_LIBTOOL        = @LIB_PREFIX@$(LIBROOT)@LIB_SUFFIX@.la
+LIBNAME_NORMAL = @LIB_PREFIX@$(LIBROOT)@LIB_SUFFIX@.a
+LIBNAME                = @LIB_PREFIX@$(LIBROOT)@CXX_LIB_SUFFIX@
+
+LINK_FLAGS     = @EXTRA_LDFLAGS@ -L../lib -l$(LIBROOT)@LIB_SUFFIX@
+
+LINK_LIBTOOL   = @EXTRA_LDFLAGS@ -L../lib ../lib/$(LIBNAME)
+LINK_NORMAL    = $(LINK_FLAGS)
+LINK_DEBUG     = $(LINK_FLAGS)
+LINK_PROFILE   = $(LINK_FLAGS)
+LINK_SHARED    = $(LINK_FLAGS)
+
+TEST_ARGS      = @LDFLAGS_STATIC@ @TEST_ARGS@ @LDFLAGS_SHARED@ 
+
+LDFLAGS                = $(TEST_ARGS) @LDFLAGS@ \
+       @LD_MODEL@ @LIBS@ @LOCAL_LDFLAGS@ $(CXXLIBS)
+
+LDFLAGS_LIBTOOL        = $(LDFLAGS) $(CFLAGS_LIBTOOL)
+LDFLAGS_NORMAL = $(LDFLAGS) $(CFLAGS_NORMAL)
+LDFLAGS_DEBUG  = $(LDFLAGS) $(CFLAGS_DEBUG)
+LDFLAGS_PROFILE        = $(LDFLAGS) $(CFLAGS_PROFILE)
+LDFLAGS_SHARED = $(LDFLAGS) $(CFLAGS_SHARED) @LD_SHARED_OPTS@
+
+LDFLAGS_DEFAULT        = $(LINK_@DFT_UPR_MODEL@) $(LDFLAGS_@DFT_UPR_MODEL@)
+
+AUTO_SRC       = \
+               etip.h
+
+all \
+libs ::                $(AUTO_SRC) ../lib/$(LIBNAME)
+
+all ::         demo$x
+
+sources :      $(AUTO_SRC)
+
+depend :
 
-all: demo
+tags:
+       ctags *.[h] *.cc
 
-OBJS_DEMO = \
-       $(MODEL)/cursesm.o \
-       $(MODEL)/cursesw.o \
-       $(MODEL)/cursesp.o \
-       $(MODEL)/demo.o
+# Build a conventional library for installing, since a shared library would
+# pull in all of the ncurses libraries (panel, menu, form, ncurses) as direct
+# dependencies.
+LIB_OBJS = \
+       $(MODEL)/cursesf$o \
+       $(MODEL)/cursesm$o \
+       $(MODEL)/cursesw$o \
+       $(MODEL)/cursespad$o \
+       $(MODEL)/cursesp$o \
+       $(MODEL)/cursslk$o \
+       $(MODEL)/cursesapp$o \
+       $(MODEL)/cursesmain$o
 
-demo:  $(OBJS_DEMO) \
-       ../lib/libmenu@DFT_DEP_SUFFIX@ \
-       ../lib/libpanel@DFT_DEP_SUFFIX@ \
-       ../lib/libncurses@DFT_DEP_SUFFIX@
-       @ECHO_LINK@ $(LINK) -o $@ $(OBJS_DEMO) $(LDFLAGS)
+../lib/$(LIBNAME_NORMAL) : $(LIB_OBJS)
+       $(CXX_AR) $(CXX_AR_OPTS) $@ $?
+       $(RANLIB) $@
 
-install:
-install.libs:
+../lib/$(LIBNAME_LIBTOOL) : $(LIB_OBJS)
+       cd ../lib && $(LIBTOOL_LINK) $(CXX) $(CXXFLAGS) \
+               -o $(LIBNAME) $(LIB_OBJS:$o=.lo) \
+               -rpath $(INSTALL_PREFIX)$(libdir) \
+               -version-info $(NCURSES_MAJOR):$(NCURSES_MINOR) $(SHLIB_LIST)
 
-clean ::
-       -rm -f core demo $(OBJS_DEMO)
+OBJS_DEMO = $(MODEL)/demo$o
+
+$(MODEL)/demo$o : $(srcdir)/demo.cc \
+       $(cursesf_h) $(cursesm_h) $(cursesapp_h)
+
+demo$x:        $(OBJS_DEMO) \
+       ../lib/$(LIBNAME)  \
+       @TEST_DEPS@
+       @ECHO_LINK@ $(LINK) -o $@ $(OBJS_DEMO) $(LDFLAGS_DEFAULT)
+
+etip.h:        $(srcdir)/etip.h.in $(srcdir)/edit_cfg.sh
+       cp $(srcdir)/etip.h.in $@
+       sh $(srcdir)/edit_cfg.sh ../include/ncurses_cfg.h $@
+
+$(DESTDIR)$(libdir) :
+       sh $(srcdir)/../mkdirs.sh $@
+
+install \
+install.libs:: ../lib/$(LIBNAME) $(DESTDIR)$(libdir)
+       $(LIBTOOL_INSTALL) $(INSTALL_LIB) ../lib/$(LIBNAME) $(DESTDIR)$(libdir)/$(LIBNAME)
+
+uninstall \
+uninstall.libs::
+       -$(LIBTOOL_UNINSTALL) rm -f $(DESTDIR)$(libdir)/$(LIBNAME)
+
+mostlyclean ::
+       -rm -f core tags TAGS *~ *.bak *.i *.ii *.ln *.atac trace
+
+clean :: mostlyclean
+       -sh -c "if test -n '$x' ; then $(MAKE) clean x=''; fi"
+       -rm -rf $(MODEL)/SunWS_cache
+       -$(LIBTOOL_CLEAN) rm -f demo$x $(AUTO_SRC) ../lib/$(LIBNAME) $(LIB_OBJS) $(OBJS_DEMO)
+       -rm -rf .libs
 
 distclean :: clean
        -rm -f Makefile
 
-mostlyclean :: clean
-
 realclean :: distclean
 
+###############################################################################
+
+cursesw_h      = $(srcdir)/cursesw.h \
+                 etip.h \
+                 $(INCDIR)/curses.h
+
+cursesp_h      = $(srcdir)/cursesp.h \
+                 $(cursesw_h) \
+                 $(INCDIR)/panel.h
+
+cursesf_h      = $(srcdir)/cursesf.h \
+                 $(cursesp_h) \
+                 $(INCDIR)/form.h
+
+cursesm_h      = $(srcdir)/cursesm.h \
+                 $(cursesp_h) \
+                 $(INCDIR)/menu.h
+
+cursslk_h      = $(srcdir)/cursslk.h \
+                 $(cursesw_h)
+
+cursesapp_h    = $(srcdir)/cursesapp.h \
+                 $(cursslk_h)
+
+$(INCDIR)/form.h :
+       cd ../form && $(MAKE) $@
+
+$(INCDIR)/menu.h :
+       cd ../menu && $(MAKE) $@
+
+$(INCDIR)/panel.h :
+       cd ../panel && $(MAKE) $@
+
 ###############################################################################
 # The remainder of this file is automatically generated during configuration
 ###############################################################################