diff options
author | Aubrey Li <aubrey.adi@gmail.com> | 2007-03-12 01:42:06 +0800 |
---|---|---|
committer | Aubrey Li <aubrey.adi@gmail.com> | 2007-03-12 01:42:06 +0800 |
commit | bfa5754a58477ac917d21527cd0f079d87cf188e (patch) | |
tree | 652858c54d5f15eb1ccf58d6d775d6a157f6cf00 /board | |
parent | 8440bb14581a294375c34b91b42512f9753d1130 (diff) | |
download | bootable_bootloader_goldelico_gta04-bfa5754a58477ac917d21527cd0f079d87cf188e.zip bootable_bootloader_goldelico_gta04-bfa5754a58477ac917d21527cd0f079d87cf188e.tar.gz bootable_bootloader_goldelico_gta04-bfa5754a58477ac917d21527cd0f079d87cf188e.tar.bz2 |
[Blackfin][PATCH] Fix BUILD_DIR option of MAKEALL building issue
Diffstat (limited to 'board')
-rw-r--r-- | board/bf533-ezkit/Makefile | 24 | ||||
-rw-r--r-- | board/bf533-stamp/Makefile | 24 |
2 files changed, 34 insertions, 14 deletions
diff --git a/board/bf533-ezkit/Makefile b/board/bf533-ezkit/Makefile index 8f51eb2..4fe7d78 100644 --- a/board/bf533-ezkit/Makefile +++ b/board/bf533-ezkit/Makefile @@ -27,22 +27,32 @@ include $(TOPDIR)/config.mk -LIB = lib$(BOARD).a +LIB = $(obj)lib$(BOARD).a -OBJS = $(BOARD).o flash.o +COBJS := $(BOARD).o flash.o -$(LIB): .depend $(OBJS) u-boot.lds - $(AR) cr $@ $(OBJS) +SRCS := $(SOBJS:.o=.S) $(COBJS:.o=.c) +OBJS := $(addprefix $(obj),$(COBJS)) +SOBJS := $(addprefix $(obj),$(SOBJS)) + +$(LIB): $(obj).depend $(OBJS) $(SOBJS) u-boot.lds + $(AR) $(ARFLAGS) $@ $(OBJS) $(SOBJS) u-boot.lds: u-boot.lds.S $(CPP) $(CPPFLAGS) -P -Ubfin $^ > $@.tmp mv -f $@.tmp $@ +clean: + rm -f $(SOBJS) $(OBJS) + +distclean: clean + rm -f $(LIB) core *.bak .depend + ######################################################################### -.depend: Makefile $(SOBJS:.o=.S) $(OBJS:.o=.c) - $(CC) -M $(CFLAGS) $(SOBJS:.o=.S) $(OBJS:.o=.c) > $@ +# defines $(obj).depend target +include $(SRCTREE)/rules.mk -sinclude .depend +sinclude $(obj).depend ######################################################################### diff --git a/board/bf533-stamp/Makefile b/board/bf533-stamp/Makefile index 217e5f0..8223d59 100644 --- a/board/bf533-stamp/Makefile +++ b/board/bf533-stamp/Makefile @@ -27,22 +27,32 @@ include $(TOPDIR)/config.mk -LIB = lib$(BOARD).a +LIB = $(obj)lib$(BOARD).a -OBJS = $(BOARD).o spi.o +COBJS := $(BOARD).o spi.o -$(LIB): .depend $(OBJS) u-boot.lds - $(AR) cr $@ $(OBJS) +SRCS := $(SOBJS:.o=.S) $(COBJS:.o=.c) +OBJS := $(addprefix $(obj),$(COBJS)) +SOBJS := $(addprefix $(obj),$(SOBJS)) + +$(LIB): $(obj).depend $(OBJS) $(SOBJS) u-boot.lds + $(AR) $(ARFLAGS) $@ $(OBJS) $(SOBJS) u-boot.lds: u-boot.lds.S $(CPP) $(CPPFLAGS) -P -Ubfin $^ > $@.tmp mv -f $@.tmp $@ +clean: + rm -f $(SOBJS) $(OBJS) + +distclean: clean + rm -f $(LIB) core *.bak .depend + ######################################################################### -.depend: Makefile $(SOBJS:.o=.S) $(OBJS:.o=.c) - $(CC) -M $(CFLAGS) $(SOBJS:.o=.S) $(OBJS:.o=.c) > $@ +# defines $(obj).depend target +include $(SRCTREE)/rules.mk -sinclude .depend +sinclude $(obj).depend ######################################################################### |