#-*-ksh-*--------------------------------------------------------------
#  Makefile
#   Makefile for descriptor test directory
#
#      Unpublished Confidential Information of Hewlett-Packard
#      Company. Do not disclose.  Copyright (c) Hewlett-Packard
#      Company 1995. All rights reserved
# 
# 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 U. S. Government is
#      subject to restrictions as set forth in subparagraph (c) (1)
#      (ii) in the Rights in Technical Data and Computer Software
#      clause in DFARS 252.227-7013 or any other successor clause.
#
#			 HEWLETT-PACKARD COMPANY
#			 3000 Hanover St.
#			 Palo Alto, CA  94304 U.S.A.
#
#      Rights for non-DOD U.S. Government Departments and Agencies
#      are as set forth in FAR 52.227-19 (c) (1,2) or any other
#      successor clause.
#
#----------------------------------------------------------------------
#
# $Source: /projects/HMS/nsr/udfAncil/descrTst/Makefile,v $
# $Revision: 1.33 $	$Author: hmgr $
# $State: Exp $   	$Locker:  $
# $Date: 96/05/21 11:19:55 $
#

NSRDIR=../..
COREDIR=$(NSRDIR)/udfCore
CONFIGDIR=$(COREDIR)/config
SYSDIR=$(COREDIR)/sys
DESCRDIR=$(COREDIR)/descr

INCLUDE_DIRS    = -I$(NSRDIR) -I$(CONFIGDIR) -I$(SYSDIR) -I$(DESCRDIR) \
		  -I$(COREDIR)

CXX= g++
CXXFLAGS= -g -DNSR_VERIFY $(INCLUDE_DIRS) -DDESCRTEST $(OFLAGS)
LOADER=/usr/local/lib/gcc-lib/hppa1.1-hp-hpux9.01/2.6.3/ld

LIBFLAGS= $(CXXFLAGS) -D_NO_ALIASES_ -DDEBUG
TSTFLAGS= $(CXXFLAGS) -D_HP_ALIASES_ -D_HP_ENUM_ALIASES_ -DNSR_VERIFY 
#TSTFLAGS= $(CXXFLAGS) -D_HP_ALIASES_ -D_HP_ENUM_ALIASES_ -DATTR_TEST_DBUG

TEST_SOURCE =	\
		descrTst.cpp \
		lvidTest.cpp \
		attrTest.cpp 

INCLS= \
	$(COREDIR)/nsrLib.h \
	$(CONFIGDIR)/nsrTypdf.h \
	$(CONFIGDIR)/nsrMem.h \
	$(CONFIGDIR)/nsrAlias.h \
	$(SYSDIR)/nsrError.h \
	$(SYSDIR)/Trust.h \
	$(SYSDIR)/nsrTrust.h \
	$(SYSDIR)/nsrAux.h \
	$(SYSDIR)/nsrTrace.h \
	$(DESCRDIR)/nsrAttr.h \
	$(DESCRDIR)/nsrTypes.h \
	$(DESCRDIR)/nsrRecog.h \
	$(DESCRDIR)/nsrVol.h \
	$(DESCRDIR)/nsrEA.h \
	$(DESCRDIR)/nsrFile.h \
	$(SYSDIR)/nsrDebug.h

DESCRSOURCES=\
	$(CONFIGDIR)/nsrStat.cpp \
	$(SYSDIR)/nsrError.cpp \
	$(SYSDIR)/nsrAux.cpp \
	$(SYSDIR)/nsrDebug.cpp \
	$(SYSDIR)/nsrTrace.cpp \
	$(DESCRDIR)/nsrAttr.cpp \
	$(DESCRDIR)/nsrTypes.cpp \
	$(DESCRDIR)/nsrVol.cpp \
	$(DESCRDIR)/nsrEA.cpp \
	$(DESCRDIR)/nsrFile.cpp

all:	descrTst lvidTest attrTest

msDescrLib.cpp:	$(DESCRSOURCES) Makefile
	cat $(DESCRSOURCES) > msDescrLib.cpp

msDescrLib.o:	$(INCLS) msDescrLib.cpp Makefile
	$(CXX) $(LIBFLAGS) -DMSLIB -c msDescrLib.cpp
		
descrLib.o:	$(INCLS) $(DESCRSOURCES) descrLib.cpp Makefile
	$(CXX) $(LIBFLAGS) -c descrLib.cpp
		
msDescrTest:	$(INCLS) descrTst.cpp msDescrLib.o Makefile
	$(CXX) $(TSTFLAGS) -DMSLIB -o msDescrTest \
	 msDescrLib.o descrTst.cpp -lrwtool

attrTest.o:	$(INCLS) attrTest.cpp Makefile
	$(CXX) $(TSTFLAGS) -c attrTest.cpp

descrTst.o:	$(INCLS) descrTst.cpp Makefile
	$(CXX) $(TSTFLAGS) -c descrTst.cpp

lvidTest.o:	$(INCLS) lvidTest.cpp Makefile
	$(CXX) $(TSTFLAGS) -c lvidTest.cpp

attrTest:	$(INCLS) attrTest.o descrLib.o Makefile
	$(CXX) $(TSTFLAGS) -o attrTest descrLib.o attrTest.o -lrwtool

PattrTest:	$(INCLS) attrTest.o descrLib.o Makefile
	purify -collector=$(LOADER) \
	 $(CXX) $(TSTFLAGS) -o PattrTest descrLib.o attrTest.o -lrwtool

descrTst:	$(INCLS) descrTst.o descrLib.o Makefile
	$(CXX) $(TSTFLAGS) -o descrTst descrLib.o descrTst.o -lrwtool

PdescrTst:	$(INCLS) descrTst.o descrLib.o Makefile
	purify -collector=$(LOADER) \
	 $(CXX) $(TSTFLAGS) -o PdescrTst descrLib.o descrTst.o -lrwtool

lvidTest:	$(INCLS) lvidTest.o descrLib.o Makefile
	$(CXX) $(TSTFLAGS) -o lvidTest descrLib.o lvidTest.o -lrwtool

PlvidTest:	$(INCLS) lvidTest.o descrLib.o Makefile
	purify -collector=$(LOADER) \
	 $(CXX) $(TSTFLAGS) -o PlvidTest descrLib.o lvidTest.o -lrwtool

CHECK_UTIL = ../../tools/findsym.pl

check:	$(INCLS) $(DESCRSOURCES) $(TEST_SOURCE) Makefile
	$(CHECK_UTIL) $?

