#-*-ksh-*--------------------------------------------------------------
#  Makefile
# 
#   Makefile for ssTest Directory
# 
# (c) Copyright 1995  Hewlett-Packard Company.
# The contents of this software are proprietary and confidential to
# the Hewlett- Packard Company, and are limited in distribution to
# those with a direct need to know.  Individuals having access to
# this software are responsible for maintaining the confidentiality
# of the content and for keeping the software secure when not in use.
# Transfer to any party is strictly forbidden other than as expressly
# permitted in writing by Hewlett-Packard Company.  Unauthorized
# transfer to or possession by any unauthorized party may be a
# criminal offense.
# 
#		     RESTRICTED RIGHTS LEGEND
# 
#      Use,  duplication,  or disclosure by the Government  is
#      subject to restrictions as set forth in subdivision (b)
#      (3)  (ii)  of the Rights in Technical Data and Computer
#      Software clause at 52.227-7013.
# 
#			 HEWLETT-PACKARD COMPANY
#			 3000 Hanover St.
#			 Palo Alto, CA  94304
# 
# LINK ERRORS:
# 
#  If ld gives "target of unconditional branch out of range" errors,
#  you most likely need to update your system with patch PHSS_5083.
# 
#  This problem seems to be made worse by many levels of nested
#  inlines.
#  
#  This same problem was HELPED (but not fixed) by fixing the order of
#  the files in the final link-compile step.  For all of the tests,
#  <testname>.o is listed before ssLib.o and any other modules it needs
#  to link in.
#
# TARGETS:
#
#  all:              All Tests
#  noDevTests:       Tests which may be run without a device.
#  destructiveTests: Tests which write to device object.
#  nsrTests:         Tests which require valid NSR disk in device.
#  clean:            Removes all executables and all .o files.
#
# COMPILER WARNINGS:
#
#  See tail of file for explanation
#
# ----------------------------------------------------------------------
# $Source: /projects/HMS/nsr/udfAncil/msTest/Makefile,v $
# $Revision: 1.50 $	$Author: hmgr $
# $State: Exp $   	$Locker:  $
# $Date: 96/05/07 10:50:07 $

NSRDIR=../..

COREDIR=$(NSRDIR)/udfCore
CONFIGDIR= $(COREDIR)/config
MSDIR=$(COREDIR)/ms
SYSDIR=$(COREDIR)/sys
DEVDIR=$(COREDIR)/devs
DESCRDIR=$(COREDIR)/descr

ANCILDIR=$(NSRDIR)/udfAncil
DEVSTESTDIR=$(ANCILDIR)/devsTest
MSVERIFYDIR=$(ANCILDIR)/msVerify
#MAKEFILE_DEPEND=Makefile
MAKEFILE_DEPEND=

#INCLUDE_DIRS    = -I$(NSRDIR) -I$(CONFIGDIR) -I$(SSDIR) -I$(SYSDIR) -I$(DEVDIR) -I$(DESCRDIR)
INCLUDE_DIRS    = -I$(NSRDIR) -I$(DEVDIR) -I$(MSVERIFYDIR) \
		  -I$(DEVSTESTDIR) -I$(DEVDIR) -I$(COREDIR) -I$(MSVERIFYDIR) \
		  -I$(SYSDIR) -I$(CONFIGDIR)

regress=arcRead CarcRead ParcRead arcWrite CarcWrite ParcWrite

TEST_COMPILE=arcRead arcWrite arcBrowse ParcRead ParcWrite ParcBrowse \
	     QarcRead QarcWrite QarcBrowse jbread 

ASM= gas
CC=gcc
CFLAGS= -g $(OFLAGS)  
CXX= g++
LEX=	flex
YACC=	bison

CXXFLAGS= -g -D_INCLUDE__STDC__ $(INCLUDE_DIRS) \
	  -DNSR_VERIFY -DMSTEST $(OFLAGS) -I../devsTest \
	  -D_THIRD_PARTY_ERROR_CODES_ -DROGUEWAVIFIED
