ncurses 6.0 - patch 20160625
[ncurses.git] / c++ / Makefile.in
index 9555320e4c6b63e2b0a0d4d5db5f30c5fb6243d1..6406799db354bd4365777802e5b6ec860b43537f 100644 (file)
@@ -1,6 +1,6 @@
-# $Id: Makefile.in,v 1.64 2002/01/19 20:25:31 NIIBE.Yutaka Exp $
+# $Id: Makefile.in,v 1.114 2016/05/21 23:26:12 tom Exp $
 ##############################################################################
-# Copyright (c) 1998,1999,2000,2001,2002 Free Software Foundation, Inc.      #
+# Copyright (c) 1998-2015,2016 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"), #
 # authorization.                                                             #
 ##############################################################################
 #
-# Author: Thomas E. Dickey <dickey@clark.net> 1996,1997
+# Author: Thomas E. Dickey
 #
 #  Simple makefile for c++ window class demo
 
 # turn off _all_ suffix rules; we'll generate our own
 .SUFFIXES:
 
-SHELL          = /bin/sh
+SHELL          = @SHELL@
+VPATH          = @srcdir@
 
 CF_MFLAGS      = @cf_cv_makeflags@
 @SET_MAKE@
-x              = @PROG_EXT@
+x              = @EXEEXT@
+o              = .@OBJEXT@
 
 MODEL          = ../@DFT_OBJ_SUBDIR@
 DESTDIR                = @DESTDIR@
+top_srcdir     = @top_srcdir@
 srcdir         = @srcdir@
 prefix         = @prefix@
 exec_prefix    = @exec_prefix@
+bindir         = @bindir@
 libdir         = @libdir@
 includedir     = @includedir@
+includesubdir  = @includesubdir@
 
-LIBTOOL                = @LIBTOOL@
+INCLUDEDIR     = $(DESTDIR)$(includedir)$(includesubdir)
+
+PACKAGE                = @PACKAGE@
+
+LIBTOOL                = @LIBTOOL_CXX@
+LIBTOOL_OPTS   = @LIBTOOL_OPTS@ @LIBTOOL_OPTS_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@
+ARFLAGS                = @ARFLAGS@
+AWK            = @AWK@
+LD             = @LD@
+LN_S           = @LN_S@
 
 CXX_AR         = @CXX_AR@
-CXX_AR_OPTS    = @CXX_AR_OPTS@
-RANLIB         = @RANLIB@
+CXX_ARFLAGS    = @CXX_ARFLAGS@
+RANLIB         = @LIB_PREP@
 
 CXX            = @CXX@
-CPP            = @CPP@
-CXXFLAGS       = @CXXFLAGS@
+CPP            = @CXXCPP@
+CXXFLAGS       = @CXXFLAGS@ @EXTRA_CXXFLAGS@
 CXXLIBS                = @CXXLIBS@
 
 INCDIR         = ../include
-CPPFLAGS       = -I../c++ -I$(INCDIR) -I$(srcdir) -DHAVE_CONFIG_H @CPPFLAGS@
+CPPFLAGS       = -DHAVE_CONFIG_H -I../c++ @CPPFLAGS@
 
+CTAGS          = @CTAGS@
+ETAGS          = @ETAGS@
+
+CC             = ${CXX}
 CCFLAGS                = $(CPPFLAGS) $(CXXFLAGS)
 
 CFLAGS_LIBTOOL = $(CCFLAGS)
@@ -83,99 +108,74 @@ NCURSES_MINOR      = @NCURSES_MINOR@
 REL_VERSION     = @cf_cv_rel_version@
 ABI_VERSION    = @cf_cv_abi_version@
 
-LINK           = @LINK_PROGS@ $(LIBTOOL) $(CXX) @CXXLDFLAGS@
+LOCAL_LIBDIR   = @top_builddir@/lib
+
+LINK           = @LINK_PROGS@ $(LIBTOOL_LINK) @CXXLDFLAGS@
+SHLIB_DIRS     = -L../lib
+SHLIB_LIST     = $(SHLIB_DIRS) -lform@USE_LIB_SUFFIX@ -lmenu@USE_LIB_SUFFIX@ -lpanel@USE_LIB_SUFFIX@ -lncurses@USE_LIB_SUFFIX@ @SHLIB_LIST@
 
 LIBROOT                = ncurses++
 
