URL
https://opencores.org/ocsvn/openrisc/openrisc/trunk
Subversion Repositories openrisc
[/] [openrisc/] [trunk/] [orpsocv2/] [boards/] [actel/] [ordb1a3pe1500/] [rtl/] [verilog/] [versatile_mem_ctrl/] [Makefile] - Rev 408
Compare with Previous | Blame | View Log
REPOS_NAME=versatile_mem_ctrlREPOS_ADR=http://opencores.org/ocsvn/$(REPOS_NAME)/$(REPOS_NAME)/trunk# Resulting file we needTOP_FILE=versatile_mem_ctrl.v# Dir to checkout in the repostiREPOS_DIR=rtlREPOS_FILE_TO_MAKE_NAME=sdr_16.vREPOS_MAKE_DIR=$(REPOS_DIR)/verilogFILE_TO_MAKE=$(REPOS_MAKE_DIR)/$(REPOS_FILE_TO_MAKE_NAME)REVISION= # could be -r 35, for example, to use a specific revision's versionSVN_GET_CMD=co # Could also be export, if we you want an unversioned copy# Set V=1 when calling make to enable verbose output# mainly for debugging purposes.ifeq ($(V), 1)Q=QUIET=elseQ ?=@QUIET=-quietendififeq ($(NO_CHECKOUT), 1)OUR_DEPENDS=elseOUR_DEPENDS=$(REPOS_DIR) $(FILE_TO_MAKE)endifall: $(TOP_FILE)# Local copy of previous controller#$(TOP_FILE): versatile_mem_ctrl_ip.v sdr_16_defines.v versatile_mem_ctrl_defines.v TwoPortRAM_256x36.v# vppreproc +incdir+. versatile_mem_ctrl_ip.v > $@# Memory controller from repos:# This renames the top module,so it's exactly the same as the module folder name$(TOP_FILE): $(OUR_DEPENDS)$(Q)touch $(FILE_TO_MAKE)$(Q)cat $(FILE_TO_MAKE) | sed 's/module\ versatile_mem_ctrl_top/module\ versatile_mem_ctrl/' > $@# Force this guy to get at least a once over with make each time.PHONY: $(FILE_TO_MAKE)$(FILE_TO_MAKE):$(Q)$(MAKE) -C $(REPOS_MAKE_DIR) $(REPOS_FILE_TO_MAKE_NAME)# Checkout the repository$(REPOS_DIR):$(Q)if [ ! -d $@ ]; then \echo; \echo "\t### Checking out "$(REPOS_NAME)" from OpenCores ###"; \echo; \svn $(SVN_GET_CMD) $(REVISION) $(REPOS_ADR)/$@; \else \if [ $(SVN_GET_CMD) = "co" ]; then \echo; \echo "\t### Updating "$(REPOS_NAME)" from OpenCores repository ###"; \echo; \cd $(REPOS_DIR) && svn update; \fi; \fi# Just remove the top file, causing it to be remadeclean: clean-repos# rm -f $(TOP_FILE)# Clean the checked out repositoryclean-repos:$(Q)echo;echo "\t### Cleaning "$(REPOS_NAME)" checkout ###"; echo$(Q)if [ -d $(REPOS_DIR) ]; then \$(MAKE) -C $(REPOS_MAKE_DIR) clean; \fi# Remove the checked out repositorydistclean:# $(Q)echo;echo "\t### Removing "$(REPOS_NAME)" checkout ###";echo# $(Q)rm -rf $(REPOS_DIR)