LOADER=/usr/local/lib/gcc-lib/hppa1.1-hp-hpux9.01/2.6.3/ld

LIBFLAGS= $(CXXFLAGS) -D_NO_ALIASES_
TSTFLAGS= $(CXXFLAGS) -D_HP_ALIASES_ -DDEBUG

INCLS= \
	$(CONFIGDIR)/nsrCfg.h \
	$(CONFIGDIR)/nsrAlias.h \
	$(CONFIGDIR)/nsrTypdf.h \
	$(COREDIR)/nsrLib.h \
	$(SYSDIR)/nsrError.h \
	$(SYSDIR)/nsrAux.h \
	$(SYSDIR)/nsrDebug.h \
	$(SYSDIR)/nsrTrace.h \
	$(DESCRDIR)/nsrTypes.h \
	$(DESCRDIR)/nsrRecog.h \
	$(DESCRDIR)/nsrVol.h \
	$(DESCRDIR)/nsrEA.h \
	$(DESCRDIR)/nsrFile.h \
	$(DESCRDIR)/nsrAttr.h \
	$(DEVDIR)/nsrscsi.h \
	$(DEVDIR)/RealSSdv.h \
	$(DEVDIR)/RealMSdv.h \
	$(DEVDIR)/nsrASSdv.h \
	$(DEVDIR)/nsrAMSdv.h \
	$(DEVDIR)/nsrRSSdv.h \
	$(DEVDIR)/nsrRMSdv.h \
	$(MSDIR)/nsrImp.h \
	$(MSDIR)/nsrInt.h \
	$(MSDIR)/nsrArc.h

ARCINCLS= \
	arcImEx.h \
	arcTree.h \
	$(DEVSTESTDIR)/dlist.h \
	cpio.h \
	nsrFS.h \
	fsalloc.h \
	hash.h 

ARCSOURCES= \
	nsrJB.cpp \
	fsalloc.cpp \
	cpioHdr.cpp \
	cpioRead.cpp \
	cpioWrit.cpp \
	nsrFS.cpp \
	arcTree.cpp

LIBSOURCES= \
	$(CONFIGDIR)/nsrStat.cpp \
	$(SYSDIR)/nsrError.cpp \
	$(SYSDIR)/nsrAux.cpp \
	$(SYSDIR)/nsrDebug.cpp \
	$(SYSDIR)/nsrTrace.cpp \
	$(DEVDIR)/nsrRSSdv.cpp \
	$(DEVDIR)/nsrRMSdv.cpp \
	$(DESCRDIR)/nsrTypes.cpp \
	$(DESCRDIR)/nsrVol.cpp \
	$(DESCRDIR)/nsrEA.cpp \
	$(DESCRDIR)/nsrFile.cpp \
	$(DESCRDIR)/nsrAttr.cpp \
	$(MSDIR)/nsrInt.cpp \
	$(MSDIR)/nsrImp.cpp \
	$(MSDIR)/nsrArc.cpp

all:	$(TEST_COMPILE)

msLib.o:	$(INCLS) $(LIBSOURCES) msLib.cpp $(MAKEFILE_DEPEND)
	$(CXX) $(LIBFLAGS) -c msLib.cpp 
		
arcRead.o:	$(INCLS) arcRead.cpp $(MAKEFILE_DEPEND) dqueue.h arcImEx.h
	$(CXX) $(TSTFLAGS) -c arcRead.cpp

jbread.o:	$(INCLS) jbread.cpp $(MAKEFILE_DEPEND) arcImEx.h
	$(CXX) $(TSTFLAGS) -c jbread.cpp

arcBrowse.o:	$(INCLS) arcRead.cpp $(MAKEFILE_DEPEND) dqueue.h arcImEx.h
	$(CXX) $(TSTFLAGS) -D_ARCBROWSE_ -c -o arcBrowse.o arcRead.cpp

