2022-02-02 13:41:06 -05:00
|
|
|
# Copyright 2019-2022 F4PGA Authors
|
2021-05-06 12:39:23 -04:00
|
|
|
#
|
2022-02-02 13:41:06 -05:00
|
|
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
|
|
# you may not use this file except in compliance with the License.
|
|
|
|
# You may obtain a copy of the License at
|
2021-05-06 12:39:23 -04:00
|
|
|
#
|
2022-02-02 13:41:06 -05:00
|
|
|
# http://www.apache.org/licenses/LICENSE-2.0
|
|
|
|
#
|
|
|
|
# Unless required by applicable law or agreed to in writing, software
|
|
|
|
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
|
|
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
|
|
# See the License for the specific language governing permissions and
|
|
|
|
# limitations under the License.
|
|
|
|
#
|
|
|
|
# SPDX-License-Identifier: Apache-2.0
|
2021-05-06 12:39:23 -04:00
|
|
|
|
|
|
|
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
|
2022-02-18 12:15:44 -05:00
|
|
|
conda activate f4pga-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
|
2022-02-18 12:15:44 -05:00
|
|
|
conda env remove -n f4pga-examples
|
2021-05-06 12:39:23 -04:00
|
|
|
|
2021-05-12 17:42:05 -04:00
|
|
|
.PHONY: env format clean
|