# 
# Mach Operating System
# Copyright (c) 1991 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.6  92/04/08  23:19:43  rpd
# 	Added cross-compilation support.
# 	[92/03/18            jvh]
# 
# Revision 2.5  92/03/05  22:46:13  rpd
# 	Changed to use double-colon rules for top-level targets.
# 	[92/02/28            rpd]
# 
# Revision 2.4  92/01/23  15:21:17  rpd
# 	Revised for new Makefile organization.
# 	[92/01/16            rpd]
# 
# Revision 2.3  92/01/03  20:28:24  dbg
# 	Fixed copyright.  Split out machine-dependent code to separate
# 	files.
# 	[91/09/12            dbg]
# 
# Revision 2.2  91/02/26  11:16:58  dbg
# 	Created.
# 	[90/10/01            dbg]
# 

include ${MAKETOP}Makefile-common

# find machine-dependent files in machine subdirectory

VPATH = .:${cpu}

all :: makeboot

install :: ${HOST_INSTALLDIR}/bin/makeboot

release :: ${HOST_TRELEASEDIR}/bin/makeboot

clean ::
	${RM} ${HOST_INSTALLDIR}/bin/makeboot

# installation rules

${HOST_INSTALLDIR}/bin/makeboot : makeboot
	${RM} $@
	${CP} $? $@
	${HOST_STRIP} $@
	${CHMOD_BIN} $@

# release rules

${HOST_TRELEASEDIR}/bin/makeboot : ${HOST_FRELEASEDIR}/bin/makeboot
	${RM} $@
	${CP} $? $@

# build rules

OBJS = build_boot.o exec.o

LIBS =
DEPS = ${DEPCRT0}

makeboot : ${OBJS}
	${RM} $@ $@.out
	${USE_HOST_PATHS} ${DEPS/%/$@} \
	${HOST_CC} -o $@.out ${HOST_CFLAGS} ${OBJS} ${LIBS} && \
	${MV} $@.out $@

.c.o:
	${USE_HOST_PATHS} ${HOST_CC} -c ${HOST_CFLAGS} $*.c

-include Makedep
