]> git.kernelconcepts.de Git - karo-tx-uboot.git/blobdiff - api/Makefile
Merge branch 'master' of git://git.denx.de/u-boot-samsung
[karo-tx-uboot.git] / api / Makefile
index 94de3dc395aa3c015a1d77f8880e27c6be033261..2a64c4ddf6fea109c56f741a7405f5e779afa12e 100644 (file)
 
 include $(TOPDIR)/config.mk
 
-LIB    = $(obj)libapi.a
+LIB    = $(obj)libapi.o
 
-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)
+       $(call cmd_link_o_target, $(OBJS))
 
 # defines $(obj).depend target
 include $(SRCTREE)/rules.mk