ncurses 6.0 - patch 20170729
[ncurses.git] / test / Makefile.in
index 4cab57422b47c8e29132bd6b46d12f75de67e342..2911c7e17361ed275af3ba625904bebedc40fa00 100644 (file)
@@ -1,6 +1,6 @@
-# $Id: Makefile.in,v 1.60 2000/10/14 22:51:19 tom Exp $
+# $Id: Makefile.in,v 1.115 2015/08/05 23:15:41 tom Exp $
 ##############################################################################
-# Copyright (c) 1998,1999,2000 Free Software Foundation, Inc.                #
+# Copyright (c) 1998-2014,2015 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,1998
+# Author: Thomas E. Dickey 1996-on
 #
 # Makefile for ncurses tests.
 
 # turn off _all_ suffix rules; we'll generate our own
 .SUFFIXES:
 
-SHELL          = /bin/sh
+SHELL          = @SHELL@
+VPATH          = @srcdir@
 
-x              = @PROG_EXT@
+@SET_MAKE@
+
+destdir                =
+x              = @EXEEXT@
+o              = .@OBJEXT@
 
 MODEL          = ../@DFT_OBJ_SUBDIR@
+top_srcdir     = @top_srcdir@
 srcdir         = @srcdir@
 prefix         = @prefix@
 exec_prefix    = @exec_prefix@
+datarootdir    = @datarootdir@
+
+bindir         = @bindir@
 libdir         = @libdir@
 includedir     = @includedir@
+includesubdir  = @includesubdir@
+
+BINDIR         = $(DESTDIR)$(bindir)
+LIBDIR         = $(DESTDIR)$(libdir)
+INCLUDEDIR     = $(DESTDIR)$(includedir)$(includesubdir)
+
+PACKAGE                = @PACKAGE@
 
 LIBTOOL                = @LIBTOOL@
+LIBTOOL_OPTS   = @LIBTOOL_OPTS@
+LIBTOOL_CLEAN  = @LIB_CLEAN@
+LIBTOOL_COMPILE        = @LIB_COMPILE@
+LIBTOOL_LINK   = @LIB_LINK@
+
+INSTALL                = @INSTALL@
+INSTALL_PROG   = @INSTALL_PROGRAM@
+transform      = @program_transform_name@
+TRANSFORM      = sed 's/$x$$//'|sed '$(transform)'|sed 's/$$/$x/'
+
+CTAGS          = @CTAGS@
+ETAGS          = @ETAGS@
 
 CC             = @CC@
 CPP            = @CPP@
 
-CFLAGS         = @CFLAGS@
-CPPFLAGS       =  -I../test -I$(srcdir) @CPPFLAGS@ -DHAVE_CONFIG_H
+CFLAGS         = @CFLAGS@ @EXTRA_CFLAGS@
+CPPFLAGS       = -I. -I$(srcdir) -I../test -DHAVE_CONFIG_H @CPPFLAGS@
 
 CCFLAGS                = $(CPPFLAGS) $(CFLAGS)
 
@@ -65,157 +93,46 @@ CFLAGS_DEFAULT     = $(CFLAGS_@DFT_UPR_MODEL@)
 
 REL_VERSION    = @cf_cv_rel_version@
 ABI_VERSION    = @cf_cv_abi_version@
+LOCAL_LIBDIR   = @top_builddir@/lib
 LOCAL_LIBS     = @TEST_DEPS@
 MATH_LIB       = @MATH_LIB@
+TEST_LIBS      = @TEST_LIBS@
 
 LD             = @LD@
