Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
K
k-sdk
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
陈伟灿
k-sdk
Commits
212af135
Commit
212af135
authored
Jul 28, 2020
by
黄振令
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Author: huang.zhenling
Root Cause: 增加第三方库,直接用第三方的库makefile编译 How2Fix:
parent
3939e5cc
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
30 additions
and
8 deletions
+30
-8
src/midware/iot.mk
src/midware/iot.mk
+1
-0
tools/build-rules/pre-build.sh
tools/build-rules/pre-build.sh
+29
-8
No files found.
src/midware/iot.mk
View file @
212af135
...
...
@@ -8,5 +8,6 @@ CFLAGS += -I$(TOP_DIR)/common/nanomsg/include
CFLAGS
+=
-I
$(TOP_DIR)
/common/ev/include
CFLAGS
+=
-I
$(TOP_DIR)
/common/api
LDFLAGS
+=
-lapi_com
LDFLAGS
+=
-lsqlite
-ldl
LDFLAGS
+=
-L
$(TOP_DIR)
/common/nanomsg
-static
-lnanomsg
-lanl
LDFLAGS
+=
-L
$(TOP_DIR)
/common/ev
-static
-lev
\ No newline at end of file
tools/build-rules/pre-build.sh
View file @
212af135
...
...
@@ -124,6 +124,7 @@ function Update_Sources()
function
Update_Makefile
()
{
BLD_MFILE
=
${
BLD_DIR
}
/
${
HD_MAKEFILE
}
SRC_MFILE
=
${
SRC_DIR
}
/
${
HD_MAKEFILE
}
if
[
${
BLD_MFILE
}
-nt
${
SRC_DIR
}
/
${
MAKE_SEGMENT
}
]
&&
\
[
${
BLD_MFILE
}
-nt
${
STAMP_BLD_ENV
}
]
;
then
...
...
@@ -131,11 +132,27 @@ function Update_Makefile()
fi
rm
-f
${
BLD_MFILE
}
echo
"MODULE_NAME :=
${
MODULE
}
"
>>
${
BLD_MFILE
}
cat
${
STAMP_BLD_ENV
}
>>
${
BLD_MFILE
}
#echo "allan allan ${SRC_MFILE}============================= \n"
if
[
-e
${
SRC_MFILE
}
]
||
[
-e
${
SRC_DIR
}
/Makefile
]
;
then
echo
"allan cp
${
SRC_MFILE
}
to
${
BLD_MFILE
}
===================
\n
"
cp
-rf
${
SRC_DIR
}
/.
${
BLD_DIR
}
/
if
[
-e
${
BLD_DIR
}
/Makefile
]
;
then
mv
${
BLD_DIR
}
/Makefile
${
BLD_DIR
}
/makefile
fi
${
SED
}
-i
's/^all:/modinfo:/g'
${
BLD_MFILE
}
return
0
;
else
#echo "allan no cp!!============\n"
echo
"MODULE_NAME :=
${
MODULE
}
"
>>
${
BLD_MFILE
}
cat
${
STAMP_BLD_ENV
}
>>
${
BLD_MFILE
}
fi
cat
<<
EOB
>>
${
BLD_MFILE
}
include
\$
(RULE_DIR)/settings.mk
include
\$
(CONFIG_TPL)
...
...
@@ -144,11 +161,15 @@ all:
EOB
cp
-f
${
SRC_DIR
}
/
${
MAKE_SEGMENT
}
${
BLD_DIR
}
/
${
MAKE_SEGMENT
}
cat
${
BLD_DIR
}
/
${
MAKE_SEGMENT
}
>>
${
BLD_MFILE
}
${
SED
}
-i
's/clean:/clean : clean-prepare/g'
${
BLD_MFILE
}
if
[
-e
${
SRC_MFILE
}
]
||
[
-e
${
SRC_DIR
}
/Makefile
]
;
then
${
SED
}
-i
's/clean:/clean : modinfo'
${
BLD_MFILE
}
else
cp
-f
${
SRC_DIR
}
/
${
MAKE_SEGMENT
}
${
BLD_DIR
}
/
${
MAKE_SEGMENT
}
cat
${
BLD_DIR
}
/
${
MAKE_SEGMENT
}
>>
${
BLD_MFILE
}
${
SED
}
-i
's/clean:/clean : clean-prepare/g'
${
BLD_MFILE
}
fi
cat
<<
EOB
>>
${
BLD_MFILE
}
env:
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment