wordclock/src/Makefile

36 lines
990 B
Makefile
Raw Permalink Normal View History

# Copyright 2020 Google LLC
#
# 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
#
# https://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.
2024-03-01 17:13:18 +01:00
SRC = $(wildcard *.py) $(wildcard lib/*.py)
2018-12-10 15:53:00 +01:00
MPY_CROSS = ../third_party/micropython/mpy-cross/build/mpy-cross
put: $(SRC:%.py=build/put-%.stamp)
2018-12-10 15:53:00 +01:00
ampy -p /dev/ttyUSB? ls
2024-03-01 17:13:18 +01:00
build/put-%.stamp: %.py
mkdir -p $(@D)
ampy -p /dev/ttyUSB? put $< $(<F)
touch -r $< $@
build/%.mpy: %.py $(MPY_CROSS)
mkdir -p $(@D)
$(MPY_CROSS) -O1 -march=xtensa -o $@ $<
$(MPY_CROSS):
$(MAKE) -C $(dir $(@D))
clean:
rm -rf build