.PHONY: clean

all:	netlist

PRJ := mips_top
PREQ := $(PRJ).prj $(PRJ).xst $(PRJ).lso
DIRS := ./xst/tmp

netlist: $(PRJ).ngc

$(PRJ).ngc: $(DIRS) $(PREQ)
	xst -ifn $(PRJ).xst -intstyle xflow

$(DIRS):
	mkdir -p $(DIRS)

clean:
	rm -rf ./xst
	rm -rf ./xlnx_auto_0_xdb
	rm -f xlnx_auto_0.ise
	rm -f $(PRJ).ngc
	rm -f $(PRJ).ngr
	rm -f $(PRJ).srp
	rm -f $(PRJ)_xst.xrpt
	


