Skip to content

Commit 406f540

Browse files
committed
makefile for package creation
1 parent 2b1eede commit 406f540

File tree

3 files changed

+36
-2
lines changed

3 files changed

+36
-2
lines changed

.gitignore

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,4 +16,6 @@ example_har_smartphone/MIDE_EM/.settings/*
1616
*.db
1717
.project
1818
.vscode
19-
obj/*.d
19+
obj/*
20+
bin/*
21+
package.zip

build/rules.mk

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ CLOSE_PAREN=)
1515
BACKSLASH=\$(nullstring)
1616
ifneq ($(ComSpec)$(COMSPEC),)
1717
O_SYS=Windows
18-
RM=del /F /Q
18+
RM=del /F /Q /S
1919
MKDIR=mkdir
2020
CP=copy /Y
2121
TYPE=type

lib/make/package.mk

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
#
2+
# Copyright 2020, Synopsys, Inc.
3+
# All rights reserved.
4+
#
5+
# This source code is licensed under the BSD-3-Clause license found in
6+
# the LICENSE file in the root directory of this source tree.
7+
#
8+
9+
PLATFORMLIST = em9d
10+
11+
LIB_DIR = ../../bin
12+
LIB_NAME = libmli.a
13+
TCF_DIR = ../../hw
14+
LIB_LIST = $(addsuffix /$(LIB_NAME), $(addprefix $(LIB_DIR)/, $(PLATFORMLIST)) )
15+
16+
include ../../build/rules.mk
17+
18+
19+
$(LIB_LIST) : $(LIB_DIR)/%/$(LIB_NAME): $(TCF_DIR)/%.tcf
20+
gmake TCF_FILE=$< BUILD_DIR=../../obj/$* LIBRARY_DIR=$(LIB_DIR)/$*
21+
22+
23+
package_content: $(LIB_LIST)
24+
25+
package: package_content
26+
cd ../../ & zip package.zip -r include bin & cd lib/make
27+
28+
clean:
29+
@echo Cleaning package...
30+
-@$(RM) $(call fix_platform_path,$(LIB_DIR))
31+
-@$(RM) $(call fix_platform_path,../../obj)
32+
-@$(RM) $(call fix_platform_path,../../package.zip)

0 commit comments

Comments
 (0)