| ## Set common environment variables |
| 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 |
| |
| ## 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. |
| BSG_CADENV_DIR ?= $(TOP)/external/bsg_cadenv |
| -include $(BSG_CADENV_DIR)/cadenv.mk |
| |
| ## Sepcify license path if needed |
| LM_LICENSE_FILE ?= |
| |
| ## Override tool paths if needed |
| GCC ?= gcc |
| VCS_HOME ?= |
| VCS ?= vcs |
| URG ?= urg |
| VERILATOR ?= verilator |
| DC_SHELL ?= dc_shell |
| # Some environments have issues with setting DVE as an environment variable |
| _DVE ?= dve |
| GTKWAVE ?= gtkwave |
| PYTHON ?= python |
| |
| ## Needed for verilator g++ compilations |
| export SYSTEMC_INCLUDE ?= $(BP_EXTERNAL_DIR)/include |
| export SYSTEMC_LIBDIR ?= $(BP_EXTERNAL_DIR)/lib-linux64 |
| |
| ## Add external tools and libraries to environment |
| export PATH := $(BP_EXTERNAL_DIR)/bin:$(PATH) |
| export LD_LIBRARY_PATH := $(SYSTEMC_LIBDIR):$(LD_LIBRARY_PATH) |
| |