-LIBNAME_LIBTOOL        = @LIB_PREFIX@$(LIBROOT)@LIB_SUFFIX@.la
-LIBNAME_NORMAL = @LIB_PREFIX@$(LIBROOT)@LIB_SUFFIX@.a
+LIBNAME_LIBTOOL        = @LIB_PREFIX@$(LIBROOT)@USE_LIB_SUFFIX@.la
+LIBNAME_NORMAL = @LIB_PREFIX@$(LIBROOT)@USE_LIB_SUFFIX@.a
 LIBNAME                = @LIB_PREFIX@$(LIBROOT)@CXX_LIB_SUFFIX@
 
-LINK_FLAGS     = @EXTRA_LDFLAGS@ -L../lib -l$(LIBROOT)@LIB_SUFFIX@
+LIBRARIES      = @Libs_To_Make@
 
-LINK_LIBTOOL   = @EXTRA_LDFLAGS@ -L../lib ../lib/$(LIBNAME)
+LINK_FLAGS     = @EXTRA_LDFLAGS@ -L../lib -l$(LIBROOT)@USE_LIB_SUFFIX@
+RPATH_LIST     = @RPATH_LIST@
+MK_SHARED_LIB  = @MK_SHARED_LIB@
+
+LINK_LIBTOOL   = @EXTRA_LDFLAGS@ -L../lib $(LIBRARIES)
 LINK_NORMAL    = $(LINK_FLAGS)
 LINK_DEBUG     = $(LINK_FLAGS)
 LINK_PROFILE   = $(LINK_FLAGS)
 LINK_SHARED    = $(LINK_FLAGS)
 
-LDFLAGS                = @TEST_ARGS@ @LDFLAGS@ \
-       @LD_MODEL@ @LIBS@ @EXTRA_LIBS@ @LOCAL_LDFLAGS@ $(CXXLIBS)
+# flags for test-programs
+TEST_LIBS      = @TEST_LIBS@
+TEST_ARGS      = @LDFLAGS_STATIC@ @TEST_ARGS@ @LDFLAGS_SHARED@ 
+TEST_LDFLAGS   = $(TEST_ARGS) @LDFLAGS@ \
+       @LD_MODEL@ $(TEST_LIBS) @LIBS@ @LOCAL_LDFLAGS@ $(CXXLIBS)
 
-LDFLAGS_LIBTOOL        = $(LDFLAGS)
-LDFLAGS_NORMAL = $(LDFLAGS)
-LDFLAGS_DEBUG  = $(LDFLAGS) @CC_G_OPT@
-LDFLAGS_PROFILE        = $(LDFLAGS) -pg
-LDFLAGS_SHARED = $(LDFLAGS) @LD_SHARED_OPTS@
+LDFLAGS_LIBTOOL        = $(TEST_LDFLAGS) $(CFLAGS_LIBTOOL)
+LDFLAGS_NORMAL = $(TEST_LDFLAGS) $(CFLAGS_NORMAL)
+LDFLAGS_DEBUG  = $(TEST_LDFLAGS) $(CFLAGS_DEBUG)
+LDFLAGS_PROFILE        = $(TEST_LDFLAGS) $(CFLAGS_PROFILE)
+LDFLAGS_SHARED = $(TEST_LDFLAGS) $(CFLAGS_SHARED) @LD_SHARED_OPTS@
 
 LDFLAGS_DEFAULT        = $(LINK_@DFT_UPR_MODEL@) $(LDFLAGS_@DFT_UPR_MODEL@)
 
+# flags for library built by this makefile
+LDFLAGS                = $(TEST_ARGS) @LDFLAGS@ \
+       @LD_MODEL@ $(TEST_LIBS) @LIBS@ $(CXXLIBS)
+
 AUTO_SRC       = \
                etip.h
 
 all \
-libs ::                $(AUTO_SRC) ../lib/$(LIBNAME)
+libs ::                $(AUTO_SRC) $(LIBRARIES)
 
