ncurses 5.9 - patch 20110807
[ncurses.git] / c++ / Makefile.in
index 5b3c1beb074397f37bd8ffc007e954d053394199..889829c97fce35b88e2f46355f7ca08f10772f53 100644 (file)
@@ -1,6 +1,6 @@
-# $Id: Makefile.in,v 1.42 1998/02/19 16:54:54 florian Exp $
+# $Id: Makefile.in,v 1.95 2011/07/30 22:52:07 tom Exp $
 ##############################################################################
-# Copyright (c) 1998 Free Software Foundation, Inc.                          #
+# Copyright (c) 1998-2010,2011 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"), #
@@ -27,7 +27,7 @@
 # authorization.                                                             #
 ##############################################################################
 #
-# Author: Thomas E. Dickey <dickey@clark.net> 1996,1997
+# Author: Thomas E. Dickey
 #
 #  Simple makefile for c++ window class demo
 
 .SUFFIXES:
 
 SHELL          = /bin/sh
+VPATH          = @srcdir@
+
+CF_MFLAGS      = @cf_cv_makeflags@
+@SET_MAKE@
+x              = @EXEEXT@
+o              = .@OBJEXT@
 
 MODEL          = ../@DFT_OBJ_SUBDIR@
-INSTALL_PREFIX = @INSTALL_PREFIX@
+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@
+LIBTOOL_VERSION = @LIBTOOL_VERSION@
+LT_UNDEF       = @LT_UNDEF@
+
 INSTALL                = @INSTALL@
+INSTALL_LIB    = @INSTALL@ @INSTALL_LIB@
 INSTALL_DATA   = @INSTALL_DATA@
 
 AR             = @AR@
-AR_OPTS                = @AR_OPTS@
-RANLIB         = @RANLIB@
+ARFLAGS                = @ARFLAGS@
+
+CXX_AR         = @CXX_AR@
+CXX_ARFLAGS    = @CXX_ARFLAGS@
+RANLIB         = @LIB_PREP@
 
 CXX            = @CXX@
-CXXFLAGS       = @CXXFLAGS@
+CPP            = @CXXCPP@
+CXXFLAGS       = @CXXFLAGS@ @EXTRA_CXXFLAGS@
 CXXLIBS                = @CXXLIBS@
 
 INCDIR         = ../include
-CPPFLAGS       = -I../c++ -I$(INCDIR) -I$(srcdir) -DHAVE_CONFIG_H @CPPFLAGS@ 
+CPPFLAGS       = -I../c++ -I$(INCDIR) -I$(srcdir) -DHAVE_CONFIG_H @CPPFLAGS@
+
+CTAGS          = @CTAGS@
+ETAGS          = @ETAGS@
 
+CC             = ${CXX}
 CCFLAGS                = $(CPPFLAGS) $(CXXFLAGS)
 
+CFLAGS_LIBTOOL = $(CCFLAGS)
 CFLAGS_NORMAL  = $(CCFLAGS)
 CFLAGS_DEBUG   = $(CCFLAGS) @CXX_G_OPT@ -DTRACE
 CFLAGS_PROFILE = $(CCFLAGS) -pg
-CFLAGS_SHARED  = $(CCFLAGS) @CC_SHARED_OPTS@
+CFLAGS_SHARED  = $(CCFLAGS) @CC_SHARED_OPTS@
 
 CFLAGS_DEFAULT = $(CFLAGS_@DFT_UPR_MODEL@)
 
+NCURSES_MAJOR  = @NCURSES_MAJOR@
+NCURSES_MINOR  = @NCURSES_MINOR@
 REL_VERSION     = @cf_cv_rel_version@
 ABI_VERSION    = @cf_cv_abi_version@
 
-LINK           = $(CXX)
+LOCAL_LIBDIR   = @top_builddir@/lib
+
+LINK           = @LINK_PROGS@ $(LIBTOOL_LINK) @CXXLDFLAGS@
+SHLIB_DIRS     = -L../lib
+SHLIB_LIST     = $(SHLIB_DIRS) -lform@LIB_SUFFIX@ -lmenu@LIB_SUFFIX@ -lpanel@LIB_SUFFIX@ -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@
 
-LIBROOT        = ncurses++
-LIBNAME        = ../lib/lib$(LIBROOT).a
+MY_LIBRARY     = ../lib/$(LIBNAME)
 
-LDFLAGS                = @EXTRA_LDFLAGS@ -L../lib -L$(libdir) \
-       -l$(LIBROOT) \
-       @TEST_ARGS@ @LDFLAGS@ \
-       @LD_MODEL@ @LIBS@ @EXTRA_LIBS@ @LOCAL_LDFLAGS@ $(CXXLIBS)
+LINK_FLAGS     = @EXTRA_LDFLAGS@ -L../lib -l$(LIBROOT)@LIB_SUFFIX@
+RPATH_LIST     = @RPATH_LIST@
 
-LDFLAGS_NORMAL = $(LDFLAGS)
-LDFLAGS_DEBUG  = $(LDFLAGS) @CC_G_OPT@
-LDFLAGS_PROFILE        = $(LDFLAGS) -pg
-LDFLAGS_SHARED = $(LDFLAGS) @CC_SHARED_OPTS@ # @LD_SHARED_OPTS@
+LINK_LIBTOOL   = @EXTRA_LDFLAGS@ -L../lib $(MY_LIBRARY)
+LINK_NORMAL    = $(LINK_FLAGS)
+LINK_DEBUG     = $(LINK_FLAGS)
+LINK_PROFILE   = $(LINK_FLAGS)
+LINK_SHARED    = $(LINK_FLAGS)
 
