# $Header: /m2/j/tools/g960/src/lib/crt/common/RCS/Makefile,v 1.6 89/12/10 14:06:17 chrisb Exp $
#
# Makefile for
#	crtnin.o/crtfnin.o	(Intel object), and
#	crtning.o/crtfning.o	(GNU/960 object)
#
#	These are the C runtime startup files for the NINDY environment.
#	crtfnin.o and crtfning.o support Flash memory.


GOBJS	= crtning.o crtfning.o
GAS	= gas960

IOBJS	= crtnin.o crtfnin.o
IAS	= asm960

AS_FLAGS= -AKA

all:	gnu intel

gnu:	${GOBJS}

intel:	${IOBJS}

crtnin.o:	crtnin.s
	/lib/cpp crtnin.s >tmp.s
	${IAS} ${IASFLAGS} -o crtnin.o tmp.s
	rm tmp.s

crtfnin.o:	crtfnin.s
	${IAS} ${IASFLAGS} -o crtfnin.o crtfnin.s

crtning.o:	crtnin.s
	/lib/cpp -DGNU crtnin.s >tmp.s
	${GAS} ${GASFLAGS} -o crtning.o tmp.s
	rm tmp.s

crtfning.o:	crtfnin.s
	${GAS} ${GASFLAGS} -o crtfning.o crtfnin.s


# 'G960BASE' should be defined at invocation

install_gnu:	gnu
	mv -f crtning.o crtfning.o ${G960BASE}/lib

install_intel:	intel
	mv -f crtnin.o crtfnin.o ${G960BASE}/lib

install: install_gnu install_intel

clean:
	rm -f *.o