-LINK           = @LINK_TESTS@ $(LIBTOOL) $(CC)
-
-LDFLAGS                = @LD_MODEL@ @TEST_ARGS@ @LIBS@ @EXTRA_LIBS@ @LOCAL_LDFLAGS@ @LDFLAGS@
-
-LDFLAGS_LIBTOOL        = $(LDFLAGS)
-LDFLAGS_NORMAL = $(LDFLAGS)
-LDFLAGS_DEBUG  = $(LDFLAGS) @CC_G_OPT@
-LDFLAGS_PROFILE        = $(LDFLAGS) -pg
-LDFLAGS_SHARED = $(LDFLAGS) @LD_SHARED_OPTS@
-
-LDFLAGS_DEFAULT        = $(LDFLAGS_@DFT_UPR_MODEL@)
-
-LINT           = @LINT@
-LINT_OPTS      = @LINT_OPTS@
-LINT_LIBS      = -lform -lmenu -lpanel -lncurses @LIBS@
-
-TESTS = \
-       blue$x \
-       bs$x \
-       cardfile$x \
-       ditto$x \
-       dots$x \
-       filter$x \
-       firework$x \
-       firstlast$x \
-       gdc$x \
-       hanoi$x \
-       hashtest$x \
-       keynames$x \
-       knight$x \
-       lrtest$x \
-       ncurses$x \
-       newdemo$x \
-       rain$x \
-       railroad$x \
-       tclock$x \
-       testaddch$x \
-       testcurs$x \
-       testscanw$x \
-       view$x \
-       worm$x \
-       xmas$x
-
-all: $(TESTS)
-
-sources:
-
-blue$x: $(MODEL)/blue.o $(LOCAL_LIBS)
-       @ECHO_LINK@ $(LINK) -o $@ $(MODEL)/blue.o $(LDFLAGS_DEFAULT)
-
-bs$x: $(MODEL)/bs.o $(LOCAL_LIBS)
-       @ECHO_LINK@ $(LINK) -o $@ $(MODEL)/bs.o $(LDFLAGS_DEFAULT)
-
-cardfile$x: $(MODEL)/cardfile.o $(LOCAL_LIBS)
-       @ECHO_LINK@ $(LINK) -o $@ $(MODEL)/cardfile.o $(LDFLAGS_DEFAULT)
-
-ditto$x: $(MODEL)/ditto.o $(LOCAL_LIBS)
-       @ECHO_LINK@ $(LINK) -o $@ $(MODEL)/ditto.o $(LDFLAGS_DEFAULT)
-
-dots$x: $(MODEL)/dots.o $(LOCAL_LIBS)
-       @ECHO_LINK@ $(LINK) -o $@ $(MODEL)/dots.o $(LDFLAGS_DEFAULT)
+LINK           = @LINK_TESTS@ $(LIBTOOL_LINK) $(CFLAGS)
 
-filter$x: $(MODEL)/filter.o $(LOCAL_LIBS)
-       @ECHO_LINK@ $(LINK) -o $@ $(MODEL)/filter.o $(LDFLAGS_DEFAULT)
+LDFLAGS                = @LD_MODEL@ @LOCAL_LDFLAGS@ @LDFLAGS@
 
-firework$x: $(MODEL)/firework.o $(LOCAL_LIBS)
-       @ECHO_LINK@ $(LINK) -o $@ $(MODEL)/firework.o $(LDFLAGS_DEFAULT)
+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@
 
-firstlast$x: $(MODEL)/firstlast.o $(LOCAL_LIBS)
-       @ECHO_LINK@ $(LINK) -o $@ $(MODEL)/firstlast.o $(LDFLAGS_DEFAULT)
+TEST_ARGS      = @LDFLAGS_STATIC@ @TEST_ARGS@ @LDFLAGS_SHARED@
 
-gdc$x: $(MODEL)/gdc.o $(LOCAL_LIBS)
-       @ECHO_LINK@ $(LINK) -o $@ $(MODEL)/gdc.o $(LDFLAGS_DEFAULT)
+# use these for linking with all of the libraries
+LIBS_DEFAULT   = $(TEST_ARGS) @LIBS@ $(TEST_LIBS) $(MATH_LIB)
+LDFLAGS_DEFAULT        = $(LDFLAGS_@DFT_UPR_MODEL@) $(LIBS_DEFAULT)
 
-hanoi$x: $(MODEL)/hanoi.o $(LOCAL_LIBS)
-       @ECHO_LINK@ $(LINK) -o $@ $(MODEL)/hanoi.o $(LDFLAGS_DEFAULT)
+# use these for linking with the (n)curses library and possibly pthreads
+LIBS_THREADS   = `echo "$(TEST_ARGS) @LIBS@" | sed -e 's/-lform.*-lpanel[^ ]*//'` $(TEST_LIBS) $(MATH_LIB) @PTHREAD@
+LDFLAGS_THREADS        = $(LDFLAGS_@DFT_UPR_MODEL@) $(LIBS_THREADS)
 
-hashtest$x: $(MODEL)/hashtest.o $(LOCAL_LIBS)
-       @ECHO_LINK@ $(LINK) -o $@ $(MODEL)/hashtest.o $(LDFLAGS_DEFAULT)
+# use these for linking with the (n)curses library
+LIBS_CURSES    = `echo "$(TEST_ARGS) @LIBS@" | sed -e 's/-lform.*-lpanel[^ ]*//'` $(TEST_LIBS) $(MATH_LIB)
+LDFLAGS_CURSES = $(LDFLAGS_@DFT_UPR_MODEL@) $(LIBS_CURSES)
 
