summaryrefslogtreecommitdiff
path: root/contrib/Makefile
blob: 8e94812b74598ae8da024f13a43e211fdad6f311 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
##
##  spreadspace stm8 utils
##
##
##  Copyright (C) 2017 Christian Pointner <equinox@spreadspace.org>
##
##  This file is part of spreadspace stm8 utils.
##
##  spreadspace stm8 utils is free software: you can redistribute it and/or modify
##  it under the terms of the GNU General Public License as published by
##  the Free Software Foundation, either version 3 of the License, or
##  any later version.
##
##  spreadspace stm8 utils is distributed in the hope that it will be useful,
##  but WITHOUT ANY WARRANTY; without even the implied warranty of
##  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
##  GNU General Public License for more details.
##
##  You should have received a copy of the GNU General Public License
##  along with spreadspace stm8 utils. If not, see <http://www.gnu.org/licenses/>.
##

all: download-spl update-stm8flash update-stm8_serial_flasher
doxygen := $(shell which doxygen)

download-spl: stsw-stm8069.zip

stsw-stm8069.zip:
	wget "http://www.st.com/st-web-ui/static/active/en/st_prod_software_internet/resource/technical/software/firmware/stsw-stm8069.zip" -O "$@"
	unzip $@
	cd STM8S_StdPeriph_Lib; patch -p1 < ../STM8_SPL_v2.2.0_SDCC.patch; $(doxygen)

.stm8flash.prepared:
	git clone https://github.com/vdudouyt/stm8flash.git
	touch $@

update-stm8flash: .stm8flash.prepared
	cd stm8flash; git pull; make

.stm8_serial_flasher.prepared:
	git clone https://github.com/gicking/STM8_serial_flasher.git
	touch $@

update-stm8_serial_flasher: .stm8_serial_flasher.prepared
	cd STM8_serial_flasher; git pull; make