udf2cmr.o:	$(INCLS) udf2cmr.cpp $(MAKEFILE_DEPEND) dqueue.h hash.h \
		arcImEx.h
	$(CXX) $(TSTFLAGS) -D_UDFTOCMR_ONLY_ -c -o udf2cmr.o udf2cmr.cpp

jbTest.o:	$(INCLS) jbTest.cpp $(MAKEFILE_DEPEND) dqueue.h arcImEx.h
	$(CXX) $(TSTFLAGS) -c jbTest.cpp

arcWrite.o:	$(INCLS) arcWrite.cpp $(MAKEFILE_DEPEND) dqueue.h arcImEx.h \
		cpio.h
	$(CXX) $(TSTFLAGS) -c arcWrite.cpp

treeTest.o:	$(INCLS) treeTest.cpp $(MAKEFILE_DEPEND) dqueue.h arcImEx.h
	$(CXX) $(TSTFLAGS) -c treeTest.cpp

arcImEx.o:	$(INCLS) arcImEx.cpp $(ARCSOURCES) $(ARCINCLS) $(MAKEFILE_DEPEND) 
	$(CXX) $(TSTFLAGS) -c arcImEx.cpp

acptlib.o:	$(DEVDIR)/acptlib.c $(DEVDIR)/acptlib.h $(MAKEFILE_DEPEND)
	$(CC) $(CFLAGS) -c $(DEVDIR)/acptlib.c

dlist.o:	$(DEVSTESTDIR)/dlist.c $(DEVSTESTDIR)/dlist.h $(MAKEFILE_DEPEND)
	$(CC) $(CFLAGS) $(INCLUDE_DIRS) -c $(DEVSTESTDIR)/dlist.c

hash.o:		hash.c hash.h $(DEVSTESTDIR)/dlist.h $(DEVSTESTDIR)/dlist.c \
		$(MAKEFILE_DEPEND)
	$(CC) $(CFLAGS) $(INCLUDE_DIRS) -c hash.c

dbBrowse.o:	dbBrowse.cpp $(INCLS) 
	$(CXX) $(TSTFLAGS)  -c -DROGUEWAVIFIED dbBrowse.cpp

#
# ************** synth stuff **************
#

syndata.o:	$(INCLS) syndata.cpp syndata.h $(MAKEFILE_DEPEND) arcImEx.h
	$(CXX) $(TSTFLAGS) -c syndata.cpp

arcSynth.o:	$(INCLS) arcSynth.cpp arcSynth.h $(MAKEFILE_DEPEND) arcImEx.h
	$(CXX) $(TSTFLAGS) -c arcSynth.cpp

synthY.o:	synthY.cpp synthY.h  arcSynth.h $(MAKEFILE_DEPEND)
	$(CXX) $(TSTFLAGS) -c synthY.cpp

synthY.cpp \
synthY.h:	synthY.y arcSynth.h $(MAKEFILE_DEPEND)
	${YACC} -d -v -p synth synthY.y
	sed "s/yyparse(YYPARSE_PARAM)/SynthFile::yyparse(YYPARSE_PARAM)/g" \
		synthY.tab.c > synthY.cpp
	rm synthY.tab.c
	mv synthY.tab.h synthY.h

synthL.o:	synthY.h synthL.cpp
	$(CXX) $(TSTFLAGS) -c synthL.cpp

synthL.cpp:	synthL.l $(MAKEFILE_DEPEND)
	${LEX} -Psynth synthL.l
	mv lex.synth.c synthL.cpp

tstSynth.o:	$(INCLS) tstSynth.cpp synthY.o synthL.o \
		$(MAKEFILE_DEPEND) dqueue.h arcImEx.h
	$(CXX) $(TSTFLAGS) -c tstSynth.cpp

