forked from DeqingSun/ch55xduino
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile.sdcc
More file actions
56 lines (42 loc) · 1.23 KB
/
Makefile.sdcc
File metadata and controls
56 lines (42 loc) · 1.23 KB
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
46
47
48
49
50
51
52
53
54
55
56
NAME=sdcc
ifndef COREVERSION
$(error COREVERSION is not set)
endif
ifndef SDCCVERSION
$(error SDCCVERSION is not set)
endif
# Makefile.sdcc
#
# Build the sdcc archive files.
#
# Targets:
#
# - (default):
# build a new tools entry in the parts directory.
# - repack SDCCVERSION=10738 COREVERSION=xx
# repack the snapshot files in the Downloads directory into stipped
# down SDunino minimal packages.
# COREVERSION doesn't matter, but needs to be present.
# where to look for the original SDCC snapshot files
#SNAPSHOTDIR=sdcc-snapshots
# where to put the generated files
SDCCDIR=release/v$(COREVERSION)
PARTSDIR=parts
VERSION=$(SDCCVERSION)
.PHONY: repack
#
### No user serviceable part below here. Only generated content. ########
#
# The filename stem of the tools archives to be generated
# (up to the first dash '-')
TOOLS_STEM=$(SDCCDIR)/$(NAME)
# The individual filenames for the different sdcc archives
SDCC_TARS=$(wildcard $(TOOLS_STEM)-*-$(VERSION).*)
# filename for the new tools entries
TOOLS_ENTRY=$(PARTSDIR)/tools-entry-$(NAME)-$(VERSION).txt
$(TOOLS_ENTRY) : $(SDCC_TARS)
./gen_tools_entry.sh "$(TOOLS_STEM)" "$(VERSION)" "$(COREVERSION)" > $@
repack:
for i in ~/Downloads/sdcc*$(SDCCVERSION)*; do \
./minimize-sdcc.sh $$i; \
done