#  HISTORY
#  27-May-87  Richard Draves (rpd) at Carnegie-Mellon University
#	Created from the old mig's Makefile.
#

DSTDIR=/usr/mach
INSTALL_DIR=${DSTDIR}/lib
TARGET_DIRS=$(INSTALL_DIR) ${DSTDIR}/bin ${INCDIR}
SRCDIR=${DSTDIR}/src

LIBS= /usr/lib/libl.a

INCS=	mig_errors.h
SRCS= 	parser.c lexxer.c mig.c			\
	error.c string.c type.c routine.c	\
	statement.c global.c			\
	header.c user.c server.c utils.c


PRGM=	migcom


include $(SRCDIR)/Make.inc

CC = cc


install: mig.install 

mig.install: $(TARGET_DIRS) mig.sh 
	-@mach_install $I mig.sh ${DSTDIR}/bin/mig
	-@touch mig.install

lint:	*.c
	lint *.c

parser.c parser.h :	parser.y
	yacc -d parser.y &&		\
	mv y.tab.c parser.c &&		\
	mv y.tab.h parser.h

lexxer.c :	lexxer.l
	lex lexxer.l &&			\
	mv lex.yy.c lexxer.c


