2024-01-05 08:37:03 -07:00
|
|
|
DEVICE=/dev/ttyACM0
|
|
|
|
|
2024-01-05 08:50:10 -07:00
|
|
|
all:
|
2024-01-05 08:37:03 -07:00
|
|
|
|
2024-01-05 08:50:10 -07:00
|
|
|
firmwares += build/MockBand.guitar-wammy.hex
|
|
|
|
build/MockBand.guitar-wammy.hex: VID=0x1bad
|
|
|
|
build/MockBand.guitar-wammy.hex: PID=0x0004
|
|
|
|
build/MockBand.guitar-wammy.hex: FLAGS=-DWAMMY
|
2024-01-05 08:37:03 -07:00
|
|
|
|
2024-01-05 08:50:10 -07:00
|
|
|
firmwares += build/MockBand.guitar.hex
|
|
|
|
build/MockBand.guitar.hex: VID=0x1bad
|
|
|
|
build/MockBand.guitar.hex: PID=0x0004
|
2024-01-05 08:37:03 -07:00
|
|
|
|
2024-01-05 08:50:10 -07:00
|
|
|
firmwares += build/MockBand.drums.hex
|
|
|
|
build/MockBand.drums.hex: VID=0x1bad
|
|
|
|
build/MockBand.drums.hex: PID=0x3110
|
2024-01-05 08:37:03 -07:00
|
|
|
|
2024-01-05 08:50:10 -07:00
|
|
|
all: $(firmwares)
|
|
|
|
|
|
|
|
build/MockBand.%.hex: MockBand.ino
|
2024-01-05 08:37:03 -07:00
|
|
|
mkdir -p build/cache
|
2024-01-05 08:50:10 -07:00
|
|
|
rm -f build/build.options.json
|
2024-01-05 08:37:03 -07:00
|
|
|
arduino-builder \
|
2024-01-05 08:50:10 -07:00
|
|
|
-build-path $(abspath build/) \
|
|
|
|
-build-cache $(abspath build/cache/) \
|
2024-01-05 08:37:03 -07:00
|
|
|
-fqbn arduino:avr:leonardo \
|
|
|
|
-hardware /usr/share/arduino/hardware/ \
|
|
|
|
-tools /usr/share/arduino/tools/ \
|
2024-01-05 08:50:10 -07:00
|
|
|
-prefs="build.extra_flags=-DUSB_VID=$(VID) -DUSB_PID=$(PID) '-DUSB_PRODUCT=\"Mockband $*\"' -DUSB_MANUFACTURER=\"woozle.org\" -DCDC_DISABLED $(FLAGS)" \
|
2024-01-05 08:37:03 -07:00
|
|
|
-compile $<
|
|
|
|
mv build/MockBand.ino.hex $@
|
|
|
|
|
2024-01-05 08:50:10 -07:00
|
|
|
|
|
|
|
flash-%: build/MockBand.%.hex
|
2024-01-05 08:37:03 -07:00
|
|
|
while [ ! -e $(DEVICE) ]; do echo Waiting for $(DEVICE)...; sleep 1; done
|
|
|
|
avrdude -v -patmega32u4 -cavr109 -P$(DEVICE) -b57600 -D -Uflash:w:$<:i
|
|
|
|
|
|
|
|
publish: $(firmwares)
|
|
|
|
.gitea/publish.sh $^
|
|
|
|
|
|
|
|
clean:
|
2024-01-05 08:50:10 -07:00
|
|
|
rm -rf build
|
2024-01-05 08:37:03 -07:00
|
|
|
|