#
# Mach Operating System
# Copyright (c) 1993,1992 Carnegie Mellon University
# All Rights Reserved.
# 
# Permission to use, copy, modify and distribute this software and its
# documentation is hereby granted, provided that both the copyright
# notice and this permission notice appear in all copies of the
# software, derivative works or modified versions, and any portions
# thereof, and that both notices appear in supporting documentation.
# 
# CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS"
# CONDITION.  CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR
# ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE.
# 
# Carnegie Mellon requests users of this software to return to
# 
#  Software Distribution Coordinator  or  Software.Distribution@CS.CMU.EDU
#  School of Computer Science
#  Carnegie Mellon University
#  Pittsburgh PA 15213-3890
# 
# any improvements or extensions that they make and grant Carnegie Mellon
# the rights to redistribute these changes.
#  
#
# HISTORY
# $Log:	Makefile,v $
# Revision 2.8  93/04/19  00:01:54  mrt
# 	Corrected the name of the mach_vers_test man page.
# 	[93/04/19            mrt]
# 
# Revision 2.7  93/04/14  11:46:47  mrt
# 	Updated for ODE make
# 	[92/12/07            mrt]
# 
# Revision 2.2  92/01/22  23:17:27  rpd
# 	Created.
# 	[92/01/17            rpd]
# 

# This is a pared-down version of CMU's libcs.a and libsys.a
# It includes only those functions required by Mach software.


# find machine-dependent files in machine subdirectory

VPATH 		= ${target_cpu}

DEPENDENCIES 	=
LIBRARIES 	= libcmucs.a
EXPLIB_TARGETS	= export_libcmucs.a
EXPDIR		= /lib/


# functions in section 2 (CMU-CS system calls)
FUNCTIONS2 	= table machverstest

# functions in section 3 (CMU-CS libc additions)
FUNCTIONS3 	= atoh getname openp searchp quit

ILIST		= libcmucs.a ${FUNCTIONS3:S/$/.3/g} \
		   ${FUNCTIONS3:S/$/.0/g} \
		   table.0 table.2 \
		   mach_vers_test.0 mach_vers_test.2 \
		   mk_major_vers.0 mk_major_vers.3
libcmucs.a_IDIR	= /lib/

IDIR		= /man/man3/
table.0_IDIR	= /man/cat2/
table.2_IDIR	= /man/man2/
mach_vers_test.0_IDIR	= /man/cat2/
mach_vers_test.2_IDIR	= /man/man2/
atoh.0_IDIR	= /man/cat3/
getname.0_IDIR	= /man/cat3/
openp.0_IDIR	= /man/cat3/
fopen.0_IDIR	= /man/cat3/
searchp.0_IDIR	= /man/cat3/
quit.0_IDIR	= /man/cat3/
mk_major_vers.0_IDIR	= /man/cat3/


MANSECTION	= 3
MANPAGES 	= ${FUNCTIONS3} mk_major_vers

OFILES 		= ${FUNCTIONS2:S/$/.o/g} ${FUNCTIONS3:S/$/.o/g} \
		   mkmajorvers.o 

.include <${RULES_MK}>

# additional rules for non-standard man pages

_MANPAGES_	+= table.2 table.0 fopenp.3 mach_vers_test.0 mach_vers_test.2

.SUFFIXES:	.2
.man.2:
	${SED} -e '/^\.\\"/d'\
	${.IMPSRC} > ${.TARGET}.X
	${MV} -f ${.TARGET}.X ${.TARGET}

fopenp.3 : openp.3
	${RM} ${_RMFLAGS_} ${.TARGET}
	${LN} -s openp.3 ${.TARGET}


