Skip to content

Commit

Permalink
Minor fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
dpetrisko committed Nov 26, 2024
1 parent 2914614 commit 60b283d
Show file tree
Hide file tree
Showing 6 changed files with 31 additions and 27 deletions.
36 changes: 18 additions & 18 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -9,37 +9,37 @@ checkout: ## checkout submodules, but not recursively
@$(GIT) fetch --all
@$(GIT) submodule sync
@$(GIT) submodule update --init
@$(MAKE) -C $(BP_SIM_RTL_DIR) checkout BP_RTL_DIR=$(BP_SIM_RTL_DIR)
@$(MAKE) -C $(BP_SIM_TOOLS_DIR) checkout BP_TOOLS_DIR=$(BP_SIM_TOOLS_DIR)
@$(MAKE) -C $(BP_SIM_SDK_DIR) checkout BP_SDK_DIR=$(BP_SIM_SDK_DIR)
@$(MAKE) -C $(BP_SIM_RTL_DIR) checkout
@$(MAKE) -C $(BP_SIM_TOOLS_DIR) checkout
@$(MAKE) -C $(BP_SIM_SDK_DIR) checkout

apply_patches: ## applies patches to submodules
apply_patches: build.patch
$(eval $(call bsg_fn_build_if_new,patch,$(CURDIR),$(BP_SIM_TOUCH_DIR)))
%/.patch_build: checkout
@$(MAKE) -C $(BP_SIM_RTL_DIR) apply_patches BP_RTL_DIR=$(BP_SIM_RTL_DIR)
@$(MAKE) -C $(BP_SIM_TOOLS_DIR) apply_patches BP_TOOLS_DIR=$(BP_SIM_TOOLS_DIR)
@$(MAKE) -C $(BP_SIM_SDK_DIR) apply_patches BP_SDK_DIR=$(BP_SIM_SDK_DIR)
@$(MAKE) -C $(BP_SIM_RTL_DIR) apply_patches
@$(MAKE) -C $(BP_SIM_TOOLS_DIR) apply_patches
@$(MAKE) -C $(BP_SIM_SDK_DIR) apply_patches
@echo "Patching successful, ignore errors"

prep_lite: ## Minimal preparation for simulation
prep_lite: apply_patches
@$(MAKE) -C $(BP_SIM_RTL_DIR) libs_lite BP_RTL_DIR=$(BP_SIM_RTL_DIR)
@$(MAKE) -C $(BP_SIM_TOOLS_DIR) tools_lite BP_TOOLS_DIR=$(BP_SIM_TOOLS_DIR)
@$(MAKE) -C $(BP_SIM_SDK_DIR) sdk_lite BP_SDK_DIR=$(BP_SIM_SDK_DIR)
@$(MAKE) -C $(BP_SIM_SDK_DIR) prog_lite BP_SDK_DIR=$(BP_SIM_SDK_DIR)
@$(MAKE) -C $(BP_SIM_RTL_DIR) libs_lite
@$(MAKE) -C $(BP_SIM_TOOLS_DIR) tools_lite
@$(MAKE) -C $(BP_SIM_SDK_DIR) sdk_lite
@$(MAKE) -C $(BP_SIM_SDK_DIR) prog_lite

prep: ## Standard preparation for simulation
prep: prep_lite
@$(MAKE) -C $(BP_SIM_RTL_DIR) libs BP_RTL_DIR=$(BP_SIM_RTL_DIR)
@$(MAKE) -C $(BP_SIM_TOOLS_DIR) tools BP_TOOLS_DIR=$(BP_SIM_TOOLS_DIR)
@$(MAKE) -C $(BP_SIM_SDK_DIR) sdk BP_SDK_DIR=$(BP_SIM_SDK_DIR)
@$(MAKE) -C $(BP_SIM_SDK_DIR) prog BP_SDK_DIR=$(BP_SIM_SDK_DIR)
@$(MAKE) -C $(BP_SIM_RTL_DIR) libs
@$(MAKE) -C $(BP_SIM_TOOLS_DIR) tools
@$(MAKE) -C $(BP_SIM_SDK_DIR) sdk
@$(MAKE) -C $(BP_SIM_SDK_DIR) prog

prep_bsg: ## Extra preparation for BSG users
prep_bsg: prep
@$(MAKE) -C $(BP_SIM_RTL_DIR) libs_bsg BP_RTL_DIR=$(BP_SIM_RTL_DIR)
@$(MAKE) -C $(BP_SIM_TOOLS_DIR) tools_bsg BP_TOOLS_DIR=$(BP_SIM_TOOLS_DIR)
@$(MAKE) -C $(BP_SIM_SDK_DIR) sdk_bsg BP_SDK_DIR=$(BP_SIM_SDK_DIR)
@$(MAKE) -C $(BP_SIM_SDK_DIR) prog_bsg BP_SDK_DIR=$(BP_SIM_SDK_DIR)
@$(MAKE) -C $(BP_SIM_RTL_DIR) libs_bsg
@$(MAKE) -C $(BP_SIM_TOOLS_DIR) tools_bsg
@$(MAKE) -C $(BP_SIM_SDK_DIR) sdk_bsg
@$(MAKE) -C $(BP_SIM_SDK_DIR) prog_bsg

5 changes: 4 additions & 1 deletion Makefile.common
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ help: ## prints this message
# Global reset
.PHONY: bleach_all
bleach_all: ## wipes the whole repo clean. Use with caution
@cd $(TOP); git clean -ffdx; git submodule deinit -f .
@cd $(BP_SIM_DIR); git clean -ffdx; git submodule deinit -f .

#############################
# Paths
Expand All @@ -127,3 +127,6 @@ BP_SIM_TOUCH_DIR ?= $(BP_SIM_INSTALL_DIR)/touchfiles

BSG_CADENV_DIR ?= $(BP_SIM_DIR)/install/bsg_cadenv

# Exported for historical reasons, remove later
export BP_SDK_DIR := $(BP_SIM_SDK_DIR)

11 changes: 6 additions & 5 deletions Makefile.env
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,11 @@
# Available platforms: ubuntu20.04
DOCKER_PLATFORM ?= ubuntu20.04

#############################
# Environment detection
#############################
CENTOS7 := $(if $(findstring CentOS Linux release 7,$(shell cat /etc/centos-release 2>/dev/null)),1,0)

##########################################################
## Cad environment
##########################################################
Expand Down Expand Up @@ -33,16 +38,12 @@ endif
# Cad settings
#############################

#############################
# Environment detection
#############################
CENTOS7 := $(if $(findstring CentOS Linux release 7,$(shell cat /etc/centos-release 2>/dev/null)),1,0)

##############################
# Executables
##############################
DOCKER ?= docker
GIT ?= git
CD ?= cd
MKDIR ?= mkdir
ECHO ?= echo

2 changes: 1 addition & 1 deletion black-parrot
2 changes: 1 addition & 1 deletion black-parrot-sdk
2 changes: 1 addition & 1 deletion black-parrot-tools

0 comments on commit 60b283d

Please sign in to comment.