# 
# 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 
# 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 the
# rights to redistribute these changes.
#
# 
# HISTORY
# $Log:	Makefile,v $
# Revision 2.8  93/04/14  11:42:43  mrt
# 	Changed for ODE make.
# 	[92/08/24            mrt]
# 

# 
#  Explicity loads mach_msg and mach_traps so as not to use libmach.a
#  Mach3 needs to run under both Mach 3.0 and Mach 2.5 and the versions
#  of mach_init in libmach are incompatible


DEPENDENCIES	=
PROGRAMS	= mach3
MANPAGES	= mach3
MANSECTION	= 1

ILIST		= ${PROGRAMS} ${MANPAGES:=.0} ${MANPAGES:=.1}
IDIR		= /bin/
mach3.0_IDIR	= /man/cat1/
mach3.1_IDIR	= /man/man1/


# Find libmach.a from LIBDIRS, so that we can extract from it.  mach3
# links directly with mach_msg.o and mach_msg_trap.o, instead of with
# libmach.a, because we don't want mach_init() to be called.  This is
# because mach3 must execute under both Mach 3.0 and Mach 2.5.

VPATH		+= ${LIBDIRS:S/-L//g}

mach_msg.o mach_msg_trap.o : libmach.a
	ar x ${libmach.a:P} ${.TARGET}

OFILES		= mach3.o mach_msg_trap.o mach_msg.o


.include <${RULES_MK}>

