]> git.sur5r.net Git - u-boot/blobdiff - fs/cramfs/Makefile
Blackfin: support embedding the environment into loader files (LDRs)
[u-boot] / fs / cramfs / Makefile
index 54a475ef859e42fc7f8d86331c6a06924cd33142..7b6cc0ad3e50a69f090db72616f9aa7ef36d700d 100644 (file)
@@ -1,5 +1,5 @@
 #
-# (C) Copyright 2000, 2001
+# (C) Copyright 2000-2006
 # Wolfgang Denk, DENX Software Engineering, wd@denx.de.
 #
 # See file CREDITS for list of people who contributed to this
 
 include $(TOPDIR)/config.mk
 
-LIB    = libcramfs.a
+LIB    = $(obj)libcramfs.a
 
 AOBJS  =
-COBJS  = cramfs.o uncompress.o
-OBJS   = $(AOBJS) $(COBJS)
+COBJS-$(CONFIG_CMD_CRAMFS) := cramfs.o
+COBJS-$(CONFIG_CMD_CRAMFS) += uncompress.o
+
+SRCS   := $(AOBJS:.o=.S) $(COBJS-y:.o=.c)
+OBJS   := $(addprefix $(obj),$(AOBJS) $(COBJS-y))
 
 #CPPFLAGS +=
 
 all:   $(LIB) $(AOBJS)
 
-$(LIB):        .depend $(OBJS)
-       $(AR) crv $@ $(OBJS)
+$(LIB):        $(obj).depend $(OBJS)
+       $(AR) $(ARFLAGS) $@ $(OBJS)
 
 
 #########################################################################
 
-.depend:       Makefile $(AOBJS:.o=.S) $(COBJS:.o=.c)
-               $(CC) -M $(CFLAGS) $(AOBJS:.o=.S) $(COBJS:.o=.c) > $@
+# defines $(obj).depend target
+include $(SRCTREE)/rules.mk
 
-sinclude .depend
+sinclude $(obj).depend
 
 #########################################################################