make/import: support install nuttx binary in flat build
Change-Id: Iaffa86ee9ebd77380424e6d4a0777262685c989f Signed-off-by: chao.an <anchao@xiaomi.com>
This commit is contained in:
parent
10d596cb8e
commit
c81a1f9711
1
Makefile
1
Makefile
@ -120,6 +120,7 @@ install: $(foreach SDIR, $(CONFIGURED_APPS), $(SDIR)_install)
|
|||||||
import: $(MKDEP) context
|
import: $(MKDEP) context
|
||||||
$(Q) $(MAKE) depend TOPDIR="$(APPDIR)$(DELIM)import"
|
$(Q) $(MAKE) depend TOPDIR="$(APPDIR)$(DELIM)import"
|
||||||
$(Q) $(MAKE) .import TOPDIR="$(APPDIR)$(DELIM)import"
|
$(Q) $(MAKE) .import TOPDIR="$(APPDIR)$(DELIM)import"
|
||||||
|
$(Q) $(MAKE) -C import install TOPDIR="$(APPDIR)$(DELIM)import"
|
||||||
|
|
||||||
endif # CONFIG_BUILD_KERNEL
|
endif # CONFIG_BUILD_KERNEL
|
||||||
|
|
||||||
|
@ -77,7 +77,7 @@ ifeq ($(CONFIG_CYGWIN_WINTOOL),y)
|
|||||||
LDLIBPATH = -L "${shell cygpath -w $(APPDIR)}" -L "${shell cygpath -w $(TOPDIR)$(DELIM)libs}"
|
LDLIBPATH = -L "${shell cygpath -w $(APPDIR)}" -L "${shell cygpath -w $(TOPDIR)$(DELIM)libs}"
|
||||||
else
|
else
|
||||||
# Linux/Cygwin-native toolchain
|
# Linux/Cygwin-native toolchain
|
||||||
LDLIBPATH = -L $(APPDIR) -L $(TOPDIR)$(DELIM)libs
|
LDLIBPATH = -L $(TOPDIR)$(DELIM)libs
|
||||||
endif
|
endif
|
||||||
|
|
||||||
# Try to get the path to libgcc.a. Of course, this only works for GCC
|
# Try to get the path to libgcc.a. Of course, this only works for GCC
|
||||||
|
@ -43,7 +43,17 @@ FILES = .config System.map User.map
|
|||||||
all:
|
all:
|
||||||
.PHONY: context depend clean distclean
|
.PHONY: context depend clean distclean
|
||||||
|
|
||||||
install:
|
APPDIR = $(realpath $(CURDIR)$(DELIM)..)
|
||||||
|
HEAD_OBJ += $(wildcard $(TOPDIR)$(DELIM)startup$(DELIM)*$(OBJEXT))
|
||||||
|
HEAD_OBJ += $(wildcard $(APPDIR)$(DELIM)builtin$(DELIM)*$(OBJEXT))
|
||||||
|
|
||||||
|
$(APPDIR)$(DELIM)nuttx$(EXEEXT): $(wildcard $(APPDIR)$(DELIM)*$(LIBEXT))
|
||||||
|
$(Q) echo "LD: nuttx"
|
||||||
|
$(Q) $(LD) --entry=__start $(LDFLAGS) -T$(LDSCRIPT) $(LIBPATHS) \
|
||||||
|
$(LDLIBPATH) -L$(CURDIR)$(DELIM)scripts -o $@ $(HEAD_OBJ) \
|
||||||
|
$(EXTRA_OBJS) $(LDSTARTGROUP) $^ $(LDLIBS) $(EXTRA_LIBS) $(LDENDGROUP)
|
||||||
|
|
||||||
|
install: $(APPDIR)$(DELIM)nuttx$(EXEEXT)
|
||||||
|
|
||||||
context:
|
context:
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user