#sccs	"@(#)uts/kern/ic:Makefile	1.5"

#	Convergent Technologies - System V - May 1983

include $(MAKEINC)/Makepre.h
include ../cf/Makeflags

LIBNAME = ../lib1

FILES =\
	ic.x

all:	$(LIBNAME) 

.PRECIOUS:	$(LIBNAME)

$(LIBNAME):	lib1.x
	-chmod 664 $(LIBNAME)

lib1.x:		$(FILES)
	$(AR) rv $(LIBNAME) `cat olist`
	rm -f `cat olist` olist
	touch $@

ic.c: icode header trailer
	cat header > ic.c
	dump -s -n .text icode |\
	sed -e '1,6d' -e 's/\([0-9A-Fa-f]*\)\(  *\)/0x\1,/g' >> ic.c
	cat trailer >> ic.c

icode: icode_o
	if [ ! \( -f /lib/ifile.0407 \) -o ! \( -r /lib/libc.a \) ] ; \
	then \
		cd $(SRC)/LIB; \
		$(MAKE) libc_mk libc_install ifile_install; \
	fi
	$(LD) -N -x -o $@ $? -lc

icode_o: icode.s
	$(CC) -c $?
	mv icode.o icode_o

includes:

clean:
	-rm -f *.o ic.c icode icode_o

clobber:	clean
	-rm -f *.x

populate:
	getunit

FRC:
