#========================================================================== # # makefile for tutorial examples # # $Id: makefile.in,v 1.21 1996/09/19 17:10:06 djang Exp $ # #========================================================================== # (c) Copyright 1994-1996 Rogue Wave Software, Inc. # ALL RIGHTS RESERVED # # The software and information contained herein are proprietary to, and # comprise valuable trade secrets of, Rogue Wave Software, Inc., which # intends to preserve as trade secrets such software and information. # This software is furnished pursuant to a written license agreement and # may be used, copied, transmitted, and stored only in accordance with # the terms of such license and with the inclusion of the above copyright # notice. This software and information or any other copies thereof may # not be provided or otherwise made available to any other person. # # Notwithstanding any other lease or license that may pertain to, or # accompany the delivery of, this computer software and information, the # rights of the Government regarding its use, reproduction and disclosure # are as set forth in Section 52.227-19 of the FARS Computer # Software-Restricted Rights clause. # # Use, duplication, or disclosure by the Government is subject to # restrictions as set forth in subparagraph (c)(1)(ii) of the Rights in # Technical Data and Computer Software clause at DFARS 252.227-7013. # Contractor/Manufacturer is Rogue Wave Software, Inc., # P.O. Box 2328, Corvallis, Oregon 97339. # # This computer software and information is distributed with "restricted # rights." Use, duplication or disclosure is subject to restrictions as # set forth in NASA FAR SUP 18-52.227-79 (April 1985) "Commercial # Computer Software-Restricted Rights (April 1985)." If the Clause at # 18-52.227-74 "Rights in Data General" is specified in the contract, # then the "Alternate III" clause applies. # #========================================================================== # # This file has been processed by the shell script # "config_make" to create a CC makefile # #========================================================================== # Library suffix for use when building with static version of Stdlib. LIB_SUFFIX= .a # Uncomment the following when building with a shared version # of StdLib under IRIX or SINIX #LIB_SUFFIX= .so.2 # Uncomment the following to build a "debug" version #DBG= -D_RWDEBUG=1 -g #DBGNAME= g # Uncomment the following to build a thread-safe version #MTSAFE= -D_RWSTD_MULTI_THREAD -D_REENTRANT #MTNAME= _mt # The following should be set to whatever command # is necessary to invoke your compiler: CCC= CC CPP= $(CCC) # Options to be passed to your C++ compiler: CPPOPTIONS= -O # NAME can be used to give this particular library a special # name. This is useful when working with more than one # compiler. Specify on command line or here. NAME= # MAKE can be used to specify a different build utility # then the default "make" MAKE= make # SPECIAL can be used to specify compiler options SPECIAL= # DBCLEAN is the command used to clean the database CCADMIN= CCadmin DBCLEAN= $(CCADMIN) -clean ################################################################## # # From here on, it's pretty much boilerplate. # ################################################################## SHELL= /bin/sh MOVE= mv COPY= ln -s RM= rm -f # Where the library should have been built: _RWLIB= ../../lib # Rogue Wave header file include path: _RWINCL= ../../include # include file directory: _RWDIR= ../../include # Base name of the library: LIBNAME= lib$(NAME)std$(DBGNAME)$(FPNAME)$(MTNAME) # Root names (excluding suffix) of the library: LIBROOT= $(_RWLIB)/$(LIBNAME) # Full name (including suffix) of the library: LIBFULL= $(_RWLIB)/$(LIBNAME)$(LIB_SUFFIX) # Where can we find the include files for this library LIBRARYINCDIR= -I. # Full name of library of test-related code AUXLIB = # Compile flags for the library: CPPFLAGS= -I$(_RWINCL) $(LIBRARYINCDIR) $(CPPOPTIONS) $(FPFLAG) $(DBG) $(SHARED_CPPOPTS) $(MTSAFE) # Extension used by this compiler for source files EXT= cpp RM= rm -f COPY= ln -s # Where can we find the standard "non-library" header files INCLUDEDIR= # Subdir to put test results into SUBDIR=testout LINKFLAGS= -lm -lCstd ################################## # NOTHING BELOW THIS SHOULD CHANGE ################################## # These are the files that will get compiled into the # library, or installed into the appropriate directory. RWEXAMPLES = $(RWPROGRAMS) RWPROGRAMS = alg1 alg2 alg3 alg4 alg5 alg6 alg7 calc \ complx concord exceptn graph \ icecream radix sieve spell stocks tele widwork all: $(RWEXAMPLES) run : runtests runtests: @for test in $(RWEXAMPLES) ; do \ echo "running example $$test -- stdout + stderr copied to $$test.log" ; \ if [ -f core ] ; then \ rm -f core ; \ fi ; \ if [ -f $$test ] ; then \ ./$$test 2>&1 | tee $$test.log ; \ else \ echo "cannot locate $$test for execution" ; \ echo "Assertion - executable does not exist." > $$test.log ; \ fi ; \ if [ -f core ] ; then \ echo "Assertion - core dump. " >> $$test.log ; \ fi ; \ done cleantst: $(RWRM) *.o *.ii *.ti core alg1: alg1.o alg2: alg2.o alg3: alg3.o alg4: alg4.o alg5: alg5.o alg6: alg6.o alg7: alg7.o calc: calc.o complx: complx.o concord: concord.o exceptn: exceptn.o graph: graph.o icecream: icecream.o radix: radix.o sieve: sieve.o spell: spell.o stocks: stocks.o tele: tele.o widwork: widwork.o clobber clean: $(RWRM) $(RWTEMPLATE_REPOSITORY) $(RWRM) *.o *.dbx *.i *.ixx *.adb *.ldb schema_g.* *.I $(RWEXAMPLES) ########################### Conversions ############################## .SUFFIXES: .cpp .C .cc .cxx .o $(RWEXAMPLES): $(CPP) $(SPECIAL) $(CPPFLAGS) -o $@ $@.o $(LINKFLAGS) .cpp.o: $(DBCLEAN); $(CPP) $(CPPFLAGS) $(SPECIAL) -c $<