##########################################################################
# (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:	@(#)XOPEN.os/procenv/chroot/Makefile	Rel 4.4.1 (06/09/97)
#
#	PROJECT:	VSX
#	PRODUCT:	XOPEN.os/procenv/chroot
#	AUTHOR:		Mike Rendell, UniSoft Ltd.
#	DATE CREATED:	Tue Aug  5 16:58:02 PDT 1986
#	TARGETS: 	T.chroot - testset
##########################################################################

CC =	cc
RM =		rm -f
LINT =	lint
LINT1 =		/usr/lib/lint1
PRINTER =	lpr
PRINTFLAGS =	
TET_EXECUTE =	../../../../TESTROOT

TET_ROOT =	../../../../..
VSXDIR =	../../../../SRC
SYSINC =	$(VSXDIR)/SYSINC
SYSLIBS =	
LIBVPORT =	$(VSXLIB)/vport.a

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
INSTGRP =	vsxg0
INSTMODE1 =	755
INSTMODE2 =	4755
INSTDIR =	$(TET_EXECUTE)/tset/LSB.os/procenv/chroot

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

LOCALINC =	
LOCALLIB =	

# product-wide libraries for ld(1):

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

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

CFILES0 =	chroot.c
OFILES0 =	chroot.o

CFILES4 =	chroot_t4.c
OFILES4 =	chroot_t4.o

CFILES =	$(CFILES0) $(CFILES4)
OFILES =	$(OFILES0) $(OFILES4)

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

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

all:		T.chroot chroot_t4

all_xnfs:	all

chroot:		T.chroot chroot_t4

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

chroot_t4:	$(OFILES4) $(LIBS)
		$(CC) -o $@ $(OFILES4) $(LIBS) $(SYSLIBS) $(LDFLAGS)
		@echo "	$@ made"

INSTALL:	$(INSTDIR)/T.chroot $(INSTDIR)/chroot_t4

INSTALL_xnfs:	INSTALL

$(INSTDIR)/T.chroot:	T.chroot
		$(CHMOG) $(INSTMODE2) $(INSTOWN2) $(INSTGRP) -m $? $@
		@echo " $? installed in $@"

$(INSTDIR)/chroot_t4:	chroot_t4
		$(CHMOG) $(INSTMODE1) $(INSTOWN1) $(INSTGRP) -m $? $@

LINT:		LINT0 LINT4

LINT0:
		$(LINT) $(LINTFLAGS) $(CFILES0) $(LINTDRV) $(LTCM) $(LINTLIBS)

LINT4:
		$(LINT) $(LINTFLAGS) $(CFILES4) $(LINTLIBS)

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

LINT_xnfs:	LINT

FORCE:		CLOBBER all

FORCE_xnfs:	CLOBBER_xnfs all_xnfs

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

CLEAN:
		$(RM) $(OFILES)

CLEAN_xnfs:	CLEAN

CLOBBER:	CLEAN
		$(RM) T.chroot chroot_t4 $(INSTDIR)/T.chroot \
			$(INSTDIR)/chroot_t4

CLOBBER_xnfs:	CLOBBER

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

# DO NOT DELETE THIS LINE -- make depend uses it
# DEPENDENCIES MUST END AT END OF FILE
chroot.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/timeout.h  \
	../../../../SRC/INC/xnfs.h  \
	../../../../SRC/SYSINC/errno.h  \
	../../../../SRC/SYSINC/limits.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/unistd.h  \
	./chroot_h.h 
chroot_t4.o:	../../../../SRC/INC/dbug.h  \
	../../../../SRC/INC/report.h  \
	../../../../SRC/INC/std.h  \
	../../../../SRC/INC/sysdep.h  \
	../../../../SRC/SYSINC/errno.h  \
	../../../../SRC/SYSINC/stdlib.h  \
	../../../../SRC/SYSINC/sys/stat.h  \
	../../../../SRC/SYSINC/sys/types.h 
# DEPENDENCIES MUST END AT END OF FILE
# IF YOU PUT STUFF HERE IT WILL GO AWAY
# see make depend above
