]> git.karo-electronics.de Git - karo-tx-uboot.git/blobdiff - fs/cramfs/Makefile
Switch from archive libraries to partial linking
[karo-tx-uboot.git] / fs / cramfs / Makefile
index 1a6f4b7d00df6e3f07b9f23cfff8dafc716c2566..5f419329a595e644435435c1d62525169b3542c8 100644 (file)
 
 include $(TOPDIR)/config.mk
 
-LIB    = $(obj)libcramfs.a
+LIB    = $(obj)libcramfs.o
 
 AOBJS  =
-COBJS  = cramfs.o uncompress.o
+COBJS-$(CONFIG_CMD_CRAMFS) := cramfs.o
+COBJS-$(CONFIG_CMD_CRAMFS) += uncompress.o
 
-SRCS   := $(AOBJS:.o=.S) $(COBJS:.o=.c)
-OBJS   := $(addprefix $(obj),$(AOBJS) $(COBJS))
+SRCS   := $(AOBJS:.o=.S) $(COBJS-y:.o=.c)
+OBJS   := $(addprefix $(obj),$(AOBJS) $(COBJS-y))
 
 #CPPFLAGS +=
 
 all:   $(LIB) $(AOBJS)
 
 $(LIB):        $(obj).depend $(OBJS)
-       $(AR) crv $@ $(OBJS)
+       $(call cmd_link_o_target, $(OBJS))
 
 
 #########################################################################