##########################################################################
# (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:	@(#)POSIX.os/dataform/tar/Makefile	Rel 4.4.1 (06/09/97)
#	PROJECT:	VSX
#	PRODUCT:	POSIX.os/dataform/tar
#	AUTHOR:		Dave Cater, UniSoft Ltd.
#	DATE CREATED:	Tue Jun  6 16:20:26 BST 1989
#	TARGETS:	T.tar
#			tar_su
#			tar_uids
##########################################################################

CC =	cc
RM =		rm -f
LINT =	lint
LINT1 =		/usr/lib/lint1
PRINTER =	lpr
PRINTFLAGS =	
TET_ROOT =	../../../../..
VSXDIR =	../../../../SRC
SYSINC =	$(VSXDIR)/SYSINC
SYSLIBS =	
LIBVPORT =	$(VSXLIB)/vport.a
TET_EXECUTE =	../../../../TESTROOT

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

# What is installed:

INSTOWN1 =	vsx0
INSTOWN2 =	root
INSTGRP1 =	vsxg0
INSTMODE1 =	755
INSTMODE2 =	4755
INSTDIR =	$(TET_EXECUTE)/tset/POSIX.os/dataform/tar

# product-wide libraries for ld(1):

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

LIBSUB =	$(TSETLIB) \
		$(VSXLIB)/vlib.a $(LIBVPORT)

DBUG =	
COPTS =	
SDBFLAG =	
DEFINES =	

INCS =		-I$(TETINC) -I$(VSXINC) -I$(SYSINC)
CFLOCAL =
CFLAGS =	$(CFLOCAL) $(INCS) $(DEFINES) $(DBUG) $(COPTS) $(SDBFLAG)
LDFLAGS =	

K_CFILES =	tar.c tar1.c tar2.c tar3.c tar4.c
K_OFILES =	tar.o tar1.o tar2.o tar3.o tar4.o

K_CFILESUBSU =	tar_su.c
K_OFILESUBSU =	tar_su.o

K_CFILESUBSN =	tar_uids.c tar4.c
K_OFILESUBSN =	tar_uids.o tar4.o

K_CFILESUBSG =	tar_gid.c
K_OFILESUBSG =	tar_gid.o

CFILES =	$(K_CFILES) $(K_CFILESUBSU) $(K_CFILESUBSN) $(K_CFILESUBSG)

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

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

all_xnfs:	all tar_gid

all:		T.tar tar_su tar_uids

tar:		T.tar tar_su tar_uids

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

tar_su:	$(K_OFILESUBSU) $(TCMCHILD) $(LIBS)
		$(CC) -o $@ $(K_OFILESUBSU) $(TCMCHILD) $(LIBS) $(SYSLIBS) $(LDFLAGS)
		@echo "	$@ made"

tar_uids:	$(K_OFILESUBSN) $(TCMCHILD) $(LIBS)
		$(CC) -o $@ $(K_OFILESUBSN) $(TCMCHILD) $(LIBS) $(SYSLIBS) $(LDFLAGS)
		@echo "	$@ made"

tar_gid:	$(K_OFILESUBSG) $(TCMCHILD) $(LIBS)
		$(CC) -o $@ $(K_OFILESUBSG) $(TCMCHILD) $(LIBS) $(SYSLIBS) $(LDFLAGS)
		@echo "	$@ made"

INSTALL_xnfs:	INSTALL $(INSTDIR)/tar_gid


INSTALL:	$(INSTDIR)/T.tar $(INSTDIR)/tar_su $(INSTDIR)/tar_uids

$(INSTDIR)/T.tar:	T.tar
		$(CHMOG) $(INSTMODE1) $(INSTOWN1) $(INSTGRP1) -m $? $@

$(INSTDIR)/tar_su:	tar_su
		$(CHMOG) $(INSTMODE2) $(INSTOWN2) $(INSTGRP1) -m $? $@

$(INSTDIR)/tar_uids:	tar_uids
		$(CHMOG) $(INSTMODE1) $(INSTOWN1) $(INSTGRP1) -m $? $@

$(INSTDIR)/tar_gid:	tar_gid
		$(CHMOG) $(INSTMODE2) $(INSTOWN2) $(INSTGRP1) -m $? $@

