summaryrefslogtreecommitdiff
path: root/apps/platform
diff options
context:
space:
mode:
authorGregory Nutt <gnutt@nuttx.org>2013-11-02 11:04:12 -0600
committerGregory Nutt <gnutt@nuttx.org>2013-11-02 11:04:12 -0600
commit84e354cfd85825e5007b79d199380117424f3a5e (patch)
treee3802bb133a904f6e3e7084b1b6c96db40f315fd /apps/platform
parentb3053774d6c60a998a0e582adcb11384fcbd686e (diff)
downloadnuttx-84e354cfd85825e5007b79d199380117424f3a5e.tar.gz
nuttx-84e354cfd85825e5007b79d199380117424f3a5e.tar.bz2
nuttx-84e354cfd85825e5007b79d199380117424f3a5e.zip
apps/platform/Makefile was not dealing with the bin subdirectory correctly
Diffstat (limited to 'apps/platform')
-rw-r--r--apps/platform/.gitignore3
-rw-r--r--apps/platform/Makefile17
-rw-r--r--apps/platform/bin/.gitignore8
3 files changed, 18 insertions, 10 deletions
diff --git a/apps/platform/.gitignore b/apps/platform/.gitignore
index 4847299eb..7c70d67ec 100644
--- a/apps/platform/.gitignore
+++ b/apps/platform/.gitignore
@@ -1,4 +1,5 @@
/.built
-/Make.defs
+/.depend
+/Make.dep
board
diff --git a/apps/platform/Makefile b/apps/platform/Makefile
index 73c1580b5..02b055b50 100644
--- a/apps/platform/Makefile
+++ b/apps/platform/Makefile
@@ -51,7 +51,6 @@ endif
# Directories
-BINDIR = $(APPDIR)$(DELIM)platform$(DELIM)bin
PLATFORMDIR = $(APPDIR)$(DELIM)platform$(DELIM)board
DUMMYDIR = $(APPDIR)$(DELIM)platform$(DELIM)dummy
BOARDDIR = $(APPDIR)$(DELIM)platform$(DELIM)$(CONFIG_ARCH_BOARD)
@@ -66,8 +65,8 @@ CSRCS =
-include $(PLATFORMDIR)$(DELIM)Make.defs
-AOBJS = $(ASRCS:.S=$(OBJEXT))
-COBJS = $(CSRCS:.c=$(OBJEXT))
+AOBJS = $(patsubst %.S, bin$(DELIM)%$(OBJEXT), $(ASRCS))
+COBJS = $(patsubst %.c, bin$(DELIM)%$(OBJEXT), $(CSRCS))
SRCS = $(ASRCS) $(CSRCS)
OBJS = $(AOBJS) $(COBJS)
@@ -87,18 +86,18 @@ endif
all: .built
.PHONY: context .depend depend clean distclean
-ifneq ($(AOBJS),)
-$(AOBJS): %$(OBJEXT): %.S
+ifneq ($(ASRCS),)
+$(AOBJS): bin$(DELIM)%$(OBJEXT): %.S
$(call ASSEMBLE, $<, $@)
endif
-ifneq ($(COBJS),)
-$(COBJS): %$(OBJEXT): %.c
+ifneq ($(CSRCS),)
+$(COBJS): bin$(DELIM)%$(OBJEXT): %.c
$(call COMPILE, $<, $@)
endif
.built: $(OBJS)
-ifneq ($(OBJS),)
+ifneq ($(SRCS),)
$(call ARCHIVE, $(BIN), $(OBJS))
endif
$(Q) touch .built
@@ -124,7 +123,7 @@ depend: .depend
clean: $(PLATFORMDIR)
$(call DELFILE, .built)
- $(Q) $(MAKE) -C $(BINDIR) TOPDIR="$(TOPDIR)" APPDIR="$(APPDIR)" clean
+ $(Q) $(MAKE) -C bin TOPDIR="$(TOPDIR)" APPDIR="$(APPDIR)" clean
distclean: clean
$(call DELFILE, Make.dep)
diff --git a/apps/platform/bin/.gitignore b/apps/platform/bin/.gitignore
new file mode 100644
index 000000000..e5cc00798
--- /dev/null
+++ b/apps/platform/bin/.gitignore
@@ -0,0 +1,8 @@
+/*.asm
+/*.rel
+/*.lst
+/*.sym
+/*.adb
+/*.lib
+/*.src
+/*.obj