DataMuseum.dk

Presents historical artifacts from the history of:

DKUUG/EUUG Conference tapes

This is an automatic "excavation" of a thematic subset of
artifacts from Datamuseum.dk's BitArchive.

See our Wiki for more about DKUUG/EUUG Conference tapes

Excavated with: AutoArchaeologist - Free & Open Source Software.


top - metrics - download
Index: M T

⟦2bb2cd71f⟧ TextFile

    Length: 10830 (0x2a4e)
    Types: TextFile
    Names: »Makefile«

Derivation

└─⟦a05ed705a⟧ Bits:30007078 DKUUG GNU 2/12/89
    └─⟦cc8755de2⟧ »./libg++-1.36.1.tar.Z« 
        └─⟦23757c458⟧ 
            └─⟦this⟧ »libg++/tests/Makefile« 

TextFile

# Makefile for g++ library test files

# Copyright (C) 1988 Free Software Foundation
#   written by Doug Lea (dl@rocky.oswego.edu)

# This file is part of GNU CC.

# GNU CC is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY.  No author or distributor
# accepts responsibility to anyone for the consequences of using it
# or for whether it serves any particular purpose or works at all,
# unless he says so in writing.  Refer to the GNU CC General Public
# License for full details.

# Everyone is granted permission to copy, modify and redistribute
# GNU CC, but only under the conditions described in the
# GNU CC General Public License.   A copy of this license is
# supposed to have been given to you along with GNU CC so you
# can know your rights and responsibilities.  It should be in a
# file named COPYING.  Among other things, the copyright notice
# and this notice must be preserved on all copies.

# make parameters -- these should normally be inherited from parent make

# ------ source locations

# source directory for libg++.a
SRCDIR = ../src

# source include directory 
SRCIDIR= ../g++-include

# ------ installation destinations
# ------ You will require write-permission on the destination directories
# ------ in order to `make install'


prefix =/usr/gnu

# libg++.a destination
LIBDIR = $(prefix)/lib

# executables directory: location to install the genclass class generator
BINDIR = $(prefix)/bin

# location to install include file directory
IDIR = $(prefix)/lib/g++-include


# ------- System-dependent defines
# ------- use the second form of each for SystemV (USG)

# g++ flags
OSFLAG=
#OSFLAG = -DUSG

# ld or ld++ flags
OSLDFLAG =
#OSLDFLAG= -lPW

# how to install
INSTALL=install -c
#INSTALL=cp

# ranlib if necessary
RANLIB=ranlib
#RANLIB=echo

# which make?
MAKE=make

# not used, but convenient for those who preprocess things while compiling
SHELL=/bin/sh


# ------ compiler names

# GNU C++ compiler name
GXX = g++
#GXX=gcc

# GNU CC compiler name (needed for some .c files in libg++.a)
CC = gcc

# GNU loader
LDXX = $(LIBDIR)/gcc-ld

# crt0+.o location (for dynamic loading tests)
GXXCRT1=$(LIBDIR)/crt1+.o

# ------ Other compilation flags
# ------ modify as you like -- the ones here are sheer overkill

GXX_OPTIMIZATION_FLAGS= -O -fstrength-reduce  -felide-constructors -fschedule-insns -fdelayed-branch  -fsave-memoized 

GCC_OPTIMIZATION_FLAGS= -O -fstrength-reduce -fdelayed-branch 

DEBUG_FLAGS= -g

#use this only if you like to look at lots of useless messages
VERBOSITY_FLAGS= -Wall -v

GXX_INCLUDE_DIRS= -I$(SRCIDIR)

GCC_INCLUDE_DIRS= -I$(prefix)/lib/gcc-include -I/usr/include -I$(SRCIDIR)

PIPE_AS= -pipe

# Flags for all C++ compiles
GXXFLAGS = $(OSFLAG) $(GXX_INCLUDE_DIRS) $(DEBUG_FLAGS) $(GXX_OPTIMIZATION_FLAGS) $(VERBOSITY_FLAGS) $(PIPE_AS)

# Flags for all C compiles
CFLAGS= $(OSFLAG) $(GCC_INCLUDE_DIRS) $(DEBUG_FLAGS) $(GCC_OPTIMIZATION_FLAGS) $(VERBOSITY_FLAGS) $(PIPE_AS)

