summaryrefslogtreecommitdiff
path: root/nuttx/arch/arm/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/arm/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/arm/src')
-rw-r--r--nuttx/arch/arm/src/Makefile37
1 files changed, 26 insertions, 11 deletions
diff --git a/nuttx/arch/arm/src/Makefile b/nuttx/arch/arm/src/Makefile
index 49fabb708..8505ec2be 100644
--- a/nuttx/arch/arm/src/Makefile
+++ b/nuttx/arch/arm/src/Makefile
@@ -33,6 +33,7 @@
#
############################################################################
+-include $(TOPDIR)/.config
-include $(TOPDIR)/Make.defs
-include chip/Make.defs
@@ -76,18 +77,32 @@ EXTRA_LIBS ?=
EXTRA_LIBPATHS ?=
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}"
GCC_LIBDIR := ${shell dirname $(LIBGCC)}
@@ -137,9 +152,9 @@ endif
# Dependencies
.depend: Makefile chip/Make.defs $(SRCS)
- $(Q) if [ -e board/Makefile ]; then \
- $(MAKE) -C board TOPDIR="$(TOPDIR)" depend ; \
- fi
+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
$(Q) touch $@
@@ -147,16 +162,16 @@ endif
depend: .depend
clean:
- $(Q) if [ -e board/Makefile ]; then \
- $(MAKE) -C board TOPDIR="$(TOPDIR)" clean ; \
- fi
+ifneq ($(BOARDDIR),)
+ $(MAKE) -C board TOPDIR="$(TOPDIR)" clean
+endif
$(Q) rm -f libarch$(LIBEXT) *~ .*.swp
$(call CLEAN)
distclean: clean
- $(Q) if [ -e board/Makefile ]; then \
- $(MAKE) -C board TOPDIR="$(TOPDIR)" distclean ; \
- fi
+ifneq ($(BOARDDIR),)
+ $(MAKE) -C board TOPDIR="$(TOPDIR)" distclean
+endif
$(Q) rm -f Make.dep .depend
-include Make.dep