# 
#       SCCS:  @(#)  Makefile Rel 1.3	    (2/6/92)
# 
# 	UniSoft Ltd., London, England
# 
#  (C) Copyright 1991 X/Open Company Limited
# 
#  All rights reserved.  No part of this source code may be reproduced,
#  stored in a retrieval system, or transmitted, in any form or by any
#  means, electronic, mechanical, photocopying, recording or otherwise,
#  except as stated in the end-user licence agreement, without the prior
#  permission of the copyright owners.
# 
#  X/Open and the 'X' symbol are trademarks of X/Open Company Limited in
#  the UK and other countries.
# 
# Author: Stuart Boutell, UniSoft Ltd, 05/02/1992
#


# Debugging object/source
DBUGCFILES = dbug.c
DBUGOFILES = dbug.o

# Library functions borrowed from VSX
VSXCFILES = pname.c vsignal.c input.c error.c newstr.c
VSXOFILES = pname.o vsignal.o input.o error.o newstr.o

# Reporter source
VRCFILES =	wrpt.c $(DBUGCFILES) $(VSXCFILES)
VROFILES =	wrpt.o $(DBUGOFILES) $(VSXOFILES)

# Pagination source.
PACFILES =	wrpt.page.c $(DBUGCFILES)
PAOFILES =	wrpt.page.o $(DBUGOFILES)

all:	wrpt wrpt.page wrptm

wrpt:		$(VROFILES) $(APILIB)
		$(CC) -o $@ $(VROFILES) $(APILIB) $(LDFLAGS)
		@echo "	$@ made"

wrpt.page:	$(PAOFILES) dbug.o
		$(CC) -o $@ $(PAOFILES) $(LDFLAGS)
		@echo "	$@ made"

$(APILIB):
	-@echo "Warning: cannot continue making: $@ needs to be installed"
		@false


clean:
		$(RM) $(VROFILES) $(PAOFILES) wrptm

install: wrpt wrpt.page wrptsum.awk wrptdet.awk wrptm
	$(RM) $(XTESTBIN)/wrptm
	$(RM) $(XTESTBIN)/wrpt
	$(RM) $(XTESTBIN)/wrptsum.awk
	$(RM) $(XTESTBIN)/wrptdet.awk
	$(RM) $(XTESTBIN)/wrptm.awk1
	$(RM) $(XTESTBIN)/wrptm.awk2
	$(RM) $(XTESTBIN)/wrpt.page
	$(CP) wrpt $(XTESTBIN)/wrpt
	$(CP) wrptsum.awk $(XTESTBIN)/wrptsum.awk
	$(CP) wrptdet.awk $(XTESTBIN)/wrptdet.awk
	$(CP) wrpt.page $(XTESTBIN)/wrpt.page
	$(CP) wrptm $(XTESTBIN)/wrptm
	$(CP) wrptm.awk1 $(XTESTBIN)/wrptm.awk1
	$(CP) wrptm.awk2 $(XTESTBIN)/wrptm.awk2

clobber:	clean
		$(RM) Makefile.bak wrpt wrpt.page

