summaryrefslogtreecommitdiff
path: root/nuttx/arch/x86/src
diff options
context:
space:
mode:
authorpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2012-11-11 14:36:01 +0000
committerpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2012-11-11 14:36:01 +0000
commitf7a2c6b5546366aa69a5fe9a44e6df2bcfa4a793 (patch)
tree3eb3c67d85d1218650a3987b0a90c47c8a6a1d6f /nuttx/arch/x86/src
parent448e07b4c109e5281e3d7cfe5239f07e4e2a0b01 (diff)
downloadpx4-nuttx-f7a2c6b5546366aa69a5fe9a44e6df2bcfa4a793.tar.gz
px4-nuttx-f7a2c6b5546366aa69a5fe9a44e6df2bcfa4a793.tar.bz2
px4-nuttx-f7a2c6b5546366aa69a5fe9a44e6df2bcfa4a793.zip
Remove bash fragments that test for board/Makefile
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@5334 42af7a65-404d-4744-a932-0658087f49c3
Diffstat (limited to 'nuttx/arch/x86/src')
-rw-r--r--nuttx/arch/x86/src/Makefile54
1 files changed, 34 insertions, 20 deletions
diff --git a/nuttx/arch/x86/src/Makefile b/nuttx/arch/x86/src/Makefile
index b4aa02fb1..56ba0b257 100644
--- a/nuttx/arch/x86/src/Makefile
+++ b/nuttx/arch/x86/src/Makefile
@@ -68,18 +68,32 @@ LDFLAGS += $(ARCHSCRIPT)
EXTRA_LIBS ?=
LINKLIBS ?=
+ifeq ($(CONFIG_WINDOWS_NATIVE),y)
+ BOARDDIR = $(dir "$(TOPDIR)\arch\$(CONFIG_ARCH)\src\board\Makefile")
+ LIBPATHS += -L"${shell cygpath -w "$(TOPDIR)\lib"}"
+ifneq ($(BOARDDIR),)
+ LIBPATHS += -L"${shell cygpath -w $(BOARDDIR)}"
+endif
+
+else
+ BOARDDIR = $(dir "$(TOPDIR)/arch/$(CONFIG_ARCH)/src/board/Makefile")
+
ifeq ($(WINTOOL),y)
LIBPATHS += -L"${shell cygpath -w "$(TOPDIR)/lib"}"
+ifneq ($(BOARDDIR),)
LIBPATHS += -L"${shell cygpath -w $(BOARDDIR)}"
+endif
+
else
LIBPATHS += -L"(TOPDIR)/lib"
+ifneq ($(BOARDDIR),)
LIBPATHS += -L"$(BOARDDIR)"
endif
+endif
+endif
LDLIBS = $(patsubst %.a,%,$(patsubst lib%,-l%,$(LINKLIBS)))
-BOARDDIR = $(TOPDIR)/arch/$(CONFIG_ARCH)/src/board
-
LIBGCC = "${shell $(CC) $(ARCHCPUFLAGS) -print-libgcc-file-name}"
ifeq ($(HOSTOS),FreeBSD)
@@ -103,25 +117,25 @@ $(COBJS): %$(OBJEXT): %.c
$(call COMPILE, $<, $@)
libarch$(LIBEXT): $(OBJS)
- @( for obj in $(OBJS) ; do \
+ $(Q) ( for obj in $(OBJS) ; do \
$(call ARCHIVE, $@, $${obj}); \
done ; )
board/libboard$(LIBEXT):
- @$(MAKE) -C board TOPDIR="$(TOPDIR)" libboard$(LIBEXT) EXTRADEFINES=$(EXTRADEFINES)
+ $(Q) $(MAKE) -C board TOPDIR="$(TOPDIR)" libboard$(LIBEXT) EXTRADEFINES=$(EXTRADEFINES)
nuttx$(EXEEXT): $(HEAD_OBJ) board/libboard$(LIBEXT)
@echo "LD: nuttx$(EXEEXT)"
- @$(LD) --entry=__start $(LDFLAGS) $(LIBPATHS) -o $(NUTTX)$(EXEEXT) $(HEAD_OBJ) $(EXTRA_OBJS) \
+ $(Q) $(LD) --entry=__start $(LDFLAGS) $(LIBPATHS) -o $(NUTTX)$(EXEEXT) $(HEAD_OBJ) $(EXTRA_OBJS) \
--start-group $(LDLIBS) -lboard $(EXTRA_LIBS) $(LIBGCC) --end-group
- @$(NM) $(NUTTX)$(EXEEXT) | \
+ $(Q) $(NM) $(NUTTX)$(EXEEXT) | \
grep -v '\(compiled\)\|\(\$(OBJEXT)$$\)\|\( [aUw] \)\|\(\.\.ng$$\)\|\(LASH[RL]DI\)' | \
sort > $(TOPDIR)/System.map
# This is part of the top-level export target
export_head: board/libboard$(LIBEXT) $(HEAD_OBJ)
- @if [ -d "$(EXPORT_DIR)/startup" ]; then \
+ $(Q) if [ -d "$(EXPORT_DIR)/startup" ]; then \
cp -f $(HEAD_OBJ) "$(EXPORT_DIR)/startup"; \
else \
echo "$(EXPORT_DIR)/startup does not exist"; \
@@ -131,26 +145,26 @@ export_head: board/libboard$(LIBEXT) $(HEAD_OBJ)
# Dependencies
.depend: Makefile chip/Make.defs $(SRCS)
- @if [ -e board/Makefile ]; then \
- $(MAKE) -C board TOPDIR="$(TOPDIR)" depend ; \
- fi
- @$(MKDEP) --dep-path chip --dep-path common --dep-path $(ARCH_SUBDIR) \
+ifneq ($(BOARDDIR),)
+ $(Q) $(MAKE) -C board TOPDIR="$(TOPDIR)" depend
+endif
+ $(Q) $(MKDEP) --dep-path chip --dep-path common --dep-path $(ARCH_SUBDIR) \
$(CC) -- $(CFLAGS) -- $(SRCS) >Make.dep
- @touch $@
+ $(Q) touch $@
depend: .depend
clean:
- @if [ -e board/Makefile ]; then \
- $(MAKE) -C board TOPDIR="$(TOPDIR)" clean ; \
- fi
- @rm -f libarch$(LIBEXT) *~ .*.swp
+ifneq ($(BOARDDIR),)
+ $(Q) $(MAKE) -C board TOPDIR="$(TOPDIR)" clean
+endif
+ $(Q) rm -f libarch$(LIBEXT) *~ .*.swp
$(call CLEAN)
distclean: clean
- @if [ -e board/Makefile ]; then \
- $(MAKE) -C board TOPDIR="$(TOPDIR)" distclean ; \
- fi
- @rm -f Make.dep .depend
+ifneq ($(BOARDDIR),)
+ $(Q) $(MAKE) -C board TOPDIR="$(TOPDIR)" distclean
+endif
+ $(Q) rm -f Make.dep .depend
-include Make.dep