aboutsummaryrefslogtreecommitdiff
path: root/firmware/Makefile
diff options
context:
space:
mode:
authorRob Austein <sra@hactrn.net>2016-06-27 11:38:50 -0400
committerRob Austein <sra@hactrn.net>2016-06-27 11:38:50 -0400
commitf7aa0ad426ddfc01f66212a6c4f5cf352400faf2 (patch)
treed55c2e73cb20ade58880123f143ac4e51e911794 /firmware/Makefile
parent5ce361bac89d49a368350e8c475b83e8e6cf0718 (diff)
parenteab67430dc2816993880b4bce0a4639440a12fb7 (diff)
Merged firmware/master.
Diffstat (limited to 'firmware/Makefile')
-rw-r--r--firmware/Makefile35
1 files changed, 35 insertions, 0 deletions
diff --git a/firmware/Makefile b/firmware/Makefile
new file mode 100644
index 0000000..fc98e1d
--- /dev/null
+++ b/firmware/Makefile
@@ -0,0 +1,35 @@
+# Preliminary makefile for releng/alpha/firmware, just to test the
+# basic build sequence before we start messing with packaging scripts,
+# version numbers, and other forms of entertainment. Expect changes.
+
+export GNUPGHOME := /home/aptbot/gnupg
+
+TARBALL := package.tar.gz
+BITSTREAM := core/platform/alpha/build/alpha_fmc.bit
+BINARIES := sw/stm32/projects/bootloader/bootloader.bin sw/stm32/projects/hsm/hsm.bin
+FIRMWARE := ${BITSTREAM} ${BINARIES} ${BINARIES:.bin=.elf}
+RTLSOURCE := $(shell find core -name .git -prune -o -path core/platform/alpha/build -prune -o -type f -print)
+
+all: bitstream elves package
+
+bitstream: ${BITSTREAM}
+
+${BITSTREAM}: ${RTLSOURCE}
+ cd core/platform/alpha/build; ${MAKE}
+
+${BINARIES}: elves
+
+elves:
+ cd sw/stm32; ${MAKE} bootloader hsm
+
+package: ${TARBALL}
+
+${TARBALL}: ${FIRMWARE}
+ ./build-package.py $(basename $@) $^
+ gzip -9f $(basename $@)
+
+clean:
+ git clean -dfx
+ git submodule foreach git clean -dfx
+
+.PHONY: all bitstream elves package clean