diff options
author | patacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3> | 2012-11-14 15:55:07 +0000 |
---|---|---|
committer | patacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3> | 2012-11-14 15:55:07 +0000 |
commit | 7213ccf4de665ee7f1cd215ebee3f85787b6cd5f (patch) | |
tree | ae0d6313e5df1e26bb657c913b105b20aba92420 /nuttx/arch/mips | |
parent | 81caf90b8d140d580a969a07f0659a9a32f8624f (diff) | |
download | px4-firmware-7213ccf4de665ee7f1cd215ebee3f85787b6cd5f.tar.gz px4-firmware-7213ccf4de665ee7f1cd215ebee3f85787b6cd5f.tar.bz2 px4-firmware-7213ccf4de665ee7f1cd215ebee3f85787b6cd5f.zip |
More native build fixes -- still problems in apps/ directory
git-svn-id: http://svn.code.sf.net/p/nuttx/code/trunk@5352 42af7a65-404d-4744-a932-0658087f49c3
Diffstat (limited to 'nuttx/arch/mips')
-rw-r--r-- | nuttx/arch/mips/src/Makefile | 39 |
1 files changed, 25 insertions, 14 deletions
diff --git a/nuttx/arch/mips/src/Makefile b/nuttx/arch/mips/src/Makefile index 8d02ac59c..14388a90d 100644 --- a/nuttx/arch/mips/src/Makefile +++ b/nuttx/arch/mips/src/Makefile @@ -36,21 +36,32 @@ -include $(TOPDIR)/Make.defs -include chip/Make.defs -ARCH_SRCDIR = $(TOPDIR)/arch/$(CONFIG_ARCH)/src ifeq ($(CONFIG_ARCH_MIPS),y) ARCH_SUBDIR = mips32 endif +ifeq ($(CONFIG_WINDOWS_NATIVE),y) + ARCH_SRCDIR = $(TOPDIR)\arch\$(CONFIG_ARCH)\src + NUTTX = $(TOPDIR)\nuttx$(EXEEXT) + CFLAGS += -I$(ARCH_SRCDIR)\chip + CFLAGS += -I$(ARCH_SRCDIR)\common + CFLAGS += -I$(ARCH_SRCDIR)\$(ARCH_SUBDIR) + CFLAGS += -I$(TOPDIR)\sched +else + ARCH_SRCDIR = $(TOPDIR)/arch/$(CONFIG_ARCH)/src ifeq ($(WINTOOL),y) - NUTTX = "${shell cygpath -w $(TOPDIR)/nuttx}" - CFLAGS += -I "${shell cygpath -w $(ARCH_SRCDIR)/chip}" \ - -I "${shell cygpath -w $(ARCH_SRCDIR)/common}" \ - -I "${shell cygpath -w $(ARCH_SRCDIR)/$(ARCH_SUBDIR)}" \ - -I "${shell cygpath -w $(TOPDIR)/sched}" + NUTTX = "${shell cygpath -w $(TOPDIR)/nuttx$(EXEEXT)}" + CFLAGS += -I "${shell cygpath -w $(ARCH_SRCDIR)/chip}" + CFLAGS += -I "${shell cygpath -w $(ARCH_SRCDIR)/common}" + CFLAGS += -I "${shell cygpath -w $(ARCH_SRCDIR)/$(ARCH_SUBDIR)}" + CFLAGS += -I "${shell cygpath -w $(TOPDIR)/sched}" else - NUTTX = $(TOPDIR)/nuttx - CFLAGS += -I$(ARCH_SRCDIR)/chip -I$(ARCH_SRCDIR)/common \ - -I$(ARCH_SRCDIR)/$(ARCH_SUBDIR) -I$(TOPDIR)/sched + NUTTX = $(TOPDIR)/nuttx$(EXEEXT) + CFLAGS += -I$(ARCH_SRCDIR)/chip + CFLAGS += -I$(ARCH_SRCDIR)/common + CFLAGS += -I$(ARCH_SRCDIR)/$(ARCH_SUBDIR) + CFLAGS += -I$(TOPDIR)/sched +endif endif HEAD_OBJ = $(HEAD_ASRC:.S=$(OBJEXT)) @@ -69,14 +80,14 @@ EXTRA_LIBS ?= LINKLIBS ?= ifeq ($(CONFIG_WINDOWS_NATIVE),y) - BOARDMAKE = ${shell if exist "$(TOPDIR)\arch\$(CONFIG_ARCH)\src\board\Makefile" (echo "y")} - LIBPATHS += -L"${shell cygpath -w "$(TOPDIR)\lib"}" + BOARDMAKE = $(if $(wildcard .\board\Makefile),y,) + LIBPATHS += -L"$(TOPDIR)\lib" ifeq ($(BOARDMAKE),y) - LIBPATHS += -L"${shell cygpath -w "$(TOPDIR)\arch\$(CONFIG_ARCH)\src\board"}" + LIBPATHS += -L"$(TOPDIR)\arch\$(CONFIG_ARCH)\src\board" endif else - BOARDMAKE := ${shell if [ -r "$(TOPDIR)/arch/$(CONFIG_ARCH)/src/board/Makefile" ]; then echo "y"; fi} + BOARDMAKE = $(if $(wildcard ./board/Makefile),y,) ifeq ($(WINTOOL),y) LIBPATHS += -L"${shell cygpath -w "$(TOPDIR)/lib"}" @@ -117,7 +128,7 @@ libarch$(LIBEXT): $(OBJS) board/libboard$(LIBEXT): $(Q) $(MAKE) -C board TOPDIR="$(TOPDIR)" libboard$(LIBEXT) EXTRADEFINES=$(EXTRADEFINES) -nuttx: $(HEAD_OBJ) board/libboard$(LIBEXT) +nuttx$(EXEEXT): $(HEAD_OBJ) board/libboard$(LIBEXT) @echo "LD: nuttx" $(Q) $(LD) --entry=__start $(LDFLAGS) $(LIBPATHS) -o $(NUTTX)$(EXEEXT) $(HEAD_OBJ) $(EXTRA_OBJS) \ --start-group $(LDLIBS) $(EXTRA_LIBS) $(LIBGCC) --end-group |