-keynames$x: $(MODEL)/keynames.o $(LOCAL_LIBS)
-       @ECHO_LINK@ $(LINK) -o $@ $(MODEL)/keynames.o $(LDFLAGS_DEFAULT)
+# use these for linking with the tinfo library if we have it, or curses library if not
+LIBS_TINFO     = @LDFLAGS_STATIC@ @TINFO_LIBS@ @LDFLAGS_SHARED@ @LIBS@ $(TEST_LIBS) $(MATH_LIB)
+LDFLAGS_TINFO  = @TINFO_LDFLAGS@ $(LDFLAGS_@DFT_UPR_MODEL@) $(LIBS_TINFO)
 
-knight$x: $(MODEL)/knight.o $(LOCAL_LIBS)
-       @ECHO_LINK@ $(LINK) -o $@ $(MODEL)/knight.o $(LDFLAGS_DEFAULT)
-
-lrtest$x: $(MODEL)/lrtest.o $(LOCAL_LIBS)
-       @ECHO_LINK@ $(LINK) -o $@ $(MODEL)/lrtest.o $(LDFLAGS_DEFAULT)
-
-ncurses$x: $(MODEL)/ncurses.o $(LOCAL_LIBS)
-       @ECHO_LINK@ $(LINK) -o $@ $(MODEL)/ncurses.o $(LDFLAGS_DEFAULT)
-
-newdemo$x: $(MODEL)/newdemo.o $(LOCAL_LIBS)
-       @ECHO_LINK@ $(LINK) -o $@ $(MODEL)/newdemo.o $(LDFLAGS_DEFAULT)
-
-rain$x: $(MODEL)/rain.o $(LOCAL_LIBS)
-       @ECHO_LINK@ $(LINK) -o $@ $(MODEL)/rain.o $(LDFLAGS_DEFAULT)
-
-railroad$x: $(MODEL)/railroad.o $(LOCAL_LIBS)
-       @ECHO_LINK@ $(LINK) -o $@ $(MODEL)/railroad.o $(LDFLAGS_DEFAULT)
-
-tclock$x: $(MODEL)/tclock.o $(LOCAL_LIBS)
-       @ECHO_LINK@ $(LINK) -o $@ $(MODEL)/tclock.o $(LDFLAGS_DEFAULT) $(MATH_LIB)
-
-testaddch$x: $(MODEL)/testaddch.o $(LOCAL_LIBS)
-       @ECHO_LINK@ $(LINK) -o $@ $(MODEL)/testaddch.o $(LDFLAGS_DEFAULT)
-
-testcurs$x: $(MODEL)/testcurs.o $(LOCAL_LIBS)
-       @ECHO_LINK@ $(LINK) -o $@ $(MODEL)/testcurs.o $(LDFLAGS_DEFAULT)
-
-testscanw$x: $(MODEL)/testscanw.o $(LOCAL_LIBS)
-       @ECHO_LINK@ $(LINK) -o $@ $(MODEL)/testscanw.o $(LDFLAGS_DEFAULT)
-
-view$x: $(MODEL)/view.o $(LOCAL_LIBS)
-       @ECHO_LINK@ $(LINK) -o $@ $(MODEL)/view.o $(LDFLAGS_DEFAULT)
-
-worm$x: $(MODEL)/worm.o $(LOCAL_LIBS)
-       @ECHO_LINK@ $(LINK) -o $@ $(MODEL)/worm.o $(LDFLAGS_DEFAULT)
-
-xmas$x: $(MODEL)/xmas.o $(LOCAL_LIBS)
-       @ECHO_LINK@ $(LINK) -o $@ $(MODEL)/xmas.o $(LDFLAGS_DEFAULT)
-
-libs \
-install \
-install.libs \
-install.test:
-
-uninstall:
-uninstall.libs:
-uninstall.test:
-
-mostlyclean ::
-       -rm -f core tags TAGS *~ *.ln *.atac trace
-
-clean :: mostlyclean
-       -rm -rf *.o screendump *.lis $(TESTS) .libs
-
-distclean :: clean
-       -rm -f Makefile ncurses_cfg.h config.*
-
-realclean :: distclean
+LINT           = @LINT@
+LINT_OPTS      = @LINT_OPTS@
+LINT_LIBS      = -lform -lmenu -lpanel -lncurses @LIBS@
 
-lint:
-       sh -c 'for N in $(TESTS); do echo LINT:$$N; $(LINT) $(LINT_OPTS) $(CPPFLAGS) $(srcdir)/$$N.c $(LINT_LIBS); done'
+HEADER_DEPS    = \
+       ../include/curses.h \
+       ../include/term.h
 
-# Use this to get a list of test-programs for the standalone configure script.
-echo_tests :
-       @echo "$(TESTS)"
-echo_suffix :
-       @echo "$x"
+# The rest is generated from the "programs" and "modules" files...