# /* makefile */
# 			  Makefile for AS
# 		    (c) Copyright 1986 Gould Inc.
# 			All Rights Reserved
#
#	"@(#) (Gould) $Header: Makefile,v 5.5 89/05/12 12:35:07 pcc Rel-3_0 $"
#
#	This Makefile is just a gopher for bin/Makefile, which runs
#	this file, and bin/as/Makefile.m4, which this Makefile
#	runs. This Makefile creates an include file for Makefile.m4 so
#	that it will know which machine-dependent definitions to use.
#	Makefile.m4 does all the real work.
#
DESTDIR		=
BASEDIR		= $(DESTDIR)/usr/src/src/bin/as
INSTDIR		= $(DESTDIR)/bin
INCLUDE		= /u/pn/include
DFLAGS		= -DCOFF -DDEBUG #-I$(INCLUDE)
#CC		= /bin/cc
#HOST_CC	= /bin/cc
CC		= /bin/rcc -DNULL=0 $(DFLAGS)
HOST_CC		= /bin/rcc
LD		= /bin/ld
HOST_LD		= /bin/ld
AS		= /bin/as
AR		= /bin/ar
RANLIB		= /usr/bin/ranlib
CPP		= /lib/cpp
MAKE		= /bin/make
INSTALL		= /usr/bin/install -c
CO		= co
REV		= 
M4		= /usr/bin/m4
PRINT		= /usr/ucb/print
LORDER		= /usr/bin/lorder
SIZE		= /bin/size
# 	The following macros are passed down by makefiles at higher
#	levels and should be passed down by this makefile to Makefile.m4
MAKEMACROS	= CC="$(CC)" AS="$(AS)" LD="$(LD)" AR="$(AR)" \
		  RANLIB="$(RANLIB)" CPP="$(CPP)" MAKE="$(MAKE)" \
		  REV="$(REV)" DESTDIR="$(DESTDIR)" INSTDIR="$(INSTDIR)" \
		  INCLUDE="$(INCLUDE)" XFLAGS="$(XFLAGS)" BASEDIR="$(BASEDIR)" \
		  PRINT="$(PRINT)" INSTALL="$(INSTALL)" HOST_CC="$(HOST_CC)" \
		  LORDER="$(LORDER)" SIZE="$(SIZE)" DFLAGS="$(DFLAGS)"

all:
	-rm -f my_machine mtmp
	$(CPP) -P Mach_types > my_machine
	$(M4) Makefile.m4 > mtmp
	$(MAKE) -f mtmp $(MFLAGS) $(MAKEMACROS) 
	-rm -f my_machine mtmp

install:
	-rm -f my_machine mtmp
	$(CPP) -P Mach_types > my_machine
	$(M4) Makefile.m4 > mtmp
	$(MAKE) -f mtmp $(MFLAGS) $(MAKEMACROS) install
	-rm -f my_machine mtmp

clean:  
	-rm -f my_machine mtmp
	$(CPP) -P Mach_types > my_machine
	$(M4) Makefile.m4 > mtmp
	$(MAKE) -f mtmp $(MFLAGS) $(MAKEMACROS) clean
	-rm -f my_machine mtmp

exclean:
	-rm -f my_machine mtmp
	$(CPP) -P Mach_types > my_machine
	$(M4) Makefile.m4 > mtmp
	$(MAKE) -f mtmp $(MFLAGS) $(MAKEMACROS) exclean
	-rm -f my_machine mtmp

base:		
	-rm -f my_machine mtmp
	$(CPP) -P Mach_types > my_machine
	$(M4) Makefile.m4 > mtmp
	$(MAKE) -f mtmp $(MFLAGS) $(MAKEMACROS) base
	-rm -f my_machine mtmp

index:		
	-rm -f my_machine mtmp
	$(CPP) -P Mach_types > my_machine
	$(M4) Makefile.m4 > mtmp
	$(MAKE) -f mtmp $(MFLAGS) $(MAKEMACROS) index
	-rm -f my_machine mtmp

depend:		
	-rm -f my_machine mtmp
	$(CPP) -P Mach_types > my_machine
	$(M4) Makefile.m4 > mtmp
	$(MAKE) -f mtmp $(MFLAGS) $(MAKEMACROS) depend
	-rm -f my_machine mtmp

print:		
	-rm -f my_machine mtmp
	$(CPP) -P Mach_types > my_machine
	$(M4) Makefile.m4 > mtmp
	$(MAKE) -f mtmp $(MFLAGS) $(MAKEMACROS) print
	-rm -f my_machine mtmp
#
#	Copyright 1986 Gould Inc.
#	All Rights Reserved.
#
