#  Makefile_inc from ObjectProDSP 0.1
#  Copyright (C) 1994, Mountain Math Software, All rights reserved.
#  Licensed for free use and distribution under version 2 of the Gnu General
#  Public License. Please see file COPYING for details and restrictions.
#  
#  ObjectProDSP is a trademark of Mountain Math Software.
#  

ifeq (${LOCAL_DIR},${MAIN_DIR})
# -d generates rofftex.tab.h, -v generates y.output
${LOCAL_DIR}/rofftex.tab.h ${LOCAL_DIR}/rofftex.tab.C: ${LOCAL_DIR}/rofftex.y 
	bison -d -v ${LOCAL_DIR}/rofftex.y
	cd  ${MAIN_DIR} ; mv  rofftex.tab.c rofftex.tab.C
else
#this is so depedencies for make files in other directories will work
${MAIN_DIR}/rofftex.tab.h : ${MAIN_DIR}/rofftex.y 
	cd ${MAIN_DIR}/${SUB_DIR} ; make rofftex.tab.o
endif

bison.line : ${LOCAL_DIR}/rofftex.tab.C
	fgrep -v '# line' ${LOCAL_DIR}/rofftex.tab.C > ytab.C
	mv ytab.C ${LOCAL_DIR}/rofftex.tab.C
	make rofftex.tab.o

${LOCAL_DIR}/lex.yy.C: ${LOCAL_DIR}/rofftex.l
	cd ${LOCAL_DIR}/${SUB_DIR} ; flex ${LOCAL_DIR}/rofftex.l
	cd ${LOCAL_DIR}/${SUB_DIR} ; mv lex.yy.c ${LOCAL_DIR}/lex.yy.C

