# 
# Mach Operating System
# Copyright (c) 1991,1990 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  92/03/05  22:49:29  rpd
# 	Changed from Makefile-etc to Makefile-bin.
# 	[92/02/29            rpd]
# 
# Revision 2.7  92/02/16  15:43:08  rpd
# 	Changed libcs to libcmucs.
# 
# Revision 2.6  92/01/22  22:53:14  rpd
# 	Revised for new Makefile organization.
# 	[92/01/17            rpd]
# 

#include ${MAKETOP}Makefile-common

CC = gcc32k

INCDIR = /usr/local/pc532-mach/DIST/include
INCLUDES= -nostdinc -I. -I$(INCDIR) -I/usr/local/pc532-mach/bsdss/server -I/usr/antsu/src/net/include

CFLAGS = $(DEFINES) $(INCLUDES) -O -DDEBUG


BINDIR = etc/
PROGRAM = mach_init

OBJECTS = main.o service.o
LIBRARIES = SERVICE THREADS MACH CMUCS

mach_init: main.o service.o
	$(CC) -o mach_init $(CFLAGS) -L/usr/local/pc532-mach/DIST/lib \
	/usr/local/pc532-mach/DIST/lib/crt0.o \
	$(OBJECTS) -lservice -lthreads -lmach -lcmucs -lc

%.o: %.c
	$(CC) -c $(CFLAGS) -o $@ $<

#include ${MAKETOP}Makefile-bin

# Also provide a rule for test_service,
# but don't build/install it by default.

test_service : test_service.o
	${RM} $@ $@.out
	${DEPS/%/$@} ${CC} -o $@.out ${CFLAGS} test_service.o ${LIBS} && \
	${MV} $@.out $@

#-include Makedep
