############################################################################### # Global receipes none: $(info You should specify what to make: ip, sim, clean, clean-all) ip:component.xml sim: ############################################################################### # Configuration # TODO: better way to configure ? hdlpkgsrc := #hdl_pkg/combpm_gtwrapper_CAENELS4SFP_1L_pkg.vhd ############################################################################### # Generate a source list, depending on the config rdlsrc := $(shell ls rdl/*.rdl) rdltarget := $(rdlsrc:rdl/%.rdl=hdl/%.vhd) hdlsrc := $(shell ls hdl/*.vhd) $(rdltarget) $(hdlpkgsrc) # TODO: depends on the configuration tcl/sources.tcl: echo read_vhdl {$(hdlsrc)} > $@ ############################################################################### # Compute interface from rdl files # TODO: generic rule from variables hdl/combpm_protocol_electron_ctrl.vhd: rdl/combpm_protocol_electron_ctrl.rdl hectare --axi-vhdl $@ $< ############################################################################### # Package IP component.xml:tcl/sources.tcl tcl/combpm.tcl $(hdlsrc) $(xcisrc) vivado -mode batch -source tcl/combpm.tcl ############################################################################### # Cleaner Rules clean: rm -f vivado*.log vivado*.jou clean-ip: rm -rf ip_proj ip_user_files xgui rm -f component.xml clean-sim: rm -f *.wdb clean-all:clean-ip clean rm -f tcl/sources.tcl .PHONY: clean clean-ip clean-sim clean-all none ip sim