apps/platform/Makefile was not dealing with the bin subdirectory correctly

This commit is contained in:
Gregory Nutt 2013-11-02 11:04:12 -06:00
parent 891d1892e5
commit dc7f894963
4 changed files with 21 additions and 10 deletions

View File

@ -720,3 +720,6 @@
options to the hexdump command. From Ken Pettit (2013-11-1).
* apps/platrorm/mikroe-stm32f4: Now uses /dev/config for configuration
data storage. From Ken Pettit (2013-11-1).
* apps/platform/Makefile: Was not dealing with the bin sub-directory
correctly (2013-11-2).

3
platform/.gitignore vendored
View File

@ -1,4 +1,5 @@
/.built
/Make.defs
/.depend
/Make.dep
board

View File

@ -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)

8
platform/bin/.gitignore vendored Normal file
View File

@ -0,0 +1,8 @@
/*.asm
/*.rel
/*.lst
/*.sym
/*.adb
/*.lib
/*.src
/*.obj