Skip to content

Commit 92d1b43

Browse files
committed
add license file and package folder to mli package
1 parent 7026ad0 commit 92d1b43

File tree

2 files changed

+16
-7
lines changed

2 files changed

+16
-7
lines changed

build/rules.mk

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,11 @@ CLOSE_PAREN=)
1515
BACKSLASH=\$(nullstring)
1616
ifneq ($(ComSpec)$(COMSPEC),)
1717
O_SYS=Windows
18-
RM=del /F /Q /S
18+
RM=del /F /Q
19+
RMDIR=rmdir /Q /S
1920
MKDIR=mkdir
2021
CP=copy /Y
22+
CPR=xcopy /I /E /Y
2123
TYPE=type
2224
PS=$(BACKSLASH)
2325
Q=
@@ -27,8 +29,10 @@ ifneq ($(ComSpec)$(COMSPEC),)
2729
else
2830
O_SYS=Unix
2931
RM=rm -rf
32+
RMDIR=rm -rf
3033
MKDIR=mkdir -p
31-
CP=cp
34+
CP=cp
35+
CPR= cp -r
3236
TYPE=cat
3337
PS=/
3438
Q=$(BACKSLASH)

lib/make/package.mk

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ LIB_DIR = ../../bin
1717
LIB_NAME = libmli.a
1818
TCF_DIR = ../../hw
1919
LIB_LIST = $(addsuffix /$(LIB_NAME), $(addprefix $(LIB_DIR)/, $(PLATFORMLIST)) )
20-
20+
PKG_NAME = embARC_MLI_package
2121
include ../../build/rules.mk
2222

2323

@@ -29,10 +29,15 @@ $(LIB_LIST) : $(LIB_DIR)/%/$(LIB_NAME): $(TCF_DIR)/%.tcf
2929
package_content: $(LIB_LIST)
3030

3131
package: package_content
32-
cd ../../ & zip package.zip -r include bin & cd lib/make
32+
-cd ../.. & $(MKDIR) $(PKG_NAME)
33+
$(CPR) $(call fix_platform_path,../../include) $(call fix_platform_path,../../$(PKG_NAME)/include/)
34+
$(CPR) $(call fix_platform_path,../../bin) $(call fix_platform_path,../../$(PKG_NAME)/bin/)
35+
$(CP) $(call fix_platform_path,../../LICENSE) $(call fix_platform_path,../../$(PKG_NAME)/LICENSE)
36+
cd ../.. & zip $(PKG_NAME).zip -r $(PKG_NAME)
37+
$(RMDIR) $(call fix_platform_path,../../$(PKG_NAME))
3338

3439
clean:
3540
@echo Cleaning package...
36-
-@$(RM) $(call fix_platform_path,$(LIB_DIR))
37-
-@$(RM) $(call fix_platform_path,../../obj)
38-
-@$(RM) $(call fix_platform_path,../../package.zip)
41+
-@$(RMDIR) $(call fix_platform_path,$(LIB_DIR))
42+
-@$(RMDIR) $(call fix_platform_path,../../obj)
43+
-@$(RM) $(call fix_platform_path,../../$(PKG_NAME).zip)

0 commit comments

Comments
 (0)