Skip to content

Commit 5f821dc

Browse files
committed
Corrected and simplified Makefile
Cleanup .gitignore
1 parent 9a72951 commit 5f821dc

2 files changed

Lines changed: 19 additions & 22 deletions

File tree

.gitignore

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,17 @@
11
/.idea/
22
/precheck_results/
33
*/tmp
4-
*/*/tmp
54
*.hex*
65
*.lst
76
*.vcd
87
*.gtkw
98
/env
10-
/venv
11-
/caravel
12-
/runs
13-
/dependencies
14-
/mgmt_core_wrapper
9+
/venv/
10+
/venv-cocotb/
11+
/caravel/
12+
runs/
13+
/dependencies/
14+
/mgmt_core_wrapper/
1515
/logs
16-
/lvs_results/
16+
lvs_results/
1717
__pycache__/

openlane/Makefile

Lines changed: 12 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -13,13 +13,13 @@
1313
#
1414
# SPDX-License-Identifier: Apache-2.0
1515

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

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

2424
ROOTLESS ?= 0
2525
USER_ARGS = -u $$(id -u $$USER):$$(id -g $$USER)
@@ -67,24 +67,21 @@ list:
6767
@echo $(designs)
6868

6969
.PHONY: $(designs)
70-
$(designs) : % : ./%/config.json
71-
ifneq (,$(wildcard ./$(MAKECMDGOALS)/interactive.tcl))
72-
mkdir -p ./$*/runs/$(OPENLANE_RUN_TAG)
70+
$(designs) : % :
71+
mkdir -p ./$*/runs/$(OPENLANE_RUN_TAG)
7372
rm -rf ./$*/runs/$*
7473
ln -s $$(realpath ./$*/runs/$(OPENLANE_RUN_TAG)) ./$*/runs/$*
75-
$(docker_run) \
76-
$(OPENLANE_IMAGE_NAME) sh -c $(openlane_cmd_interactive)
77-
else
78-
# $(current_design)
79-
mkdir -p ./$*/runs/$(OPENLANE_RUN_TAG)
80-
rm -rf ./$*/runs/$*
81-
ln -s $$(realpath ./$*/runs/$(OPENLANE_RUN_TAG)) ./$*/runs/$*
82-
$(docker_run) \
83-
$(OPENLANE_IMAGE_NAME) sh -c $(openlane_cmd)
84-
endif
74+
if [[ -f ./$@/interactive.tcl ]]; then \
75+
$(docker_run) \
76+
$(OPENLANE_IMAGE_NAME) sh -c $(openlane_cmd_interactive); \
77+
else \
78+
$(docker_run) \
79+
$(OPENLANE_IMAGE_NAME) sh -c $(openlane_cmd); \
80+
fi
8581
@mkdir -p ../signoff/$*/
8682
@cp ./$*/runs/$*/OPENLANE_VERSION ../signoff/$*/
8783
@cp ./$*/runs/$*/PDK_SOURCES ../signoff/$*/
84+
@cp ./$*/runs/$*/reports/*.csv ../signoff/$*/
8885

8986
.PHONY: openlane
9087
openlane: check-openlane-env

0 commit comments

Comments
 (0)