LINT_xnfs:
		$(LINT) $(LINTFLAGS) $(K_CFILES) $(LINTDRV) $(LTCM) $(LINTLIBS)
		$(LINT) $(LINTFLAGS) $(K_CFILESUBSU) $(LTCMC) $(LINTLIBS)
		$(LINT) $(LINTFLAGS) $(K_CFILESUBSN) $(LTCMC) $(LINTLIBS)
		$(LINT) $(LINTFLAGS) $(K_CFILESUBSG) $(LTCMC) $(LINTLIBS)

LINT:
		$(LINT) $(LINTFLAGS) $(K_CFILES) $(LINTDRV) $(LTCM) $(LINTLIBS)
		$(LINT) $(LINTFLAGS) $(K_CFILESUBSU) $(LTCMC) $(LINTLIBS)
		$(LINT) $(LINTFLAGS) $(K_CFILESUBSN) $(LTCMC) $(LINTLIBS)

FORCE_xnfs:		CLOBBER_xnfs  all_xnfs

FORCE:		CLOBBER all

PRINT:
		@$(PRINTER) $(PRINTFLAGS) Makefile \
			$(K_CFILES) $(LIB_CFILES) \
			$(K_CFILESUBSU) \
			$(K_CFILESUBSN) \
			$(K_CFILESUBSG)

CLEAN_xnfs:
		$(RM) $(K_OFILES) $(K_OFILESUBSU) $(K_OFILESUBSN) \
						$(K_OFILESUBSG)

CLEAN:
		$(RM) $(K_OFILES) $(K_OFILESUBSU) $(K_OFILESUBSN)

CLOBBER_xnfs:	CLEAN_xnfs
		$(RM) T.tar tar_su tar_uids \
			$(INSTDIR)/T.tar \
			$(INSTDIR)/tar_su \
			$(INSTDIR)/tar_uids \
			$(INSTDIR)/tar_gid

CLOBBER:	CLEAN
		$(RM) T.tar tar_su tar_uids \
			$(INSTDIR)/T.tar \
			$(INSTDIR)/tar_su \
			$(INSTDIR)/tar_uids

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

# DO NOT DELETE THIS LINE -- make depend uses it
# DEPENDENCIES MUST END AT END OF FILE
tar.o:	../../../../SRC/INC/dbug.h  \
	../../../../SRC/INC/pathres.h  \
	../../../../SRC/INC/report.h  \
	../../../../SRC/INC/std.h  \
	../../../../SRC/INC/sysdep.h  \
	../../../../SRC/INC/xnfs.h  \
	../../../../SRC/SYSINC/errno.h  \
	../../../../SRC/SYSINC/stdlib.h  \
	../../../../SRC/SYSINC/string.h  \
	../../../../SRC/SYSINC/sys/stat.h  \
	../../../../SRC/SYSINC/sys/types.h  \
	../../../../SRC/SYSINC/tar.h  \
	../../../../SRC/SYSINC/unistd.h  \
	./tartest.h 
tar1.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/fcntl.h  \
	../../../../SRC/SYSINC/grp.h  \
	../../../../SRC/SYSINC/limits.h  \
	../../../../SRC/SYSINC/pwd.h  \
	../../../../SRC/SYSINC/stdlib.h  \
	../../../../SRC/SYSINC/string.h  \
	../../../../SRC/SYSINC/sys/stat.h  \
	../../../../SRC/SYSINC/sys/types.h  \
	../../../../SRC/SYSINC/tar.h  \
	../../../../SRC/SYSINC/unistd.h  \
	./tartest.h 
tar2.o:	../../../../SRC/INC/dbug.h  \
	../../../../SRC/INC/pathres.h  \
	../../../../SRC/INC/report.h  \
	../../../../SRC/INC/setprv.h  \
	../../../../SRC/INC/std.h  \
	../../../../SRC/INC/sysdep.h  \
	../../../../SRC/INC/xnfs.h  \
	../../../../SRC/SYSINC/ctype.h  \
	../../../../SRC/SYSINC/errno.h  \
	../../../../SRC/SYSINC/fcntl.h  \
	../../../../SRC/SYSINC/pwd.h  \
	../../../../SRC/SYSINC/stdlib.h  \
	../../../../SRC/SYSINC/string.h  \
	../../../../SRC/SYSINC/sys/stat.h  \
	../../../../SRC/SYSINC/sys/types.h  \
	../../../../SRC/SYSINC/tar.h  \
	../../../../SRC/SYSINC/unistd.h  \
	./tartest.h 
