summaryrefslogtreecommitdiffstats
path: root/nuttx/arch/sim
diff options
context:
space:
mode:
authorpatacongo <patacongo@7fd9a85b-ad96-42d3-883c-3090e2eb8679>2011-11-28 22:48:31 +0000
committerpatacongo <patacongo@7fd9a85b-ad96-42d3-883c-3090e2eb8679>2011-11-28 22:48:31 +0000
commitbb0603622922ea60420c0a4215c9a87c7e81bc66 (patch)
tree8bee3075593f62f2dc28dffac93635f4fd6b4b6e /nuttx/arch/sim
parent7ccbe6a7f8045f521466fcdd18b3ff1f7f9bef66 (diff)
Fix error in sim build
git-svn-id: https://nuttx.svn.sourceforge.net/svnroot/nuttx/trunk@4127 7fd9a85b-ad96-42d3-883c-3090e2eb8679
Diffstat (limited to 'nuttx/arch/sim')
-rw-r--r--nuttx/arch/sim/src/Makefile17
1 files changed, 15 insertions, 2 deletions
diff --git a/nuttx/arch/sim/src/Makefile b/nuttx/arch/sim/src/Makefile
index 108a2bebd6..bf26b32a9c 100644
--- a/nuttx/arch/sim/src/Makefile
+++ b/nuttx/arch/sim/src/Makefile
@@ -104,10 +104,23 @@ endif
STDLIBS += -lc
+# Determine which objects are required in the link. The
+# up_head object normally draws in all that is needed, but
+# there are a fews that must be included because they
+# are called only from the host OS-specific logic (HOSTOBJS)
+
+LINKOBJS = up_head$(OBJEXT)
+REQUIREDOBJS = $(LINKOBJS)
+
+ifeq ($(CONFIG_SIM_X11FB),y)
+ifeq ($(CONFIG_SIM_TOUCHSCREEN),y)
+ REQUIREDOBJS += up_touchscreen.o
+endif
+endif
+
# Determine which NuttX libraries will need to be linked in
# Most are provided by LINKLIBS on the MAKE command line
-LINKOBJS = up_head$(OBJEXT)
LINKLIBS =
LDPATHS = $(addprefix -L$(TOPDIR)/,$(dir $(LINKLIBS)))
LDLIBS = $(patsubst lib%,-l%,$(basename $(notdir $(LINKLIBS))))
@@ -160,7 +173,7 @@ Cygwin-names.dat: nuttx-names.dat
nuttx.rel : libarch$(LIBEXT) board/libboard$(LIBEXT) $(HOSTOS)-names.dat $(LINKOBJS)
@echo "LD: nuttx.rel"
- @$(LD) -r $(LDFLAGS) $(LDPATHS) -o $@ $(LINKOBJS) --start-group $(LDLIBS) --end-group $(EXTRA_LIBS)
+ @$(LD) -r $(LDFLAGS) $(LDPATHS) -o $@ $(REQUIREDOBJS) --start-group $(LDLIBS) --end-group $(EXTRA_LIBS)
@$(OBJCOPY) --redefine-syms=$(HOSTOS)-names.dat $@
# Generate the final NuttX binary by linking the host-specific objects with the NuttX