mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-11-02 03:31:37 +08:00
The ELF loader is basically functional (needs more testing)
git-svn-id: http://svn.code.sf.net/p/nuttx/code/trunk@5265 42af7a65-404d-4744-a932-0658087f49c3
This commit is contained in:
+21
-15
@@ -39,29 +39,29 @@ include $(APPDIR)/Make.defs
|
||||
|
||||
# ELF Example
|
||||
|
||||
ASRCS =
|
||||
CSRCS = elf_main.c
|
||||
ASRCS =
|
||||
CSRCS = elf_main.c symtab.c
|
||||
|
||||
AOBJS = $(ASRCS:.S=$(OBJEXT))
|
||||
COBJS = $(CSRCS:.c=$(OBJEXT))
|
||||
AOBJS = $(ASRCS:.S=$(OBJEXT))
|
||||
COBJS = $(CSRCS:.c=$(OBJEXT))
|
||||
|
||||
SRCS = $(ASRCS) $(CSRCS)
|
||||
OBJS = $(AOBJS) $(COBJS)
|
||||
SRCS = $(ASRCS) $(CSRCS)
|
||||
OBJS = $(AOBJS) $(COBJS)
|
||||
|
||||
ifeq ($(WINTOOL),y)
|
||||
BIN = "${shell cygpath -w $(APPDIR)/libapps$(LIBEXT)}"
|
||||
BIN = "${shell cygpath -w $(APPDIR)/libapps$(LIBEXT)}"
|
||||
else
|
||||
BIN = "$(APPDIR)/libapps$(LIBEXT)"
|
||||
BIN = "$(APPDIR)/libapps$(LIBEXT)"
|
||||
endif
|
||||
|
||||
ROOTDEPPATH = --dep-path .
|
||||
ROOTDEPPATH = --dep-path . --dep-path tests
|
||||
|
||||
# Common build
|
||||
# Build targets
|
||||
|
||||
VPATH =
|
||||
VPATH = tests
|
||||
|
||||
all: .built
|
||||
.PHONY: headers clean_tests clean depend disclean
|
||||
.PHONY: really_build clean_tests clean depend disclean
|
||||
|
||||
$(AOBJS): %$(OBJEXT): %.S
|
||||
$(call ASSEMBLE, $<, $@)
|
||||
@@ -69,15 +69,21 @@ $(AOBJS): %$(OBJEXT): %.S
|
||||
$(COBJS): %$(OBJEXT): %.c
|
||||
$(call COMPILE, $<, $@)
|
||||
|
||||
headers:
|
||||
@$(MAKE) -C tests TOPDIR="$(TOPDIR)" APPDIR="$(APPDIR)" CROSSDEV=$(CROSSDEV)
|
||||
# This is a little messy. The build is broken into two pieces: (1) the
|
||||
# tests/ subdir build that auto-generates several files, and (2) the real
|
||||
# build. This is done because we need a fresh build context after auto-
|
||||
# generating the source files.
|
||||
|
||||
.built: headers $(OBJS)
|
||||
really_build: $(OBJS)
|
||||
@( for obj in $(OBJS) ; do \
|
||||
$(call ARCHIVE, $(BIN), $${obj}); \
|
||||
done ; )
|
||||
@touch .built
|
||||
|
||||
.built:
|
||||
@$(MAKE) -C tests TOPDIR="$(TOPDIR)" APPDIR="$(APPDIR)" CROSSDEV=$(CROSSDEV)
|
||||
@$(MAKE) TOPDIR="$(TOPDIR)" APPDIR="$(APPDIR)" really_build
|
||||
|
||||
context:
|
||||
|
||||
# We can't make dependencies in this directory because the required
|
||||
|
||||
Reference in New Issue
Block a user