Commit 7a8e7b04 authored by Jonnatan Mendoza Escobar's avatar Jonnatan Mendoza Escobar
Browse files

Initial commit, adding first version of makefile

parent 1cf808a6
TEROSHDL_DOC ?= /opt/colibri/bin/teroshdl-hdl-documenter
VTREE ?= /bin/vtree
CURRENT_PATH = $(shell pwd)
LIB_ROOT_PATH ?= $(CURRENT_PATH)/../../
LOCAL_SRC_FOLDER = $(shell pwd)/src
DOC_FOLDER = $(shell pwd)/doc
MODULES_LIST ?= $(shell $(VTREE) get_modules $(LOCAL_SRC_FOLDER))
define mtree_func
$(VTREE) mtree $(LIB_ROOT_PATH) $(1) -v 1;
endef
define minsts_func
$(VTREE) minsts $(LIB_ROOT_PATH) $(1) -v 1;
endef
define print_src
echo " [+] $(1)";
endef
docs:
$(TEROSHDL_DOC) -i src --outpath doc --symbol_verilog "!" --self_contained
mtree:
@($(call print_src,"LIB_PATH: "$(LIB_ROOT_PATH)))
@($(foreach TOP_MODULE,$(MODULES_LIST), $(call mtree_func,$(TOP_MODULE))))
minsts:
@($(call print_src,"LIB_PATH: "$(LIB_ROOT_PATH)))
@($(foreach TOP_MODULE,$(MODULES_LIST), $(call minsts_func,$(TOP_MODULE))))
clean:
rm -f $(DOC_FOLDER)/*.html
rm -f *.dep
\ No newline at end of file
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment