# *************************************************************
#	lfe : LOTOS compiler front end: syntax + ast building
# *************************************************************
#***********************************
# (C) Copyright 1992-1993; dit/upm
#  Distributed under the conditions stated in the
#  TOPO General Public License (see file LICENSE)
#***********************************
# $Id: makefile,v 2.29 1995/01/11 12:04:17 lotos Exp $

TOOL=	lfe

TRGT=	lfe
SRCS=	$(TRGT).c gram.c lexana.c elib.c	rag.c
OBJS=	$(TRGT).o gram.o lexana.o elib.o	rag.o
HS=	swbus.h

INCDIRS= -I$(EPSINC) -I$(TOPOINC)
LIBDIRS= -L$(EPSLIB) -L$(TOPOLIB)
CFLAGS=	$(CF_DBX) $(INCDIRS)

$(TRGT):	$(OBJS)
	$(CC) $(CFLAGS) $(LIBDIRS) -o $@ $(OBJS) -lcast -lrag

$(OBJS): $(HS)

install::	$(TRGT)
	cp $(TRGT) $(TOPOBIN)/$(TRGT)
	chmod a+x $(TOPOBIN)/$(TRGT)

install::	nodes.h grc.h
	cp nodes.h grc.h $(TOPOINC)
	chmod a+r $(TOPOINC)/nodes.h
	chmod a+r $(TOPOINC)/grc.h

install::	colours.h colours.c
	cp colours.h colours.c $(TOPOINC)
	chmod a+r $(TOPOINC)/colours.h
	chmod a+r $(TOPOINC)/colours.c

install::
	touch install

install_more::

gram.c:	gram.y
	-chmod u+w $@
	-$(YACC) $(YFLAGS) gram.y && mv y.tab.c $@

clean::
	-rm -f $(OBJS) $(TRGT)
	-rm -f *~ core

#------------------------------------------------------------------
