Skip to content

Commit 0eff7f1

Browse files
committed
variables: break out variables.mk file
The idea is to separate the ORFS variable support and make variables and ORFS agnostic to build systems, even if make is used to evaluate variables. ORFS contains an implementation of a flow using make, bazel-orfs implements a flow using Bazel. Sometimes make is preferable, keep things simple, but for more advanced flows, Bazel provides more flexibility at the cost of increased complexity. Signed-off-by: Øyvind Harboe <[email protected]>
1 parent 044183f commit 0eff7f1

File tree

2 files changed

+13
-5
lines changed

2 files changed

+13
-5
lines changed

flow/Makefile

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -85,11 +85,6 @@
8585
# Default design
8686
DESIGN_CONFIG ?= ./designs/nangate45/gcd/config.mk
8787

88-
# Include design and platform configuration before setting default options
89-
# in this file. This allows the DESIGN_CONFIG to set different defaults than
90-
# this file.
91-
include $(DESIGN_CONFIG)
92-
export DESIGN_NICKNAME?=$(DESIGN_NAME)
9388
# default value "base" is duplicated from variables.yaml because we need it
9489
# earlier in the flow for BLOCKS. BLOCKS is a feature specific to Makefile
9590
# that will not be ported to bazel-orfs.
@@ -138,6 +133,7 @@ MAKEFLAGS += --no-builtin-rules
138133
SHELL := /usr/bin/env bash
139134
.SHELLFLAGS := -o pipefail -c
140135

136+
141137
#-------------------------------------------------------------------------------
142138
# Setup variables to point to root / head of the OpenROAD directory
143139
# - the following settings allowed user to point OpenROAD binaries to different
@@ -148,6 +144,8 @@ FLOW_HOME := $(abspath $(dir $(firstword $(MAKEFILE_LIST))))
148144
endif
149145
export FLOW_HOME
150146

147+
include $(FLOW_HOME)/scripts/variables.mk
148+
151149
#-------------------------------------------------------------------------------
152150
# Setup variables to point to other location for the following sub directory
153151
# - designs - default is under current directory

flow/scripts/variables.mk

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
# Sets up ORFS variables using make variable support, relying
2+
# on makefile features such as defaults, forward references,
3+
# lazy evaluation, conditional code, include statements,
4+
# etc.
5+
6+
# Include design and platform configuration before setting default options
7+
# in this file. This allows the DESIGN_CONFIG to set different defaults than
8+
# this file.
9+
include $(DESIGN_CONFIG)
10+
export DESIGN_NICKNAME?=$(DESIGN_NAME)

0 commit comments

Comments
 (0)