# 
#       SCCS:  @(#)  Makefile Rel 1.4	    (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
#
# Note:
# If you get prototype errors because you are running VSW on an XPG4
# system, then try adding -DTEST_XPG=4 to the CFLAGS line in the
# tetbuild.cfg

WMCFILES = wmake.c
WMOFILES = wmake.o

all:	wmake

wmake:	$(WMOFILES) $(APILIB) $(TCM)
		$(CC) -o $@ $(WMOFILES) $(TCM) $(APILIB) $(LDFLAGS)
		@echo "	$@ made"

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

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

clean:
		$(RM) $(WMOFILES)

install:  wmake
	$(RM) $(XTESTBIN)/wbuild
	$(RM)	$(XTESTBIN)/wbuild.exec
	$(RM) $(XTESTBIN)/wclean
	$(RM)	$(XTESTBIN)/wclean.exec
	$(CP)	wmake $(XTESTBIN)/wbuild.exec
	$(LN) $(XTESTBIN)/wbuild.exec $(XTESTBIN)/wclean.exec
	$(CP) wbuild.sh $(XTESTBIN)/wbuild
	chmod 755 $(XTESTBIN)/wbuild
	$(CP) wclean.sh $(XTESTBIN)/wclean
	chmod 755 $(XTESTBIN)/wclean

clobber:	clean
	$(RM) wmake
	$(RM) $(XTESTBIN)/wbuild $(XTESTBIN)/wclean
	$(RM) $(XTESTBIN)/wbuild.exec $(XTESTBIN)/wclean.exec