-all ::         demo$x
+@MAKE_TESTS@all ::             demo$x
 
 sources :      $(AUTO_SRC)
 
 depend :
 
-# 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
-
-../lib/$(LIBNAME_NORMAL) : $(LIB_OBJS)
-       $(CXX_AR) $(CXX_AR_OPTS) $@ $?
-       $(RANLIB) $@
-
-../lib/$(LIBNAME_LIBTOOL) : $(LIB_OBJS)
-       cd ../lib && $(LIBTOOL) $(CXX) -o $(LIBNAME) $(LIB_OBJS:.o=.lo) \
-               -rpath $(INSTALL_PREFIX)$(libdir) \
-               -version-info $(NCURSES_MAJOR):$(NCURSES_MINOR)
-
-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 $@
+tags:
+       $(CTAGS) *.[h] *.cc
 
 $(DESTDIR)$(libdir) :
-       sh $(srcdir)/../mkinstalldirs $@
-
-install \
-install.libs:: ../lib/$(LIBNAME) $(DESTDIR)$(libdir)
-       $(LIBTOOL) $(INSTALL) ../lib/$(LIBNAME) $(DESTDIR)$(libdir)/$(LIBNAME)
-
-uninstall \
-uninstall.libs::
-       -$(LIBTOOL) rm -f $(DESTDIR)$(libdir)/$(LIBNAME)
+       mkdir -p $@
 
 mostlyclean ::
        -rm -f core tags TAGS *~ *.bak *.i *.ii *.ln *.atac trace
 
 clean :: mostlyclean
+       -$(SHELL) -c "if test -n '$x' ; then $(MAKE) clean x=''; fi"
        -rm -rf $(MODEL)/SunWS_cache
-       -$(LIBTOOL) rm -f demo$x $(AUTO_SRC) ../lib/$(LIBNAME) $(LIB_OBJS) $(LIB_OBJS:.o=.lo) $(OBJS_DEMO)
-       -rm -rf .libs
+       -$(LIBTOOL_CLEAN) rm -f demo$x $(AUTO_SRC) $(LIBRARIES) $(OBJS_DEMO)
+       -rm -rf .libs *.dSYM
 
 distclean :: clean
        -rm -f Makefile
@@ -184,8 +184,16 @@ realclean :: distclean
 
 ###############################################################################
 
+internal_h     = $(srcdir)/internal.h \
+                 $(INCDIR)/ncurses_cfg.h \
+                 $(INCDIR)/nc_mingw.h \
+                 $(INCDIR)/nc_string.h
+
+etip_h         = etip.h \
+                 $(INCDIR)/ncurses_dll.h
+
 cursesw_h      = $(srcdir)/cursesw.h \
-                 etip.h \
+                 $(etip_h) \
                  $(INCDIR)/curses.h
 
 cursesp_h      = $(srcdir)/cursesp.h \
@@ -215,6 +223,27 @@ $(INCDIR)/menu.h :
 $(INCDIR)/panel.h :
        cd ../panel && $(MAKE) $@
 
+###############################################################################
+
+OBJS_DEMO = $(MODEL)/demo$o
+
+$(MODEL)/demo$o : $(srcdir)/demo.cc \
+               $(internal_h) \
+               $(cursesf_h) \
+               $(cursesm_h) \
+               $(cursesapp_h)
+       @echo 'compiling demo (obj_s)'
+       @$(LIBTOOL_COMPILE) $(CXX) $(CFLAGS_DEFAULT) -c $(srcdir)/demo.cc -o $@
+
+demo$x:        $(OBJS_DEMO) \
+       $(LIBRARIES)  \
+       @TEST_DEPS@
+       @ECHO_LD@ $(LINK) -o $@ $(OBJS_DEMO) $(LDFLAGS_DEFAULT)
+
+etip.h:        $(srcdir)/etip.h.in $(srcdir)/edit_cfg.sh
+       cp $(srcdir)/etip.h.in $@
+       $(SHELL) $(srcdir)/edit_cfg.sh ../include/ncurses_cfg.h $@
+
 ###############################################################################
 # The remainder of this file is automatically generated during configuration
 ###############################################################################