summaryrefslogtreecommitdiff
path: root/api_examples
diff options
context:
space:
mode:
authorAndy Fleming <afleming@freescale.com>2008-02-13 18:36:27 -0600
committerAndrew Fleming-AFLEMING <afleming@freescale.com>2008-02-13 18:36:27 -0600
commitd1bcf9e53b41dfa4be6943b739ee82627a0a6d31 (patch)
tree981e6e8d1b9f40e566d97340fcd0c20740cabe78 /api_examples
parented2cf548cac80cd3cf8154dcfe7b2685bef45938 (diff)
parent10bbb38a402a2faf18858c451bcdc63d45888e6e (diff)
downloadu-boot-imx-d1bcf9e53b41dfa4be6943b739ee82627a0a6d31.zip
u-boot-imx-d1bcf9e53b41dfa4be6943b739ee82627a0a6d31.tar.gz
u-boot-imx-d1bcf9e53b41dfa4be6943b739ee82627a0a6d31.tar.bz2
Merge branch 'denx'
Diffstat (limited to 'api_examples')
-rw-r--r--api_examples/Makefile20
-rw-r--r--api_examples/libgenwrap.c7
2 files changed, 19 insertions, 8 deletions
diff --git a/api_examples/Makefile b/api_examples/Makefile
index cb49a9e..5666f48 100644
--- a/api_examples/Makefile
+++ b/api_examples/Makefile
@@ -30,19 +30,25 @@ endif
include $(TOPDIR)/config.mk
-ELF += demo
-BIN += demo.bin
+ELF-$(CONFIG_API) += demo
+BIN-$(CONFIG_API) += demo.bin
+ELF := $(ELF-y)
+BIN := $(BIN-y)
#CFLAGS += -v
-COBJS := $(ELF:=.o)
-SOBJS := crt0.o
+COBJS-$(CONFIG_API) += $(ELF:=.o)
+SOBJS-$(CONFIG_API) += crt0.o
ifeq ($(ARCH),ppc)
-SOBJS += ppcstring.o
+SOBJS-$(CONFIG_API) += ppcstring.o
endif
+COBJS := $(COBJS-y)
+SOBJS := $(SOBJS-y)
LIB = $(obj)libglue.a
-LIBCOBJS= glue.o crc32.o ctype.o string.o vsprintf.o libgenwrap.o
+LIBCOBJS-$(CONFIG_API) += glue.o crc32.o ctype.o string.o vsprintf.o \
+ libgenwrap.o
+LIBCOBJS := $(LIBCOBJS-y)
LIBOBJS = $(addprefix $(obj),$(SOBJS) $(LIBCOBJS))
@@ -55,7 +61,7 @@ gcclibdir := $(shell dirname `$(CC) -print-libgcc-file-name`)
CPPFLAGS += -I..
-all: $(obj).depend $(OBJS) $(LIB) $(BIN) $(ELF)
+all: $(obj).depend $(OBJS) $(LIB) $(ELF) $(BIN)
#########################################################################
$(LIB): $(obj).depend $(LIBOBJS)
diff --git a/api_examples/libgenwrap.c b/api_examples/libgenwrap.c
index df62633..2b62bad 100644
--- a/api_examples/libgenwrap.c
+++ b/api_examples/libgenwrap.c
@@ -84,7 +84,12 @@ void do_reset (void)
ub_reset();
}
-void *malloc(size_t len)
+void *malloc (size_t len)
{
return NULL;
}
+
+void hang (void)
+{
+ while (1) ;
+}