mirror of
https://github.com/apache/nuttx-apps.git
synced 2026-08-01 20:29:00 +00:00
[EXPERIMENTAL] Makefile: EXTRA_APPS_LIBS and EXTRA_APPS_INCPATHS vars
The variables are to be used to mainly by the export rule to export external libraries (.a files) and respective include paths. The exported external libraries are packed together in the libapps.a library (basically, every .o files are extracted and then packed together). Signed-off-by: Stepan Pressl <pressl.stepan@gmail.com>
This commit is contained in:
parent
d334c5eb67
commit
ddb1daecd9
1 changed files with 22 additions and 0 deletions
22
Makefile
22
Makefile
|
|
@ -197,6 +197,28 @@ preconfig: Kconfig
|
|||
export:
|
||||
ifneq ($(EXPORTDIR),)
|
||||
$(Q) mkdir -p "${EXPORTDIR}"$(DELIM)registry || exit 1;
|
||||
if [ -n "${EXTRA_APPS_LIBS}" ]; then \
|
||||
mkdir -p $(APPDIR)$(DELIM)libcomb; \
|
||||
cp libapps.a $(APPDIR)$(DELIM)libcomb; \
|
||||
for l in ${EXTRA_APPS_LIBS}; do \
|
||||
echo "AR: $$(basename $${l})"; \
|
||||
cp $${l} $(APPDIR)$(DELIM)libcomb; \
|
||||
done; \
|
||||
cd $(APPDIR)$(DELIM)libcomb; \
|
||||
for l in *.a; do \
|
||||
$(AR_EXTRACT) $${l}; \
|
||||
done; \
|
||||
$(AR) libmerged.a *.o; \
|
||||
mv libmerged.a ..$(DELIM)libapps.a; \
|
||||
cd ..; \
|
||||
rm -rf $(APPDIR)$(DELIM)libcomb; \
|
||||
fi; \
|
||||
for d in ${EXTRA_APPS_INCPATHS}; do \
|
||||
if [ -d "$${d}" ]; then \
|
||||
echo "CP: $$(basename $${d})" ; \
|
||||
cp -r "$${d}" "${EXPORTDIR}"$(DELIM)include ; \
|
||||
fi \
|
||||
done
|
||||
ifneq ($(CONFIG_BUILD_KERNEL),y)
|
||||
ifneq ($(BUILTIN_REGISTRY),)
|
||||
for f in "${BUILTIN_REGISTRY}"$(DELIM)*.bdat "${BUILTIN_REGISTRY}"$(DELIM)*.pdat ; do \
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue