#								SCOT Makef
# macros defined in toplevel csound/Makefile
#	CFLAGS DESTDIR INCLUDE LIBLIB
# CFLAGS may be redefined here

CFLAGS =				# sys5 will need -DSYS5
# CFLAGS = -O -DYYDEBUG -D${LSCOT}	# -O and LSCOT sometimes problematic

OBJS = scot.o data.o io.o scot1.o scot2.o scot3.o rat.o string.o lexer.o

scots:	scot

scot:	$(OBJS)
	cc -n -o scot $(OBJS) -ll

lscot:	; make LSCOT=LSCOT scot

y.tab.h:			; yacc -d scot.y; rm y.tab.c
scot.o: 	y.tab.h data.h
scot.c: 	scot.y
lexer.o:	data.h y.tab.h
lexer.c:	lexer.l
y.tab.o:	data.h y.tab.h
io.o:		data.h y.tab.h
data.o: 	data.h y.tab.h
scot1.o:	data.h y.tab.h
scot2.o:	data.h y.tab.h
scot3.o:	data.h y.tab.h
rat.o:		data.h
string.o:	data.h

install:	scot
		-strip scot
		-rm -f $(DESTDIR)/scot
		cp scot $(DESTDIR)

clean:
		-rm scot lscot *.o y.tab.? lex.yy.c lexer.c scot.c

rmbak:
		-rm *.bak *~
