##########################################################################
# (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.
#
#	SCCS:	@(#)ANSI.os/streamio/vprintf/Makefile	Rel 4.4.1 (06/09/97)
#
#	PROJECT:	VSX
#	PRODUCT:	ANSI.os/streamio/vprintf
#	AUTHOR:		Alex Flynn, UniSoft Ltd.
#	DATE CREATED:	Thu Nov 13 16:33:13 WET 1986
#	TARGETS:	T.vprintf
##########################################################################

CC =	cc
RM =		rm -f
LINT =	lint
LINT1 =		/usr/lib/lint1
# This is a working lint in the top level testset directory
PRINTER =	lpr
PRINTFLAGS =	
TET_EXECUTE =	../../../../TESTROOT

TET_ROOT =	../../../../..
VSXDIR =	../../../../SRC

VSXINC =	$(VSXDIR)/INC
VSXLIB =	$(VSXDIR)/LIB
VSXBIN =	$(VSXDIR)/BIN
LIBVPORT =	$(VSXLIB)/vport.a
CHMOG =		$(VSXBIN)/chmog
GENLIB =	$(VSXLIB)/genlib.a
TSETLIB =	$(VSXLIB)/tsetlib.a

SYSINC =	$(VSXDIR)/SYSINC
SYSLIBS =

# What is installed:

INSTOWN =	vsx0
INSTGRP =	vsxg0
INSTMODE =	755
INSTOWNSU =	root
INSTMODESU =	04775

INSTDIR =	$(TET_EXECUTE)/tset/ANSI.os/streamio/vprintf

# Local (to this product only) includes, libraries, etc:

LOCALINC =
LOCALLIB =	

# product-wide libraries for ld(1):

LIBS =			$(TSETLIB) $(XNFSLIB) $(GENLIB) \
			$(VSXLIB)/vlib.a $(LIBVPORT) $(APILIB)

DBUG =	
COPTS =	
SDBFLAG =	
DEFINES =	

# INCS, as seen from obj directory
INCS =		-I$(TETINC) -I. -I$(VSXINC) -I$(SYSINC)
CFLOCAL =
CFLAGS =	$(CFLOCAL) $(INCS) $(DEFINES) $(DBUG) $(COPTS) $(SDBFLAG)
LDFLAGS =	

CFILES0 =	vprintf.c vprintf1.c vprintf2.c
OFILES0 =	vprintf.o vprintf1.o vprintf2.o

CFILES68 =	../putc/enospc.c
OFILES68 =	enospc.o

CFILESSU =	vprintf_su.c
OFILESSU =	vprintf_su.o

CFILES =	$(CFILES0) $(CFILES68)
OFILES =	$(OFILES0) $(OFILES68)

CFILES_xnfs =	$(CFILES0) $(CFILES68) $(CFILESSU)
OFILES_xnfs =	$(OFILES0) $(OFILES68) $(OFILESSU)

IFILES =	
LFILES =	

LINTFLAGS =	$(INCS) $(DEFINES) -n
LINTLIBS =	$(LXNFS) -lvsx -lvlib -lgen -ltset -lvport 
LINTDRV =	$(VSXDIR)/common/tet_startup/startup.c

# Targets: ---------------------------------------------------------

all:		T.vprintf vprintf_t68

all_xnfs:	T.vprintf vprintf_t68 vprintf_su

vprintf:	T.vprintf

T.vprintf:	$(OFILES0) $(TCM) $(VSXLIB)/startup.o $(LIBS)
		$(CC) -o $@ $(OFILES0) $(TCM) $(VSXLIB)/startup.o $(LIBS) $(SYSLIBS) $(LDFLAGS) 
		@echo "	$@ made"

vprintf_t68: $(OFILES68)
	$(CC) -o $@ $(OFILES68) $(TCMCHILD) $(LIBS) $(SYSLIBS) $(LDFLAGS) 
	@echo "	$@ made"

$(OFILES68): $(CFILES68)
	$(CC) -c $(CFLAGS) $(CFILES68)

vprintf_su: $(OFILESSU)
	$(CC) -o $@ $(OFILESSU) $(TCMCHILD) $(LIBS) $(SYSLIBS) $(LDFLAGS)
	@echo "	$@ made"

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

INSTALL:		$(INSTDIR)/T.vprintf $(INSTDIR)/vprintf_t68

INSTALL_xnfs:		$(INSTDIR)/T.vprintf $(INSTDIR)/vprintf_t68 \
			$(INSTDIR)/vprintf_su

$(INSTDIR)/T.vprintf:	T.vprintf
		$(CHMOG) $(INSTMODE) $(INSTOWN) $(INSTGRP) -m $? \
			$(INSTDIR)/T.vfprintf $(INSTDIR)/T.vprintf \
			$(INSTDIR)/T.vsprintf $(INSTDIR)/T.vsnprintf
		@echo " $? installed in $@"

$(INSTDIR)/vprintf_t68:	vprintf_t68
	$(CHMOG) $(INSTMODESU) $(INSTOWNSU) $(INSTGRP) -m $? \
			$(INSTDIR)/vprintf_t68

$(INSTDIR)/vprintf_su:	vprintf_su
	$(CHMOG) $(INSTMODESU) $(INSTOWNSU) $(INSTGRP) -m $? \
			$(INSTDIR)/vprintf_su

LINT:		LINT0 LINT68

LINT_xnfs:	LINT0 LINT68 LINTSU

