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

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
INSTMODESU = 04775
INSTOWNSU = root
INSTDIR =	$(TET_EXECUTE)/tset/ANSI.os/streamio/printf

# 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 =	printf.c printf1.c printf2.c
OFILES0 =	printf.o printf1.o printf2.o

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

CFILESSU = printf_su.c
OFILESSU = printf_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.printf printf_t68

all_xnfs:	T.printf printf_t68 printf_su

printf:		T.printf

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

printf_t68: $(OFILES68)
	$(CC) -o $@ $(OFILES68) $(TCMCHILD) $(LIBS) $(SYSLIBS) $(LDFLAGS) 

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

printf_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.printf $(INSTDIR)/printf_t68

INSTALL_xnfs:	$(INSTDIR)/T.printf $(INSTDIR)/printf_t68 $(INSTDIR)/printf_su

$(INSTDIR)/T.printf:	T.printf
		$(CHMOG) $(INSTMODE) $(INSTOWN) $(INSTGRP) -m $? \
			$(INSTDIR)/T.fprintf $(INSTDIR)/T.printf \
			$(INSTDIR)/T.sprintf $(INSTDIR)/T.snprintf
		@echo " $? installed in $@"

$(INSTDIR)/printf_t68: printf_t68
	$(CHMOG) $(INSTMODESU) $(INSTOWNSU) $(INSTGRP) -m $? $(INSTDIR)/printf_t68
	@echo " $? installed in $@"

$(INSTDIR)/printf_su: printf_su
	$(CHMOG) $(INSTMODESU) $(INSTOWNSU) $(INSTGRP) -m $? $@ \
		$(INSTDIR)/printf_su
	@echo " $? installed in $@"

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.printf $(INSTDIR)/T.printf $(INSTDIR)/T.fprintf \
			$(INSTDIR)/T.sprintf $(INSTDIR)/T.snprintf
		$(RM) printf_t68 $(INSTDIR)/printf_t68

CLOBBER_xnfs:	CLEAN_xnfs
		$(RM) T.printf $(INSTDIR)/T.printf $(INSTDIR)/T.fprintf \
			$(INSTDIR)/T.sprintf $(INSTDIR)/T.snprintf
		$(RM) printf_t68 $(INSTDIR)/printf_t68
		$(RM) printf_su $(INSTDIR)/printf_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
printf.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  \
	./printf_h.h 
printf1.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 
printf2.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  \
	./printf_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 
printf_su.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/stdio.h  \
	../../../../SRC/SYSINC/stdlib.h  \
	../../../../SRC/SYSINC/sys/stat.h  \
	../../../../SRC/SYSINC/sys/types.h  \
	../../../../SRC/SYSINC/unistd.h  \
	./local.h  \
	./printf_h.h 
# DEPENDENCIES MUST END AT END OF FILE
# IF YOU PUT STUFF HERE IT WILL GO AWAY
# see make depend above
