
all_targets: 53c8xx_d.h 53c7xx_d.h sim710_d.h 53c700_d.h

include ../../Rules.make

PERL=/usr/bin/perl

53c8xx_d.h: 53c7,8xx.scr script_asm.pl
	ln -sf 53c7,8xx.scr fake8.c
	$(CPP) $(CPPFLAGS) -traditional -DCHIP=810 fake8.c | grep -v '^#' | $(PERL) script_asm.pl 
	mv script.h 53c8xx_d.h
	mv scriptu.h 53c8xx_u.h
	rm fake8.c

53c7xx_d.h: 53c7xx.scr script_asm.pl
	ln -sf 53c7xx.scr fake7.c
	$(CPP) $(CPPFLAGS) -traditional -DCHIP=710 fake7.c | grep -v '^#' | $(PERL) -s script_asm.pl -ncr7x0_family
	mv script.h 53c7xx_d.h
	mv scriptu.h 53c7xx_u.h
	rm fake7.c

sim710_d.h: sim710.scr script_asm.pl
	ln -sf sim710.scr fake7.c
	$(CPP) $(CPPFLAGS) -traditional -DCHIP=710 fake7.c | grep -v '^#' | $(PERL) -s script_asm.pl -ncr7x0_family
	mv script.h sim710_d.h
	mv scriptu.h sim710_u.h
	rm fake7.c

53c700_d.h: 53c700.scr script_asm.pl
	$(PERL) -s script_asm.pl -ncr7x0_family < 53c700.scr
	rm -f scriptu.h
	mv script.h 53c700_d.h