#
# The CMR stuff from msVerify
#
# This next rule is a shortcut for now.
#

../msVerify/cmr.a:	../msVerify/cmrRead.cpp ../msVerify/cmr.h \
	../msVerify/cmrWrite.cpp ../msVerify/cmrTools.cpp \
	../msVerify/cmrDiff.cpp ../msVerify/Makefile $(LIBSOURCES)
	cd ../msVerify ; make -f Makefile cmr.a

# *************************************
#
# Now, the main executables
#
# *************************************

#
# ************* arcBrowse *************
#

dbBrowse:	$(INCLS) dbBrowse.o msLib.o acptlib.o dlist.o \
		arcImEx.o Makefile
	$(CXX) $(TSTFLAGS) -o dbBrowse \
	 dbBrowse.o msLib.o acptlib.o dlist.o arcImEx.o -lrwtool
		
arcBrowse:	$(INCLS) arcBrowse.o msLib.o acptlib.o dlist.o hash.o \
		arcImEx.o ../msVerify/cmr.a Makefile
	$(CXX) $(TSTFLAGS) -o arcBrowse \
	 arcBrowse.o msLib.o acptlib.o dlist.o hash.o arcImEx.o \
	 ../msVerify/cmr.a -lrwtool

ParcBrowse:	$(INCLS) arcBrowse.o msLib.o dlist.o arcImEx.o hash.o \
		acptlib.o Makefile
	purify -collector=$(LOADER) \
	 purecov -collector=$(LOADER) \
	 $(CXX) $(TSTFLAGS) -o ParcBrowse \
	 arcBrowse.o msLib.o acptlib.o dlist.o hash.o arcImEx.o \
	 ../msVerify/cmr.a -lrwtool

QarcBrowse:	$(INCLS) arcBrowse.o msLib.o acptlib.o dlist.o hash.o \
		arcImEx.o Makefile
	quantify -collector=$(LOADER) \
	 $(CXX) $(TSTFLAGS) -o QarcBrowse  \
	 arcBrowse.o msLib.o acptlib.o dlist.o hash.o arcImEx.o \
	 ../msVerify/cmr.a -lrwtool

#
# ************* arcRead *************
#

arcRead:	$(INCLS) arcRead.o msLib.o acptlib.o dlist.o hash.o \
		arcImEx.o ../msVerify/cmr.a syndata.o Makefile
	$(CXX) $(TSTFLAGS) -o arcRead \
	arcRead.o msLib.o acptlib.o dlist.o hash.o arcImEx.o \
	../msVerify/cmr.a syndata.o -lrwtool -lm

CarcRead:	$(INCLS) arcRead.o msLib.o acptlib.o dlist.o hash.o \
		arcImEx.o ../msVerify/cmr.a syndata.o Makefile
	purecov -force_rebuild -repair_dead_branches -no_link ld msLib.o \
	 arcRead.o acptlib.o dlist.o hash.o arcImEx.o ../msVerify/cmr.a
	purecov -collector=$(LOADER) \
	 $(CXX) $(TSTFLAGS) -o CarcRead \
	 arcRead.o msLib.o acptlib.o dlist.o hash.o arcImEx.o \
	 ../msVerify/cmr.a syndata.o -lrwtool -lm

ParcRead:	$(INCLS) arcRead.o msLib.o acptlib.o dlist.o hash.o \
		arcImEx.o ../msVerify/cmr.a syndata.o Makefile
	purify -force_rebuild -repair_dead_branches -no_link ld msLib.o \
	 arcRead.o acptlib.o dlist.o hash.o arcImEx.o ../msVerify/cmr.a
	purecov -collector=$(LOADER) \
	 purify -collector=$(LOADER) \
	 $(CXX) $(TSTFLAGS) -o ParcRead \
	 arcRead.o msLib.o acptlib.o dlist.o hash.o arcImEx.o \
	 ../msVerify/cmr.a syndata.o -lrwtool -lm