# g++ load time flags 
GXXLDFLAGS = -L$(SRCDIR) -lg++ -lm $(OSLDFLAG)

# these flags tell test0 where ld++ and crt1+.o are
TFLAGS = -DLDXX=\"$(LDXX)\" -DCRT1X=\"$(GXXCRT1)\"

# g++ files should have extension .cc
.SUFFIXES: .cc
.cc.o:
	$(GXX) $(GXXFLAGS) -c  $<

GENCLASS=./genclass

$(GENCLASS): ../genclass.sh
	echo "/^PROTODIR=/c\\" > sedscript
	echo "PROTODIR=$(SRCIDIR)" >> sedscript
	sed < ../genclass.sh > ./genclass -f sedscript
	chmod 0755 genclass
	rm -f sedscript

# compilation notes:
# ONLY the following g++ warnings are expected to appear:
#
# 1. In twrapper.cc and tgcwrapper.cc, warnings about lazy prototyping
#    
# 2. Several warnings from genclass about classes with only .h, no .cc files
#

# 
# Some of the tests output CPU processing time information. These
# figures are interesting, but are not always reliable guides
# to relative efficiencies of classes in practice, since the
# test files sometimes intentionally put code through worst-case
# situations, call infrequently used functions, etc.
#

# test files
TSRCS =  tFile.cc tObstack.cc tString.cc \
 tInteger.cc twrapper.cc tgwrapper.cc tRational.cc \
 tComplex.cc tBitSet.cc tBitString.cc tRandom.cc tList.cc tPlex.cc tLList.cc \
 tVec.cc tStack.cc tQueue.cc tDeque.cc tPQ.cc tSet.cc tSet2.cc tBag.cc tBag2.cc \
 tMap.cc tFix.cc tFix16.cc tFix24.cc \
 test.hello.cc test.bye.cc test.bye2.cc test.shell.cc \
 tCurses.cc tGetOpt.cc

# executables
TOUTS =  test0 tFile tObstack tString \
  tInteger twrapper tgwrapper tRational tComplex tBitSet tBitString \
  tRandom tFix tFix16 tFix24 tCurses tGetOpt \
  tList tPlex tLList tVec tStack tQueue tDeque tPQ tSet \
  tSet2 tBag tBag2 tMap 

# files for archived prototype classes
LOBJS = \
 iList.o iSLList.o iDLList.o iVec.o iAVec.o \
 iPlex.o  iFPlex.o  iXPlex.o iRPlex.o iMPlex.o \
 iSet.o iBag.o iMap.o iPQ.o \
 iXPSet.o  iOXPSet.o  iSLSet.o  iOSLSet.o  iBSTSet.o \
 iAVLSet.o  iSplaySet.o  iVHSet.o  iVOHSet.o  iCHSet.o \
 iXPBag.o  iOXPBag.o  iSLBag.o  iOSLBag.o  iSplayBag.o \
 iVHBag.o  iCHBag.o \
 iVHMap.o  iCHMap.o  iSplayMap.o  iAVLMap.o \
 iRAVLMap.o \
 iSplayPQ.o  iPHPQ.o  iXPPQ.o \
 iVStack.o \
 iVQueue.o

LHDRS = \
 idefs.h \
 iXPStack.h iSLStack.h \
 iXPQueue.h  iSLQueue.h \
 iXPDeque.h iDLDeque.h \
 iStack.h iQueue.h iDeque.h


tests: $(GENCLASS) $(TOUTS)

runtests: $(GENCLASS) $(TOUTS)
	for i in $(TOUTS); do \
		case $$i in \
			test0) echo "Must run test0 from tty";; \
			tCurses) echo "Must run tCurses from tty" ;; \
			tGetOpt) echo $$i;  ./$$i -abc -de10 -2000 -h3i ;; \
			*) echo $$i;  ./$$i < $$i.inp;; \
		esac \
	done

checktests: $(GENCLASS) $(TOUTS)
	-$(MAKE) runtests > my.out 2>&1
	-diff expected.out my.out > checktests.diffs
	cat checktests.diffs

	
libtest.a: $(LHDRS) $(LOBJS)
	ar r libtest.a $(LOBJS)
	$(RANLIB) libtest.a

test0: test0.h  test.hello.o test.bye test.bye2 test.shell
	$(GXX)  test.hello.o $(GXXLDFLAGS) -o test0

