Skip to content

Commit

Permalink
Corrected and simplified Makefile
Browse files Browse the repository at this point in the history
Cleanup .gitignore
  • Loading branch information
d-m-bailey committed Aug 19, 2024
1 parent 291e13a commit d77c590
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 20 deletions.
14 changes: 7 additions & 7 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
/.idea/
/precheck_results/
*/tmp
*/*/tmp
*.hex*
*.lst
*.vcd
*.gtkw
/env
/venv
/caravel
/runs
/dependencies
/mgmt_core_wrapper
/venv/
/venv-cocotb/
/caravel/
runs/
/dependencies/
/mgmt_core_wrapper/
/logs
/lvs_results
lvs_results/
24 changes: 11 additions & 13 deletions openlane/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,13 @@
#
# SPDX-License-Identifier: Apache-2.0

SHELL := /bin/bash
MAKEFLAGS+=--warn-undefined-variables

export OPENLANE_RUN_TAG = $(shell date '+%y_%m_%d_%H_%M')
OPENLANE_TAG ?= 2024.08.15
OPENLANE_IMAGE_NAME ?= efabless/openlane:$(OPENLANE_TAG)
designs = $(shell find * -maxdepth 0 -type d)
current_design = null
designs=$(shell find * -maxdepth 0 -type d)

ROOTLESS ?= 0
USER_ARGS = -u $$(id -u $$USER):$$(id -g $$USER)
Expand Down Expand Up @@ -67,19 +67,17 @@ list:
@echo $(designs)

.PHONY: $(designs)
$(designs) : export current_design=$@
$(designs) : % : ./%/config.json
ifneq (,$(wildcard ./$(current_design)/interactive.tcl))
$(docker_run) \
$(OPENLANE_IMAGE_NAME) sh -c $(openlane_cmd_interactive)
else
# $(current_design)
mkdir -p ./$*/runs/$(OPENLANE_RUN_TAG)
$(designs) : % :
mkdir -p ./$*/runs/$(OPENLANE_RUN_TAG)
rm -rf ./$*/runs/$*
ln -s $$(realpath ./$*/runs/$(OPENLANE_RUN_TAG)) ./$*/runs/$*
$(docker_run) \
$(OPENLANE_IMAGE_NAME) sh -c $(openlane_cmd)
endif
if [[ -f ./$@/interactive.tcl ]]; then \
$(docker_run) \
$(OPENLANE_IMAGE_NAME) sh -c $(openlane_cmd_interactive); \
else \
$(docker_run) \
$(OPENLANE_IMAGE_NAME) sh -c $(openlane_cmd); \
fi
@mkdir -p ../signoff/$*/
@cp ./$*/runs/$*/OPENLANE_VERSION ../signoff/$*/
@cp ./$*/runs/$*/PDK_SOURCES ../signoff/$*/
Expand Down

0 comments on commit d77c590

Please sign in to comment.