@@ -24,13 +24,12 @@ SHELL = /bin/sh
24
24
25
25
ROOT_PATH := .
26
26
27
- # PACKAGE_NAME := $(basename $(notdir $(CURDIR)))
27
+ OS ?=$(shell uname -s)
28
+
28
29
PACKAGE_NAME := "CMSIS"
29
- PACKAGE_VERSION := 4.5.0
30
30
31
31
# -----------------------------------------------------------------------------
32
32
# packaging specific
33
- PACKAGE_FOLDER := CMSIS
34
33
35
34
ifeq (postpackaging,$(findstring $(MAKECMDGOALS ) ,postpackaging) )
36
35
PACKAGE_FILENAME =$(PACKAGE_NAME ) -$(PACKAGE_VERSION ) .tar.bz2
@@ -41,12 +40,16 @@ endif
41
40
# end of packaging specific
42
41
# -----------------------------------------------------------------------------
43
42
44
- .PHONY : all clean print_info postpackaging
43
+ .PHONY : all clean cmsis cmsis5 print_info postpackaging
45
44
46
45
# Arduino module packaging:
47
46
# - exclude version control system files, here git files and folders .git, .gitattributes and .gitignore
48
47
# - exclude 'extras' folder
49
- all : clean print_info
48
+ all : cmsis cmsis5
49
+
50
+ cmsis : PACKAGE_VERSION := 4.5.0
51
+ cmsis : PACKAGE_FOLDER := CMSIS
52
+ cmsis : clean print_info
50
53
@echo ----------------------------------------------------------
51
54
@echo " Packaging module."
52
55
tar --exclude=./.gitattributes \
@@ -59,7 +62,34 @@ all: clean print_info
59
62
--exclude=Device/ARM/Documents \
60
63
--exclude=.git \
61
64
-cjf " $( PACKAGE_NAME) -$( PACKAGE_VERSION) .tar.bz2" " $( PACKAGE_FOLDER) "
62
- $(MAKE ) --no-builtin-rules postpackaging -C .
65
+ $(MAKE ) PACKAGE_VERSION=$(PACKAGE_VERSION ) --no-builtin-rules postpackaging -C .
66
+ @echo ----------------------------------------------------------
67
+
68
+ cmsis5 : PACKAGE_VERSION := 5.3.0
69
+ cmsis5 : PACKAGE_FOLDER := CMSIS_5
70
+ cmsis5 : clean print_info
71
+ @echo ----------------------------------------------------------
72
+ @echo " Packaging module."
73
+ tar --exclude=docs \
74
+ --exclude=CMSIS/CoreValidation \
75
+ --exclude=CMSIS/Documentation \
76
+ --exclude=CMSIS/DoxyGen \
77
+ --exclude=CMSIS/NN/Examples \
78
+ --exclude=CMSIS/NN/NN_Lib_Tests \
79
+ --exclude=CMSIS/Pack \
80
+ --exclude=CMSIS/Utilities \
81
+ --exclude=CMSIS/DSP/DSP_Lib_TestSuite \
82
+ --exclude=CMSIS/DSP/Examples \
83
+ --exclude=CMSIS/DSP/Projects \
84
+ --exclude=Device/ARM/Documents \
85
+ --exclude=.git \
86
+ --exclude=.gitignore \
87
+ --exclude=.gitattributes \
88
+ --exclude=manifest \
89
+ --exclude=* .pdf \
90
+ --transform " s|CMSIS_5|CMSIS|" \
91
+ -cjf " $( PACKAGE_NAME) -$( PACKAGE_VERSION) .tar.bz2" " $( PACKAGE_FOLDER) "
92
+ $(MAKE ) PACKAGE_VERSION=$(PACKAGE_VERSION ) --no-builtin-rules postpackaging -C .
63
93
@echo ----------------------------------------------------------
64
94
65
95
clean :
@@ -74,8 +104,10 @@ print_info:
74
104
@echo " CURDIR = $( CURDIR) "
75
105
@echo " OS = $( OS) "
76
106
@echo " SHELL = $( SHELL) "
77
- @echo " PACKAGE_VERSION = $( PACKAGE_VERSION) "
78
107
@echo " PACKAGE_NAME = $( PACKAGE_NAME) "
108
+ @echo " PACKAGE_FOLDER = $( PACKAGE_FOLDER) "
109
+ @echo " PACKAGE_VERSION = $( PACKAGE_VERSION) "
110
+
79
111
80
112
postpackaging :
81
113
@echo " PACKAGE_CHKSUM = $( PACKAGE_CHKSUM) "
0 commit comments