test.hello.o: test0.h test.hello.cc
	$(GXX) -c $(GXXFLAGS) $(TFLAGS) test.hello.cc -o test.hello.o

test.bye: test0.h test.bye.cc
	$(GXX) -c $(GXXFLAGS) $(TFLAGS) test.bye.cc -o test.bye

test.bye2: test0.h test.bye2.cc
	$(GXX) -c $(GXXFLAGS) $(TFLAGS) test.bye2.cc -o test.bye2

test.shell: test0.h test.shell.cc
	$(GXX) -c $(GXXFLAGS) $(TFLAGS) test.shell.cc -o test.shell


tFile:  tFile.o
	$(GXX)  tFile.o  -o tFile $(GXXLDFLAGS)

tObstack:  tObstack.o
	$(GXX)  tObstack.o  -o tObstack  $(GXXLDFLAGS)

tString:  tString.o
	$(GXX)  tString.o  -o tString  $(GXXLDFLAGS)

tInteger:  tInteger.o
	$(GXX)  tInteger.o  -o tInteger  $(GXXLDFLAGS)

twrapper:  twrapper.o
	$(GXX)  twrapper.o  -o twrapper  $(GXXLDFLAGS)

tgwrapper:   tgwrapper.o
	$(GXX)  tgwrapper.o  -o tgwrapper  $(GXXLDFLAGS)

tRational:  tRational.o
	$(GXX)  tRational.o  -o tRational  $(GXXLDFLAGS)

tComplex:  tComplex.o
	$(GXX)  tComplex.o  -o tComplex  $(GXXLDFLAGS)

tBitSet:  tBitSet.o
	$(GXX)  tBitSet.o  -o tBitSet  $(GXXLDFLAGS)

tBitString:  tBitString.o
	$(GXX)  tBitString.o  -o tBitString  $(GXXLDFLAGS)

tRandom:  tRandom.o
	$(GXX)  tRandom.o  -o tRandom  $(GXXLDFLAGS)

tFix:  tFix.o
	$(GXX)  tFix.o  -o tFix  $(GXXLDFLAGS)

tFix16:  tFix16.o
	$(GXX)  tFix16.o  -o tFix16  $(GXXLDFLAGS)

tFix24:  tFix24.o
	$(GXX)  tFix24.o  -o tFix24  $(GXXLDFLAGS)

tCurses:  tCurses.o
	$(GXX)  tCurses.o  -o tCurses -lg++ -lcurses -ltermcap $(GXXLDFLAGS)

tGetOpt:  tGetOpt.o
	$(GXX)  tGetOpt.o  -o tGetOpt  $(GXXLDFLAGS)

tList:  libtest.a  tList.o
	$(GXX)  tList.o -o tList -L. -ltest  $(GXXLDFLAGS)

tPlex:  libtest.a  tPlex.o
	$(GXX)  tPlex.o -o tPlex -L. -ltest  $(GXXLDFLAGS)

tLList:  libtest.a tLList.o
	$(GXX)  tLList.o -o tLList -L. -ltest  $(GXXLDFLAGS)

tVec: libtest.a tVec.o
	$(GXX)  tVec.o -o tVec -L. -ltest  $(GXXLDFLAGS)

tStack: libtest.a tStack.o
	$(GXX)  tStack.o -o tStack -L. -ltest  $(GXXLDFLAGS)

tQueue: libtest.a tQueue.o
	$(GXX)  tQueue.o -o tQueue -L. -ltest  $(GXXLDFLAGS)

tDeque: libtest.a tDeque.o
	$(GXX)  tDeque.o -o tDeque -L. -ltest  $(GXXLDFLAGS)

tPQ: libtest.a tPQ.o
	$(GXX)  tPQ.o -o tPQ -L. -ltest  $(GXXLDFLAGS)

tSet: libtest.a tSet.o
	$(GXX)  tSet.o -o tSet -L. -ltest  $(GXXLDFLAGS)

tSet2: libtest.a tSet2.o
	$(GXX)  tSet2.o -o tSet2 -L. -ltest  $(GXXLDFLAGS)

tBag:  libtest.a tBag.o
	$(GXX)  tBag.o -o tBag -L. -ltest  $(GXXLDFLAGS)

tBag2:  libtest.a tBag2.o
	$(GXX)  tBag2.o -o tBag2 -L. -ltest  $(GXXLDFLAGS)