-LDFLAGS_DEFAULT        = $(LDFLAGS_@DFT_UPR_MODEL@)
+TEST_LIBS      = @TEST_LIBS@
+TEST_ARGS      = @LDFLAGS_STATIC@ @TEST_ARGS@ @LDFLAGS_SHARED@ 
+
+LDFLAGS                = $(TEST_ARGS) @LDFLAGS@ \
+       @LD_MODEL@ $(TEST_LIBS) @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:           $(AUTO_SRC) $(LIBNAME) demo
+all \
+libs ::                $(AUTO_SRC) $(MY_LIBRARY)
+
+@MAKE_TESTS@all ::             demo$x
 
 sources :      $(AUTO_SRC)
 
+depend :
+
+tags:
+       $(CTAGS) *.[h] *.cc
+
 # 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)/cursesp.o \
-       $(MODEL)/cursslk.o \
-       $(MODEL)/cursesapp.o \
-       $(MODEL)/cursesmain.o
-
-$(LIBNAME) : $(LIB_OBJS)
-       $(AR) $(AR_OPTS) $@ $?
+       $(MODEL)/cursesf$o \
+       $(MODEL)/cursesm$o \
+       $(MODEL)/cursesw$o \
+       $(MODEL)/cursespad$o \
+       $(MODEL)/cursesp$o \
+       $(MODEL)/cursslk$o \
+       $(MODEL)/cursesapp$o \
+       $(MODEL)/cursesmain$o
+
+../lib/$(LIBNAME_NORMAL) : $(LIB_OBJS)
+       $(CXX_AR) $(CXX_ARFLAGS) $@ $?
        $(RANLIB) $@
 
-OBJS_DEMO = $(MODEL)/demo.o
+../lib/$(LIBNAME_LIBTOOL) : $(LIB_OBJS)
+       cd ../lib && $(LIBTOOL_LINK) $(CXX) $(CXXFLAGS) \
+               -o $(LIBNAME) $(LIB_OBJS:$o=.lo) \
+               -rpath $(INSTALL_PREFIX)$(libdir) \
+               $(LIBTOOL_VERSION) $(NCURSES_MAJOR):$(NCURSES_MINOR) $(LT_UNDEF) $(LDFLAGS_LIBTOOL) $(SHLIB_LIST)
+
+OBJS_DEMO = $(MODEL)/demo$o
 
-$(MODEL)/demo.o : $(srcdir)/demo.cc \
+$(MODEL)/demo$o : $(srcdir)/demo.cc \
        $(cursesf_h) $(cursesm_h) $(cursesapp_h)
 
-demo:  $(OBJS_DEMO) \
-       $(LIBNAME)  \
+demo$x:        $(OBJS_DEMO) \
+       $(MY_LIBRARY)  \
        @TEST_DEPS@
        @ECHO_LINK@ $(LINK) -o $@ $(OBJS_DEMO) $(LDFLAGS_DEFAULT)
 
@@ -124,22 +186,25 @@ etip.h:   $(srcdir)/etip.h.in $(srcdir)/edit_cfg.sh
        cp $(srcdir)/etip.h.in $@
        sh $(srcdir)/edit_cfg.sh ../include/ncurses_cfg.h $@
 
-$(INSTALL_PREFIX)$(libdir) :
-       $(srcdir)/../mkinstalldirs $@
+$(DESTDIR)$(libdir) :
+       mkdir -p $@
 
 install \
-install.libs:: $(LIBNAME) $(INSTALL_PREFIX)$(libdir)
-       $(INSTALL) $(LIBNAME) $(INSTALL_PREFIX)$(libdir)/$(LIBNAME)
+install.libs:: $(MY_LIBRARY) $(DESTDIR)$(libdir)
+       $(LIBTOOL_INSTALL) $(INSTALL_LIB) $(MY_LIBRARY) $(DESTDIR)$(libdir)/$(LIBNAME)
 
 uninstall \
 uninstall.libs::
-       -rm -f $(INSTALL_PREFIX)$(libdir)/$(LIBNAME)
+       -$(LIBTOOL_UNINSTALL) rm -f $(DESTDIR)$(libdir)/$(LIBNAME)
 
 mostlyclean ::
-       -rm -f core tags TAGS *~ *.ln *.atac trace
+       -rm -f core tags TAGS *~ *.bak *.i *.ii *.ln *.atac trace
 
 clean :: mostlyclean
-       -rm -f demo $(AUTO_SRC) $(LIBNAME) $(LIB_OBJS) $(OBJS_DEMO)
+       -sh -c "if test -n '$x' ; then $(MAKE) clean x=''; fi"
+       -rm -rf $(MODEL)/SunWS_cache
+       -$(LIBTOOL_CLEAN) rm -f demo$x $(AUTO_SRC) $(MY_LIBRARY) $(LIB_OBJS) $(OBJS_DEMO)
+       -rm -rf .libs
 
 distclean :: clean
        -rm -f Makefile