diff options
author | jaseg <git@jaseg.de> | 2020-11-17 19:58:42 +0100 |
---|---|---|
committer | jaseg <git@jaseg.de> | 2020-11-17 19:58:42 +0100 |
commit | 43d49d978ea441e0987eda471ba5744a74ee3c79 (patch) | |
tree | d13e1697fcb5e7f1689806daa26040f13d8b0b38 /Makefile | |
parent | 80835d33fd15ae7c6def03ec2abe15cc01cc2f18 (diff) | |
download | stm32square-43d49d978ea441e0987eda471ba5744a74ee3c79.tar.gz stm32square-43d49d978ea441e0987eda471ba5744a74ee3c79.tar.bz2 stm32square-43d49d978ea441e0987eda471ba5744a74ee3c79.zip |
Makefile: WIP
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 43 |
1 files changed, 43 insertions, 0 deletions
diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..a029670 --- /dev/null +++ b/Makefile @@ -0,0 +1,43 @@ + +BUILDDIR ?= build + +WGET ?= wget +PYTHON ?= python3 + +$(BUILDDIR): + mkdir -p $(BUILDDIR) + +.PRECIOUS: $(BUILDDIR)/%.jar +$(BUILDDIR)/%.jar: + mkdir -p $(BUILDDIR) + $(WGET) --tries=10 -N -O $@ $$($(PYTHON) tools/get_p2_url.py $*) + touch $@ + +$(BUILDDIR)/%.dir: $(BUILDDIR)/%.jar + mkdir -p $@ + rm -rf $@ + unzip -d $@ $< + +.PHONY: update_svd +update_svd: $(BUILDDIR)/com.st.stm32cube.ide.mcu.productdb.debug.dir + rm -rf svd + mkdir -p svd + cp $</resources/cmsis/STMicroelectronics_CMSIS_SVD/{*.svd,License.html} svd/ + +.PHONY: update_xml +update_xml: $(BUILDDIR)/com.st.stm32cube.common.mx.dir + rm -rf mx_mcu_db + mkdir -p mx_mcu_db + cp $</about.html mx_mcu_db/License.html + cp -r $</db/mcu/* mx_mcu_db/ + +update_prog_db: $(BUILDDIR)/com.st.stm32cube.ide.mcu.externaltools.cubeprogrammer.linux64.dir + rm -rf prog_db + mkdir -p prog_db + cp $</about.html prog_db/License.html + cp $</tools/Data_Base/*.xml prog_db/ + +# The following file contains garbage data on the µC's memories. +#stm32targets.xml: $(BUILDDIR)/com.st.stm32cube.ide.mcu.productdb.dir +# cp $</resources/board_def/$@ $@ +#$(BUILDDIR)/com.st.stm32cube.ide.mcu.productdb.dir: |