tMap:  libtest.a tMap.o
	$(GXX)  tMap.o -o tMap -L. -ltest  $(GXXLDFLAGS)

idefs.h:
	$(GENCLASS) int val defs i
iSet.cc :
	$(GENCLASS) int val Set i
iXPSet.cc :
	$(GENCLASS) int val XPSet i
iOXPSet.cc :
	$(GENCLASS) int val OXPSet i
iSLSet.cc :
	$(GENCLASS) int val SLSet i
iOSLSet.cc :
	$(GENCLASS) int val OSLSet i
iBSTSet.cc :
	$(GENCLASS) int val BSTSet i
iAVLSet.cc :
	$(GENCLASS) int val AVLSet i
iSplaySet.cc :
	$(GENCLASS) int val SplaySet i
iVHSet.cc :
	$(GENCLASS) int val VHSet i
iVOHSet.cc :
	$(GENCLASS) int val VOHSet i
iCHSet.cc : 
	$(GENCLASS) int val CHSet i
iBag.cc : 
	$(GENCLASS) int val Bag i
iXPBag.cc :
	$(GENCLASS) int val XPBag i
iOXPBag.cc :
	$(GENCLASS) int val OXPBag i
iSLBag.cc :
	$(GENCLASS) int val SLBag i
iOSLBag.cc :
	$(GENCLASS) int val OSLBag i
iSplayBag.cc :
	$(GENCLASS) int val SplayBag i
iVHBag.cc :
	$(GENCLASS) int val VHBag i
iCHBag.cc :
	$(GENCLASS) int val CHBag i
iMap.cc :
	$(GENCLASS) -2 int val int val Map i
iVHMap.cc :
	$(GENCLASS) -2 int val int val VHMap i
iCHMap.cc :
	$(GENCLASS) -2 int val int val CHMap i
iSplayMap.cc :
	$(GENCLASS) -2 int val int val SplayMap i
iAVLMap.cc :
	$(GENCLASS) -2 int val int val AVLMap i
iRAVLMap.cc :
	$(GENCLASS) -2 int val int val RAVLMap i
iPQ.cc:
	$(GENCLASS) int val PQ i
iPHPQ.cc:
	$(GENCLASS) int val PHPQ i
iSplayPQ.cc:
	$(GENCLASS) int val SplayPQ i
iXPPQ.cc:
	$(GENCLASS) int val XPPQ i
iStack.h:
	$(GENCLASS) int val Stack i
iQueue.h:
	$(GENCLASS) int val Queue i
iDeque.h:
	$(GENCLASS) int val Deque i
iSLStack.h:
	$(GENCLASS) int val SLStack i
iSLQueue.h:
	$(GENCLASS) int val SLQueue i
iDLDeque.h:
	$(GENCLASS) int val DLDeque i
iList.cc: 
	$(GENCLASS) int val List i
iPlex.cc: 
	$(GENCLASS) int val Plex i
iFPlex.cc: 
	$(GENCLASS) int val FPlex i
iXPlex.cc: 
	$(GENCLASS) int val XPlex i
iMPlex.cc: 
	$(GENCLASS) int val MPlex i
iRPlex.cc: 
	$(GENCLASS) int val RPlex i
iFPStack.h:
	$(GENCLASS) int val FPStack i
iXPStack.h:
	$(GENCLASS) int val XPStack i
iFPQueue.h:
	$(GENCLASS) int val FPQueue i
iXPQueue.h:
	$(GENCLASS) int val XPQueue i
iXPDeque.h:
	$(GENCLASS) int val XPDeque i
iSLList.cc: 
	$(GENCLASS) int val SLList i
iDLList.cc: 
	$(GENCLASS) int val DLList i
iVec.cc:
	$(GENCLASS) int val Vec i
iAVec.cc:
	$(GENCLASS) int val AVec i
iVStack.cc:
	$(GENCLASS) int val VStack i
iVQueue.cc:
	$(GENCLASS) int val VQueue i

relink:
	(rm -f $(TOUTS); make tests)

clean:
	rm -f *.o core test.bye test.bye2 test.shell libtest.a $(TOUTS) $(GENCLASS)
	rm -f plot.out ffile streamfile i*.cc i*.h C++.hack* my.out checktests.diffs