forked from antmicro/CFU-Playground
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
61 lines (47 loc) · 2.91 KB
/
Makefile
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
52
53
54
55
56
57
58
59
60
61
# The top directory where environment will be created.
TOP_DIR := $(realpath $(dir $(lastword $(MAKEFILE_LIST))))
# A pip `requirements.txt` file.
# https://pip.pypa.io/en/stable/reference/pip_install/#requirements-file-format
REQUIREMENTS_FILE := $(TOP_DIR)/conf/requirements.txt
# A conda `environment.yml` file.
# https://docs.conda.io/projects/conda/en/latest/user-guide/tasks/manage-environments.html
ENVIRONMENT_FILE := $(TOP_DIR)/conf/environment.yml
include third_party/make-env/conda.mk
# Example make target which runs commands inside the conda environment.
test-command: | $(CONDA_ENV_PYTHON)
@$(IN_CONDA_ENV) echo "Python is $$(which python)"
@$(IN_CONDA_ENV) python --version
info:
@echo TOP_DIR: $(TOP_DIR)
SF_INSTALL=env/symbiflow
help:
@echo
@echo ================================================================
@echo " To install SymbiFlow, type 'make install-sf'."
@echo
@echo " To enter the SymbiFlow environment so that you can use it,"
@echo " type "make enter-sf". This puts you in a subshell with"
@echo " everything set up; type 'exit' to leave."
@echo ================================================================
@echo
install-sf:
@if [ -d "$(SF_INSTALL)" ]; then \
echo ; \
echo "$(SF_INSTALL) already exists. Remove it if you want to reinstall."; \
echo ; \
exit 1; \
fi
@mkdir -p $(SF_INSTALL)
@/bin/cp conf/environment-symbiflow.yml conf/environment.yml
@/bin/cp conf/requirements-symbiflow.txt conf/requirements.txt
wget -qO- "https://www.googleapis.com/download/storage/v1/b/symbiflow-arch-defs/o/artifacts%2Fprod%2Ffoss-fpga-tools%2Fsymbiflow-arch-defs%2Fcontinuous%2Finstall%2F497%2F20211222-000718%2Fsymbiflow-arch-defs-install-f9aa1caf.tar.xz?generation=1640179068316994&alt=media" | tar -xJC $(SF_INSTALL)
wget -qO- "https://www.googleapis.com/download/storage/v1/b/symbiflow-arch-defs/o/artifacts%2Fprod%2Ffoss-fpga-tools%2Fsymbiflow-arch-defs%2Fcontinuous%2Finstall%2F497%2F20211222-000718%2Fsymbiflow-arch-defs-xc7a50t_test-f9aa1caf.tar.xz?generation=1640179069641023&alt=media" | tar -xJC $(SF_INSTALL)
wget -qO- "https://www.googleapis.com/download/storage/v1/b/symbiflow-arch-defs/o/artifacts%2Fprod%2Ffoss-fpga-tools%2Fsymbiflow-arch-defs%2Fcontinuous%2Finstall%2F497%2F20211222-000718%2Fsymbiflow-arch-defs-xc7a100t_test-f9aa1caf.tar.xz?generation=1640179071622610&alt=media" | tar -xJC $(SF_INSTALL)
wget -qO- "https://www.googleapis.com/download/storage/v1/b/symbiflow-arch-defs/o/artifacts%2Fprod%2Ffoss-fpga-tools%2Fsymbiflow-arch-defs%2Fcontinuous%2Finstall%2F497%2F20211222-000718%2Fsymbiflow-arch-defs-xc7a200t_test-f9aa1caf.tar.xz?generation=1640179073346556&alt=media" | tar -xJC $(SF_INSTALL)
$(MAKE) env
@echo
@echo "Done installing SymbiFlow. To enter the environment, type 'make enter-sf', which creates a new subshell, and 'exit' when done."
@echo
enter-sf:
-@export PATH=$(TOP_DIR)/env/symbiflow/bin:$(PATH) && $(MAKE) enter
.PHONY: enter-sf install-sf info