QarcRead:	$(INCLS) arcRead.o msLib.o acptlib.o dlist.o hash.o \
		arcImEx.o syndata.o ../msVerify/cmr.a Makefile
	quantify -force_rebuild -repair_dead_branches -no_link ld msLib.o \
	 arcRead.o acptlib.o dlist.o hash.o arcImEx.o ../msVerify/cmr.a
	quantify -collector=$(LOADER) \
	 $(CXX) $(TSTFLAGS) -o QarcRead \
	 arcRead.o msLib.o acptlib.o dlist.o hash.o arcImEx.o \
	 ../msVerify/cmr.a syndata.o -lrwtool -lm

#
# ************* arcWrite *************
#

arcWrite:	$(INCLS) arcWrite.o msLib.o acptlib.o dlist.o hash.o \
		arcImEx.o ../msVerify/cmr.a arcSynth.o synthY.o synthL.o \
                syndata.o Makefile
	$(CXX) $(TSTFLAGS) -o arcWrite  \
	 arcWrite.o msLib.o acptlib.o dlist.o hash.o arcImEx.o \
	 ../msVerify/cmr.a arcSynth.o synthY.o synthL.o syndata.o \
	 -lrwtool -lm

CarcWrite:	$(INCLS) arcWrite.o msLib.o acptlib.o dlist.o hash.o \
		arcImEx.o ../msVerify/cmr.a arcSynth.o synthY.o synthL.o \
		syndata.o Makefile
	purecov -force_rebuild -repair_dead_branches -no_link ld \
	 msLib.o arcWrite.o \
	 acptlib.o dlist.o hash.o arcImEx.o ../msVerify/cmr.a
	purecov -collector=$(LOADER) \
	 $(CXX) $(TSTFLAGS) -o CarcWrite  \
	 arcWrite.o msLib.o acptlib.o dlist.o hash.o arcImEx.o \
	 ../msVerify/cmr.a arcSynth.o synthY.o synthL.o syndata.o \
	 -lrwtool -lm

ParcWrite:	$(INCLS) arcWrite.o msLib.o acptlib.o dlist.o hash.o \
		arcImEx.o ../msVerify/cmr.a arcSynth.o synthY.o synthL.o \
		syndata.o Makefile
	purify -force_rebuild -repair_dead_branches -no_link ld \
	 msLib.o arcWrite.o \
	 acptlib.o dlist.o hash.o arcImEx.o ../msVerify/cmr.a
	purify -collector=$(LOADER) \
	$(CXX) $(TSTFLAGS) -o ParcWrite  \
	 arcWrite.o msLib.o acptlib.o dlist.o hash.o arcImEx.o \
	 ../msVerify/cmr.a arcSynth.o synthY.o synthL.o syndata.o \
	 -lrwtool -lm

QarcWrite:	$(INCLS) arcWrite.o msLib.o acptlib.o dlist.o hash.o \
		arcImEx.o ../msVerify/cmr.a arcSynth.o synthY.o synthL.o \
		syndata.o Makefile
	quantify -force_rebuild -repair_dead_branches -no_link ld \
	 msLib.o arcWrite.o \
	 acptlib.o dlist.o hash.o arcImEx.o ../msVerify/cmr.a \
	 arcSynth.o synthY.o synthL.o syndata.o 
	quantify -collector=$(LOADER) \
	 $(CXX) $(TSTFLAGS) -o QarcWrite  \
	 arcWrite.o msLib.o acptlib.o dlist.o hash.o arcImEx.o \
	 ../msVerify/cmr.a arcSynth.o synthY.o synthL.o syndata.o \
	 -lrwtool -lm

#
# ************* tstSynth ***************
#

tstSynth:	$(INCLS) tstSynth.o arcSynth.o msLib.o acptlib.o dlist.o \
 		hash.o arcImEx.o synthL.o synthY.o
	$(CXX) $(TSTFLAGS) -o tstSynth tstSynth.o arcSynth.o \
	 synthY.o synthL.o msLib.o acptlib.o dlist.o hash.o \
	 arcImEx.o ../msVerify/cmr.a -lrwtool

PtstSynth:	$(INCLS) tstSynth.o arcSynth.o msLib.o acptlib.o dlist.o \
		hash.o arcImEx.o synthL.o synthY.o
	purify -collector=$(LOADER) \
	 $(CXX) $(TSTFLAGS) -o tstSynth tstSynth.o arcSynth.o \
	 synthY.o synthL.o msLib.o acptlib.o dlist.o hash.o \
	 arcImEx.o ../msVerify/cmr.a -lrwtool

#
# ************* treeTest **************
#

treeTest:	$(INCLS) treeTest.o msLib.o dlist.o arcImEx.o \
		acptlib.o hash.o Makefile
	$(CXX) $(TSTFLAGS) -o treeTest \
	 treeTest.o msLib.o dlist.o arcImEx.o hash.o acptlib.o -lrwtool

PtreeTest:	$(INCLS) treeTest.o msLib.o dlist.o arcImEx.o \
		acptlib.o hash.o Makefile
	purify -collector=$(LOADER) \
	 purecov -collector=$(LOADER) \
	 $(CXX) $(TSTFLAGS) -o PtreeTest  \
	 treeTest.o msLib.o dlist.o arcImEx.o hash.o acptlib.o -lrwtool

QtreeTest:	$(INCLS) treeTest.o msLib.o dlist.o arcImEx.o \
		acptlib.o hash.o Makefile
	quantify -collector=$(LOADER) \
	 $(CXX) $(TSTFLAGS) -o QtreeTest  \
	 treeTest.o msLib.o dlist.o arcImEx.o acptlib.o hash.o -lrwtool

#
# **************** misc *****************
#

jbread:	$(INCLS) jbread.o msLib.o acptlib.o dlist.o arcImEx.o Makefile
	$(CXX) $(TSTFLAGS) -o jbread jbread.o msLib.o acptlib.o \
	 dlist.o arcImEx.o -lrwtool

moread:	jbread
	rm -f moread
	ln -s `pwd`/jbread moread

udf2cmr:	$(INCLS) udf2cmr.o msLib.o acptlib.o dlist.o hash.o \
		arcImEx.o ../msVerify/cmr.a Makefile
	$(CXX) $(TSTFLAGS) -o udf2cmr \
	 udf2cmr.o msLib.o acptlib.o dlist.o hash.o arcImEx.o \
	 ../msVerify/cmr.a -lrwtool

jbTest:	$(INCLS) jbTest.o msLib.o acptlib.o dlist.o hash.o 
	arcImEx.o Makefile
	$(CXX) $(TSTFLAGS) -o jbTest \
	 jbTest.o msLib.o acptlib.o dlist.o hash.o arcImEx.o -lrwtool

# *************** clean ******************

clean:
	rm -f $(TEST_COMPILE) *.o