LINT0:
		$(LINT) $(LINTFLAGS) $(CFILES0) $(LINTDRV) $(LTCM) $(LINTLIBS)
LINT68:
		$(LINT) $(LINTFLAGS) $(CFILES68) $(LTCMC) $(LINTLIBS)
LINTSU:
		$(LINT) $(LINTFLAGS) $(CFILESSU) $(LTCMC) $(LINTLIBS)

FORCE:		CLOBBER all

FORCE_xnfs:		CLOBBER_xnfs all_xnfs

PRINT:
		@$(PRINTER) $(PRINTFLAGS) Makefile $(IFILES) $(CFILES)

PRINT_xnfs:
		@$(PRINTER) $(PRINTFLAGS) Makefile $(IFILES) $(CFILES_xnfs)

CLEAN:
		$(RM) $(OFILES)

CLEAN_xnfs:
		$(RM) $(OFILES_xnfs)

CLOBBER:	CLEAN
		$(RM) T.vprintf $(INSTDIR)/T.vprintf $(INSTDIR)/T.vfprintf \
			$(INSTDIR)/T.vsprintf $(INSTDIR)/T.vsnprintf
		$(RM) vprintf_t68 $(INSTDIR)/vprintf_t68

CLOBBER_xnfs:	CLEAN_xnfs
		$(RM) T.vprintf $(INSTDIR)/T.vprintf $(INSTDIR)/T.vfprintf \
			$(INSTDIR)/T.vsprintf $(INSTDIR)/T.vsnprintf
		$(RM) vprintf_t68 $(INSTDIR)/vprintf_t68
		$(RM) vprintf_su $(INSTDIR)/vprintf_su

depend:
	CFLAGS="$(CFLAGS)" CC="$(CC)" $(VSXBIN)/mkdep $(CFILES)

# DO NOT DELETE THIS LINE -- make depend uses it
# DEPENDENCIES MUST END AT END OF FILE
vprintf.o:	../../../../SRC/INC/dbug.h  \
	../../../../SRC/INC/exitcodes.h  \
	../../../../SRC/INC/report.h  \
	../../../../SRC/INC/std.h  \
	../../../../SRC/INC/sysdep.h  \
	../../../../SRC/INC/xnfs.h  \
	../../../../SRC/SYSINC/errno.h  \
	../../../../SRC/SYSINC/fcntl.h  \
	../../../../SRC/SYSINC/locale.h  \
	../../../../SRC/SYSINC/stdio.h  \
	../../../../SRC/SYSINC/stdlib.h  \
	../../../../SRC/SYSINC/string.h  \
	../../../../SRC/SYSINC/sys/stat.h  \
	../../../../SRC/SYSINC/sys/types.h  \
	../../../../SRC/SYSINC/unistd.h  \
	./local.h  \
	./vprintf_h.h 
vprintf1.o:	../../../../SRC/INC/dbug.h  \
	../../../../SRC/INC/exitcodes.h  \
	../../../../SRC/INC/report.h  \
	../../../../SRC/INC/std.h  \
	../../../../SRC/INC/sysdep.h  \
	../../../../SRC/INC/xnfs.h  \
	../../../../SRC/SYSINC/ctype.h  \
	../../../../SRC/SYSINC/errno.h  \
	../../../../SRC/SYSINC/stdio.h  \
	../../../../SRC/SYSINC/stdlib.h  \
	../../../../SRC/SYSINC/string.h  \
	../../../../SRC/SYSINC/sys/types.h  \
	../../../../SRC/SYSINC/unistd.h  \
	./local.h  \
	./vprintf_h.h 
vprintf2.o:	../../../../SRC/INC/chktimes.h  \
	../../../../SRC/INC/dbug.h  \
	../../../../SRC/INC/exitcodes.h  \
	../../../../SRC/INC/nlsinfo.h  \
	../../../../SRC/INC/nlstest.h  \
	../../../../SRC/INC/report.h  \
	../../../../SRC/INC/std.h  \
	../../../../SRC/INC/sysdep.h  \
	../../../../SRC/INC/xnfs.h  \
	../../../../SRC/SYSINC/errno.h  \
	../../../../SRC/SYSINC/locale.h  \
	../../../../SRC/SYSINC/stdio.h  \
	../../../../SRC/SYSINC/stdlib.h  \
	../../../../SRC/SYSINC/string.h  \
	../../../../SRC/SYSINC/sys/types.h  \
	../../../../SRC/SYSINC/unistd.h  \
	./local.h  \
	./vprintf_h.h 
enospc.o:	../../../../SRC/INC/dbug.h  \
	../../../../SRC/INC/report.h  \
	../../../../SRC/INC/std.h  \
	../../../../SRC/INC/sysdep.h  \
	../../../../SRC/INC/xnfs.h  \
	../../../../SRC/SYSINC/errno.h  \
	../../../../SRC/SYSINC/fcntl.h  \
	../../../../SRC/SYSINC/stdio.h  \
	../../../../SRC/SYSINC/stdlib.h  \
	../../../../SRC/SYSINC/string.h  \
	../../../../SRC/SYSINC/sys/stat.h  \
	../../../../SRC/SYSINC/sys/types.h  \
	../../../../SRC/SYSINC/unistd.h 
# DEPENDENCIES MUST END AT END OF FILE
# IF YOU PUT STUFF HERE IT WILL GO AWAY
# see make depend above
