#
# Mach Operating System
# Copyright (c) 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.5  92/03/05  22:49:40  rpd
# 	Added Makefile-man.
# 	[92/02/29            rpd]
# 
# Revision 2.4  92/02/16  15:44:17  rpd
# 	Changed name from libcs.a to libcmucs.a.
# 	[92/02/16            rpd]
# 
# Revision 2.3  92/02/16  15:24:49  rpd
# 	Moved from libcs to libcmucs.
# 
# Revision 2.2  92/01/22  23:14:33  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.

include ${MAKETOP}Makefile-common

# find machine-dependent files in machine subdirectory

VPATH = .:${cpu}

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

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

# use Makefile-lib and Makefile-man for most of the rules

LIBRARY = libcmucs.a

OBJECTS = ${FUNCTIONS2/.*/&.o} ${FUNCTIONS3/.*/&.o}

MAN2PAGES = ${FUNCTIONS2}
MAN3PAGES = ${FUNCTIONS3}

include ${MAKETOP}Makefile-lib
include ${MAKETOP}Makefile-man

# additional rules for the fopenp man page

install :: ${INSTALLDIR}/man/man3/fopenp.3

${INSTALLDIR}/man/man3/fopenp.3 : ${INSTALLDIR}/man/man3/openp.3
	${RM} $@
	ln $? $@

release :: ${TRELEASEDIR}/man/man3/fopenp.3

${TRELEASEDIR}/man/man3/fopenp.3 : ${TRELEASEDIR}/man/man3/openp.3
	${RM} $@
	ln $? $@

clean ::
	${RM} ${INSTALLDIR}/man/man3/fopenp.3

-include Makedep