tar3.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/grp.h  \
	../../../../SRC/SYSINC/limits.h  \
	../../../../SRC/SYSINC/pwd.h  \
	../../../../SRC/SYSINC/stdlib.h  \
	../../../../SRC/SYSINC/string.h  \
	../../../../SRC/SYSINC/sys/stat.h  \
	../../../../SRC/SYSINC/sys/types.h  \
	../../../../SRC/SYSINC/tar.h  \
	../../../../SRC/SYSINC/unistd.h  \
	./tartest.h 
tar4.o:	../../../../SRC/INC/dbug.h  \
	../../../../SRC/INC/exitcodes.h  \
	../../../../SRC/INC/report.h  \
	../../../../SRC/INC/std.h  \
	../../../../SRC/INC/sysdep.h  \
	../../../../SRC/INC/timeout.h  \
	../../../../SRC/INC/xnfs.h  \
	../../../../SRC/SYSINC/ctype.h  \
	../../../../SRC/SYSINC/errno.h  \
	../../../../SRC/SYSINC/fcntl.h  \
	../../../../SRC/SYSINC/grp.h  \
	../../../../SRC/SYSINC/limits.h  \
	../../../../SRC/SYSINC/pwd.h  \
	../../../../SRC/SYSINC/setjmp.h  \
	../../../../SRC/SYSINC/signal.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/sys/wait.h  \
	../../../../SRC/SYSINC/tar.h  \
	../../../../SRC/SYSINC/time.h  \
	../../../../SRC/SYSINC/unistd.h  \
	./tartest.h 
tar_su.o:	../../../../SRC/INC/dbug.h  \
	../../../../SRC/INC/report.h  \
	../../../../SRC/INC/setprv.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/types.h  \
	../../../../SRC/SYSINC/tar.h  \
	../../../../SRC/SYSINC/unistd.h  \
	./tartest.h 
tar_uids.o:	../../../../SRC/INC/dbug.h  \
	../../../../SRC/INC/exitcodes.h  \
	../../../../SRC/INC/report.h  \
	../../../../SRC/INC/setprv.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/string.h  \
	../../../../SRC/SYSINC/sys/stat.h  \
	../../../../SRC/SYSINC/sys/types.h  \
	../../../../SRC/SYSINC/tar.h  \
	../../../../SRC/SYSINC/unistd.h  \
	./tartest.h 
tar4.o:	../../../../SRC/INC/dbug.h  \
	../../../../SRC/INC/exitcodes.h  \
	../../../../SRC/INC/report.h  \
	../../../../SRC/INC/std.h  \
	../../../../SRC/INC/sysdep.h  \
	../../../../SRC/INC/timeout.h  \
	../../../../SRC/INC/xnfs.h  \
	../../../../SRC/SYSINC/ctype.h  \
	../../../../SRC/SYSINC/errno.h  \
	../../../../SRC/SYSINC/fcntl.h  \
	../../../../SRC/SYSINC/grp.h  \
	../../../../SRC/SYSINC/limits.h  \
	../../../../SRC/SYSINC/pwd.h  \
	../../../../SRC/SYSINC/setjmp.h  \
	../../../../SRC/SYSINC/signal.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/sys/wait.h  \
	../../../../SRC/SYSINC/tar.h  \
	../../../../SRC/SYSINC/time.h  \
	../../../../SRC/SYSINC/unistd.h  \
	./tartest.h 
tar_gid.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/stdlib.h  \
	../../../../SRC/SYSINC/sys/stat.h  \
	../../../../SRC/SYSINC/sys/types.h  \
	../../../../SRC/SYSINC/unistd.h  \
	./tartest.h 
# DEPENDENCIES MUST END AT END OF FILE
# IF YOU PUT STUFF HERE IT WILL GO AWAY
# see make depend above
