diff options
author | Masahiro Yamada | 2014-02-04 17:24:12 +0900 |
---|---|---|
committer | Tom Rini | 2014-02-19 11:07:49 -0500 |
commit | 4a20df395d9b6961a4877852e911cbbadd019d40 (patch) | |
tree | 9292a67548d80bb1c5590b51992f104786b1b0b9 /examples/api | |
parent | e183a1745aa4ad05dac3d7caf5777dceff3f1958 (diff) |
examples: Use scripts/Makefile.build
Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
Diffstat (limited to 'examples/api')
-rw-r--r-- | examples/api/Makefile | 21 |
1 files changed, 5 insertions, 16 deletions
diff --git a/examples/api/Makefile b/examples/api/Makefile index cad10a3ecb4..f7708593619 100644 --- a/examples/api/Makefile +++ b/examples/api/Makefile @@ -11,10 +11,8 @@ ifeq ($(ARCH),arm) LOAD_ADDR = 0x1000000 endif -include $(TOPDIR)/config.mk - # Resulting ELF and binary exectuables will be named demo and demo.bin -OUTPUT = $(obj)demo +extra-y = demo # Source files located in the examples/api directory SOBJ_FILES-y += crt0.o @@ -43,13 +41,13 @@ OBJS += $(addprefix $(obj),$(COBJ_FILES-y)) OBJS += $(addprefix $(obj),$(notdir $(EXT_COBJ_FILES-y))) OBJS += $(addprefix $(obj),$(notdir $(EXT_SOBJ_FILES-y))) -all: $(obj).depend $(OUTPUT) - ######################################################################### -$(OUTPUT): $(OBJS) +$(obj)demo: $(OBJS) $(LD) --gc-sections -Ttext $(LOAD_ADDR) -o $@ $^ $(PLATFORM_LIBS) - $(OBJCOPY) -O binary $@ $(OUTPUT).bin 2>/dev/null + +$(obj)demo.bin: $(obj)demo + $(OBJCOPY) -O binary $< $@ 2>/dev/null # Rule to build generic library C files $(obj)%.o: $(SRCTREE)/lib/%.c @@ -58,12 +56,3 @@ $(obj)%.o: $(SRCTREE)/lib/%.c # Rule to build architecture-specific library assembly files $(obj)%.o: $(SRCTREE)/arch/$(ARCH)/lib/%.S $(CC) -g $(CFLAGS) -c -o $@ $< - -######################################################################### - -# defines $(obj).depend target -include $(SRCTREE)/rules.mk - -sinclude $(obj).depend - -######################################################################### |