forked from black-parrot/black-parrot
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile.common
52 lines (42 loc) · 1.76 KB
/
Makefile.common
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
## Set common environment variables
export TOP ?= $(shell git rev-parse --show-toplevel)
export BP_COMMON_DIR ?= $(TOP)/bp_common
export BP_FE_DIR ?= $(TOP)/bp_fe
export BP_BE_DIR ?= $(TOP)/bp_be
export BP_ME_DIR ?= $(TOP)/bp_me
export BP_TOP_DIR ?= $(TOP)/bp_top
export BP_EXTERNAL_DIR ?= $(TOP)/external
export BASEJUMP_STL_DIR ?= $(BP_EXTERNAL_DIR)/basejump_stl
export HARDFLOAT_DIR ?= $(BP_EXTERNAL_DIR)/HardFloat
export BP_BIN_DIR ?= $(BP_EXTERNAL_DIR)/bin
export BP_LIB_DIR ?= $(BP_EXTERNAL_DIR)/lib
export BP_INCLUDE_DIR ?= $(BP_EXTERNAL_DIR)/include
export BP_TOUCH_DIR ?= $(BP_EXTERNAL_DIR)/touchfiles
export BP_TEST_DIR ?= $(BP_COMMON_DIR)/test
export BP_TEST_CFG_DIR ?= $(BP_TEST_DIR)/cfg
export BP_TEST_SRC_DIR ?= $(BP_TEST_DIR)/src
export BP_TEST_INCUDE_DIR ?= $(BP_TEST_DIR)/include
export BP_TEST_LIB_DIR ?= $(BP_TEST_DIR)/lib
export BP_TEST_MEM_DIR ?= $(BP_TEST_DIR)/mem
export RISCV_TARGET ?= riscv64-unknown-elf-dramfs
export CROSS_COMPILE ?= $(RISCV_TARGET)-
## Setup CAD tools
# If the machine you are working on is bsg_cadenv compliant, then you do not
# need to setup the cad tools, simply put bsg_cadenv in the same root dir.
export BSG_CADENV_DIR ?= $(TOP)/external/bsg_cadenv
-include $(BSG_CADENV_DIR)/cadenv.mk
## Sepcify license path if needed
export LM_LICENSE_FILE ?=
## Override tool paths if needed
export GCC ?= gcc
export VCS_HOME ?=
export VCS ?= vcs
export URG ?= urg
export VERILATOR ?= verilator
export DC_SHELL ?= dc_shell
export _DVE ?= dve
export GTKWAVE ?= gtkwave
export PYTHON ?= python
## Add external tools and libraries to environment
# SystemC paths are needed for verilator-driven builds
export PATH := $(BP_EXTERNAL_DIR)/bin:$(PATH)