move to Makefile
Mockband / build (push) Successful in 33s
Details
Mockband / build (push) Successful in 33s
Details
This commit is contained in:
parent
da45584955
commit
5f44832151
|
@ -10,8 +10,8 @@ jobs:
|
|||
- name: check out repository
|
||||
run: git clone -b $GITHUB_REF_NAME $GITHUB_SERVER_URL/$GITHUB_REPOSITORY .
|
||||
- name: build
|
||||
run: .gitea/build.sh
|
||||
run: make
|
||||
- name: publish
|
||||
env:
|
||||
PACKAGE_API_TOKEN: ${{ secrets.PACKAGE_API_TOKEN }}
|
||||
run: .gitea/publish.sh out/*
|
||||
run: make publish
|
||||
|
|
|
@ -1,2 +1,3 @@
|
|||
*.zip
|
||||
*.hex
|
||||
build/
|
||||
|
|
44
Makefile
44
Makefile
|
@ -1,35 +1,37 @@
|
|||
DEVICE=/dev/ttyACM0
|
||||
|
||||
all:
|
||||
|
||||
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
|
||||
|
||||
firmwares += build/MockBand.guitar.hex
|
||||
build/MockBand.guitar.hex: VID=0x1bad
|
||||
build/MockBand.guitar.hex: PID=0x0004
|
||||
|
||||
firmwares += build/MockBand.drums.hex
|
||||
build/MockBand.drums.hex: VID=0x1bad
|
||||
build/MockBand.drums.hex: PID=0x3110
|
||||
|
||||
all: $(firmwares)
|
||||
|
||||
firmwares += out/MockBand.guitar-wammy.hex
|
||||
out/MockBand.guitar-wammy.hex: VID=0x1bad
|
||||
out/MockBand.guitar-wammy.hex: PID=0x000f
|
||||
out/MockBand.guitar-wammy.hex: FLAGS=-DWAMMY
|
||||
|
||||
firmwares += out/MockBand.guitar.hex
|
||||
out/MockBand.guitar.hex: VID=0x1bad
|
||||
out/MockBand.guitar.hex: PID=0x000f
|
||||
|
||||
firmwares += out/MockBand.drums.hex
|
||||
out/MockBand.guitar.hex: VID=0x1bad
|
||||
out/MockBand.guitar.hex: PID=0x3110
|
||||
|
||||
out/MockBand.%.hex: MockBand.ino
|
||||
rm -rf build
|
||||
build/MockBand.%.hex: MockBand.ino
|
||||
mkdir -p build/cache
|
||||
rm -f build/build.options.json
|
||||
arduino-builder \
|
||||
-build-path $(path)/build/ \
|
||||
-build-cache $(path)/build/cache/ \
|
||||
-build-path $(abspath build/) \
|
||||
-build-cache $(abspath build/cache/) \
|
||||
-fqbn arduino:avr:leonardo \
|
||||
-hardware /usr/share/arduino/hardware/ \
|
||||
-tools /usr/share/arduino/tools/ \
|
||||
-prefs="build.extra_flags=-DUSB_VID=$(VID) -DUSB_PID=$(PID) -DUSB_PRODUCT=\"Mockband $*\" -DUSB_MANUFACTURER=\"woozle.org\" -DCDC_DISABLED $(FLAGS)" \
|
||||
-prefs="build.extra_flags=-DUSB_VID=$(VID) -DUSB_PID=$(PID) '-DUSB_PRODUCT=\"Mockband $*\"' -DUSB_MANUFACTURER=\"woozle.org\" -DCDC_DISABLED $(FLAGS)" \
|
||||
-compile $<
|
||||
mkdir -p out
|
||||
mv build/MockBand.ino.hex $@
|
||||
|
||||
flash-%: out/MockBand.%.hex
|
||||
|
||||
flash-%: build/MockBand.%.hex
|
||||
while [ ! -e $(DEVICE) ]; do echo Waiting for $(DEVICE)...; sleep 1; done
|
||||
avrdude -v -patmega32u4 -cavr109 -P$(DEVICE) -b57600 -D -Uflash:w:$<:i
|
||||
|
||||
|
@ -37,5 +39,5 @@ publish: $(firmwares)
|
|||
.gitea/publish.sh $^
|
||||
|
||||
clean:
|
||||
rm -rf out build
|
||||
rm -rf build
|
||||
|
||||
|
|
Loading…
Reference in New Issue