summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWolfgang Denk <wd@denx.de>2008-02-12 00:51:05 +0100
committerWolfgang Denk <wd@denx.de>2008-02-12 00:51:05 +0100
commitac2731f185ee4b7f56998c8f26d181f66fad84f8 (patch)
treee8dd06aa713b9caf8dc3882aaf72d47c48fb9f24
parentc62776be8dca4097ca03d4f9415f08d4887b45d0 (diff)
parent63f732d3d3880feb531f48af247c025bf01462b0 (diff)
downloadu-boot-imx-ac2731f185ee4b7f56998c8f26d181f66fad84f8.zip
u-boot-imx-ac2731f185ee4b7f56998c8f26d181f66fad84f8.tar.gz
u-boot-imx-ac2731f185ee4b7f56998c8f26d181f66fad84f8.tar.bz2
Merge branch 'master' of /home/wd/git/u-boot/custodians
-rw-r--r--Makefile9
-rw-r--r--api/Makefile5
-rw-r--r--api_examples/Makefile20
-rw-r--r--api_examples/libgenwrap.c7
4 files changed, 23 insertions, 18 deletions
diff --git a/Makefile b/Makefile
index ec8661a..852dca8 100644
--- a/Makefile
+++ b/Makefile
@@ -253,9 +253,7 @@ LIBS += $(shell if [ -d post/board/$(BOARDDIR) ]; then echo \
"post/board/$(BOARDDIR)/libpost$(BOARD).a"; fi)
LIBS += common/libcommon.a
LIBS += libfdt/libfdt.a
-ifeq ($(CONFIG_API),y)
LIBS += api/libapi.a
-endif
LIBS := $(addprefix $(obj),$(LIBS))
.PHONY : $(LIBS)
@@ -266,11 +264,8 @@ PLATFORM_LIBS += -L $(shell dirname `$(CC) $(CFLAGS) -print-libgcc-file-name`) -
# The "tools" are needed early, so put this first
# Don't include stuff already done in $(LIBS)
SUBDIRS = tools \
- examples
-
-ifeq ($(CONFIG_API),y)
-SUBDIRS += api_examples
-endif
+ examples \
+ api_examples
.PHONY : $(SUBDIRS)
diff --git a/api/Makefile b/api/Makefile
index 94de3dc..4216892 100644
--- a/api/Makefile
+++ b/api/Makefile
@@ -24,13 +24,12 @@ include $(TOPDIR)/config.mk
LIB = $(obj)libapi.a
-COBJS = api.o api_net.o api_storage.o api_platform-$(ARCH).o
+COBJS-$(CONFIG_API) += api.o api_net.o api_storage.o api_platform-$(ARCH).o
+COBJS := $(COBJS-y)
SRCS := $(COBJS:.o=.c)
OBJS := $(addprefix $(obj),$(COBJS))
-all: $(LIB)
-
$(LIB): $(obj).depend $(OBJS)
$(AR) $(ARFLAGS) $@ $(OBJS)
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) ;
+}