summaryrefslogtreecommitdiffstats
path: root/api_examples/Makefile
diff options
context:
space:
mode:
authorRafal Jaworowski <raj@semihalf.com>2008-01-29 16:57:38 +0100
committerRafal Jaworowski <raj@semihalf.com>2008-01-29 16:57:38 +0100
commit0dc1fc22af86d16993388d9ed9630dbaa2d51826 (patch)
treeda03f3b050381d07ed1a5286d1b7b5ad01924845 /api_examples/Makefile
parent98b742489c09780be6a832eeaa4e5eff824792bb (diff)
downloadblackbird-obmc-uboot-0dc1fc22af86d16993388d9ed9630dbaa2d51826.tar.gz
blackbird-obmc-uboot-0dc1fc22af86d16993388d9ed9630dbaa2d51826.zip
API: Convert conditional building to the new scheme.
This fixes a build breakage with CONFIG_API enabled, which appeared after the recent changes in the U-Boot build system. Signed-off-by: Rafal Jaworowski <raj@semihalf.com>
Diffstat (limited to 'api_examples/Makefile')
-rw-r--r--api_examples/Makefile20
1 files changed, 13 insertions, 7 deletions
diff --git a/api_examples/Makefile b/api_examples/Makefile
index cb49a9ea79..5666f489b9 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)
OpenPOWER on IntegriCloud