From 84e354cfd85825e5007b79d199380117424f3a5e Mon Sep 17 00:00:00 2001 From: Gregory Nutt Date: Sat, 2 Nov 2013 11:04:12 -0600 Subject: apps/platform/Makefile was not dealing with the bin subdirectory correctly --- apps/platform/.gitignore | 3 ++- apps/platform/Makefile | 17 ++++++++--------- apps/platform/bin/.gitignore | 8 ++++++++ 3 files changed, 18 insertions(+), 10 deletions(-) create mode 100644 apps/platform/bin/.gitignore (limited to 'apps/platform') 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 -- cgit v1.2.3