Files
b210-k7-fpga/top/Makefile.common
T
Martin Braun ce0ddc6dac fpga: Replace references to python -> python3
In several cases, we call `python` explicitly. On many modern operating
systems (e.g., Ubuntu 22.04), this command no longer exists, and if it
does, it's often an alias to python3.

Because the python3 executable has been around for so long, simply
using that directly (instead of, e.g., autodetecting the OS preferences)
is a simple fix that immediately allows building bitfiles, e.g. for the
B2xx series, on more recent OSes.


Original-commit: 356cd172bb5ae0d043825bd1f4dffbd6646ec3d2
2023-12-05 15:43:08 -06:00

61 lines
1.5 KiB
Makefile

#
# Copyright 2008-2013 Ettus Research LLC
#
# Used by b200 and b2xxmini
##################################################
# Constants
##################################################
ISE_VER = $(shell xtclsh -h | head -n1 | cut -f2 -d" " | cut -f1 -d.)
ifeq ($(ISE_VER),10)
ISE_EXT = ise
else
ISE_EXT = xise
endif
BASE_DIR = $(abspath ..)
ISE_HELPER = xtclsh $(BASE_DIR)/tcl/ise_helper.tcl
SANITY_CHECKER = python3 $(BASE_DIR)/python/check_inout.py
TIMING_CHECKER = python3 $(BASE_DIR)/python/check_timing.py
ISE_FILE = $(BUILD_DIR)/$(TOP_MODULE).$(ISE_EXT)
BIN_FILE = $(BUILD_DIR)/$(TOP_MODULE).bin
BIT_FILE = $(BUILD_DIR)/$(TOP_MODULE).bit
TWR_FILE = $(BUILD_DIR)/$(TOP_MODULE).twr
##################################################
# Global Targets
##################################################
all: bin
proj: $(ISE_FILE)
check: $(ISE_FILE)
#$(SANITY_CHECKER) $(TOP_MODULE).v $(TOP_MODULE).ucf
$(ISE_HELPER) "Check Syntax"
synth: $(ISE_FILE)
$(ISE_HELPER) "Synthesize - XST"
#bin: check $(BIN_FILE)
bin: $(BIN_FILE) $(BIT_FILE)
$(TIMING_CHECKER) $(TWR_FILE)
clean:
$(RM) -r $(BUILD_DIR)
.PHONY: all proj check synth bin mcs clean
##################################################
# Dependency Targets
##################################################
.SECONDEXPANSION:
$(ISE_FILE): $$(SOURCES) $$(MAKEFILE_LIST)
@echo $@
$(ISE_HELPER) ""
$(BIN_FILE): $(ISE_FILE) $$(SOURCES) $$(MAKEFILE_LIST)
@echo $@
$(ISE_HELPER) "Generate Programming File" 2>&1 | tee $(BUILD_DIR)/build.log
touch $@
.EXPORT_ALL_VARIABLES: