2021-05-06 12:39:23 -04:00
|
|
|
# Copyright (C) 2021 The SymbiFlow Authors.
|
|
|
|
#
|
|
|
|
# Use of this source code is governed by a ISC-style
|
|
|
|
# license that can be found in the LICENSE file or at
|
|
|
|
# https://opensource.org/licenses/ISC
|
|
|
|
#
|
|
|
|
# SPDX-License-Identifier: ISC
|
|
|
|
|
|
|
|
SHELL = bash
|
|
|
|
|
|
|
|
PYTHON_SRCS=$(shell find . -name "*.py" -not -path "./env/*" -not -path "./symbiflow/*")
|
|
|
|
JSON_SRCS=$(shell find . -name "*.json" -not -path "./env/*" -not -path "./symbiflow/*")
|
|
|
|
VERILOG_SRCS=$(shell find . -name "*.v" -not -path "./env/*" -not -path "./symbiflow/*")
|
|
|
|
|
|
|
|
env:
|
2021-05-13 14:05:18 -04:00
|
|
|
conda env create -f environment.yml
|
|
|
|
conda activate symbiflow-examples
|
2021-05-06 12:39:23 -04:00
|
|
|
|
|
|
|
format:
|
|
|
|
yapf -i ${PYTHON_SRCS}
|
|
|
|
for i in ${JSON_SRCS}; do \
|
|
|
|
echo "$$(mjson $$i)" > $$i; \
|
|
|
|
done
|
|
|
|
for i in ${VERILOG_SRCS}; do \
|
|
|
|
echo "$$(verible-verilog-format $$i)" > $$i; \
|
|
|
|
done
|
|
|
|
|
|
|
|
clean::
|
2021-05-13 14:05:18 -04:00
|
|
|
rm -rf env/
|
|
|
|
conda deactivate
|
|
|
|
conda env remove -n symbiflow-examples
|
2021-05-06 12:39:23 -04:00
|
|
|
|
2021-05-12 17:42:05 -04:00
|
|
|
.PHONY: env format clean
|