#############################################################
#
# USING SUFFIX RULES
#                   
# (DVM 4/5/95)
#
# The suffix approach to making the link step separate did not work,
# as the dependency upon changes in any of the include files was not
# reflected. This would manifest itself in link time errors, usually
# right after a significant change to the includes.
#
# The fix for this was to explicitly call out each .o for each test,
# and include a dependency on the include change.
#
# This .cpp.o rule uses an intermediate assembly product to perform compilation.
#
# .cpp.o:
# 	$(CXX) -S $(CXXFLAGS) $< > $*.s
# 	$(ASM) $*.s -o $*.o 
#
# ssLib.o:	$(INCLS) $(LIBSOURCES) Makefile ssLib.cpp
#	$(CXX) -S $(CXXFLAGS) -DNSR_VERIFY  ssLib.cpp > $*.s
#	$(ASM) ssLib.s -o ssLib.o 
#
# This is the failed .cpp.o rule:
#
# .cpp.o:	$(INCLS)
#	$(CXX) -c $(CXXFLAGS) $<
#
#########################################################
# 
# COMPILER WARNINGS:
#
# Use:
# CXXFLAGS= -g -DSSLIB -D_INCLUDE__STDC__ -I"../devs" -DNSR_VERIFY -Wall -Wshadow -Wconversion -Winline -Woverloaded-virtual -Wstrict-prototypes 
#
# ************** Flag Definitions ***************
# (courtesy of JLK)
#
# -f is 'force' (I think)
# -W is 'enable Warnings'
#
# -Wall includes:
#   -W		print extra warning messages (p.32, Using GNU CC)
#       There's a lot of causes, but this one is major:  warn when 
#	a function can return either with or w/o a value.  (Falling off 
#	the end of the function body is considered returning without a 
# 	value.)  For example, this function would evoke such a warning:
#		foo (a)  {
#		   if (a > 0)
#			return a;
#		}
#   -Wimplicit  warn whenever a function or parameter is implicityly declared
#   -Wreturn-type	warn on returns that default to int, or no return-val
#			and return-type not void 
#   -Wunused	unused local variables
#   -Wswitch    switch on enum misses values
#   -Wcomment   warn when /* appears inside of a comment.  (nested comments)
#   -Wtrigraphs (garbage)
#   -Wformat    check calls to printf and scanf to make sure that arguments 
#               have types approp. to format string
#   -Wchar-subscripts	warn if an array subscript has type char.  This is a
#			a common cause of error, as ppl often forget that
#			this type is signed on some machines.
#   -Wuninitialize	(only works when optimizing) uninit'd vars
#   -Wparentheses	warn in certain places ppl often leave out needed p's
#   -Wenum-clash	warn about conversion betw diff enum types
#   -Wtemplate-debugging	note that templates aren't fully imp'd
#
# -Wshadow 		warn when a local var shadows another local var
# -Wconversion 		warn if a protoype causes a type conversion that is
#			diff from what would happen to same arg in absence
#			of proto.  Incl. conversions of fixed point to float
#			and vice versa, and conv's changing the width or 
#			signedness of a fixed point arg except when the
#			same as the default promotion.
#
#			Also, warn if a negative integer constant expression
#			is implicitly converted to an unsigned type.
#			For example, warn about 'x = -1' if x is unsigned.
#			But do not warn about explicit casts like 
#			'(unsigned) -1'
# -Winline		warn if a func can't be inlined 
# -Woverloaded-virtual 	warn when a derived class func declar. may be in err
#			in defining a virtual func.  In a derived class, the
#			definitions of virt funcs must match the type sig
#			of a virt func defined in the base class.  Warn if not.
# -Wstrict-prototypes 	you must specify argument types.  An old-style func
#			is permitted w/o warning if preceded by a declaration
#			that specifies the arg types.
# And I originally had 
# this one but we do it 
# all the time, and it 
# caused too many warnings:
# -Waggregate-return 	warn on funcs that return structs, unions, or arrays
#
# -fansi-overloading is no longer meaningful (according to the compiler)
#	From the g++ FAQ:  "One of the weakest areas of g++ other than 
#   templates is the resolution of overloaded functions and operators
#   in complex cases.  The usual symptom is that in a case where the ARM
#   says that it is ambiguaous which funct should be chosen, g++ chooses 
#   one (often the first one declared).  This is uaually not a problem when 
#   porting C++ code from other compilers to g++, but shows up when code 
#   developed under g++ is ported to other compilers.
#
#       As of 2.5.0, the overloading code has been rewritten.  For now,
#   you must specify the option '-fansi-overloading' to get the new code,
#   since there were some important users actually depending on g++'s 
#   incorrect resolution of ambiguities.  This switch should disappear in
#   the future.
#
