INSTALL_DIR=please_set_the_INSTALL_DIR_variable_in_the_top_level_makefile_and_run_make_config

LIB=$(INSTALL_DIR)/lib
DE4LIB=$(LIB)/de4_pcie_portmux
DE5LIB=$(LIB)/de5_pcie_portmux

all:	install

de4_qsys/qsys:
	-echo Build the system using Qsys

de5_qsys/qsys:
	-echo Build the system using Qsys

install:	de4_qsys/qsys de5_qsys/qsys
	cp pcieportmux_gen.tcl $(LIB)
	@if test ! -d $(DE4LIB); then mkdir $(DE4LIB); fi
	cp de4_pcie_portmux.v.template $(DE4LIB)/pcie_portmux.v.template
	cp pcie_reconfig.v $(DE4LIB)
	rm -rf $(DE4LIB)/qsys
	cp -rf de4_qsys $(DE4LIB)/qsys
	@if test ! -d $(DE5LIB); then mkdir $(DE5LIB); fi
	cp de5_pcie_portmux.v.template $(DE5LIB)/pcie_portmux.v.template
	cp pcie_reconfig.v $(DE5LIB)
	rm -rf $(DE5LIB)/qsys
	cp -rf de5_qsys $(DE5LIB)/qsys

clean:
