]> git.sur5r.net Git - u-boot/blobdiff - board/munices/Makefile
OneNAND: Remove unused read_spareram
[u-boot] / board / munices / Makefile
index 111caed08ffac8d8e52576269c59496140a85dc8..5862bed5cc2a4ccfac05287073e03ebd8da1b4af 100644 (file)
@@ -1,6 +1,5 @@
-
 #
-# (C) Copyright 2003
+# (C) Copyright 2003-2008
 # Wolfgang Denk, DENX Software Engineering, wd@denx.de.
 #
 # See file CREDITS for list of people who contributed to this
 
 include $(TOPDIR)/config.mk
 
-LIB    = lib$(BOARD).a
-
-OBJS   := $(BOARD).o
+LIB    = $(obj)lib$(BOARD).a
 
-$(LIB):        $(OBJS) $(SOBJS)
-       $(AR) crv $@ $(OBJS)
+COBJS  := $(BOARD).o
 
-%.dtb: %.dts
-       dtc -f -V 0x10 -I dts -O dtb $< >$@
+SRCS   := $(SOBJS:.o=.S) $(COBJS:.o=.c)
+OBJS   := $(addprefix $(obj),$(COBJS))
+SOBJS  := $(addprefix $(obj),$(SOBJS))
 
-%.c: %.dtb
-       xxd -i $< \
-          | sed -e "s/^unsigned char/const unsigned char/g" \
-          | sed -e "s/^unsigned int/const unsigned int/g" > $@
+$(LIB):        $(obj).depend $(OBJS)
+       $(AR) $(ARFLAGS) $@ $(OBJS)
 
 clean:
        rm -f $(SOBJS) $(OBJS)
 
 distclean:     clean
-       rm -f $(LIB) core *.bak .depend
+       rm -f $(LIB) core *.bak $(obj).depend
 
 #########################################################################
 
-.depend:       Makefile $(SOBJS:.o=.S) $(OBJS:.o=.c)
-               $(CC) -M $(CPPFLAGS) $(SOBJS:.o=.S) $(OBJS:.o=.c) > $@
+# defines $(obj).depend target
+include $(SRCTREE)/rules.mk
 
--include .depend
+sinclude $(obj).depend
 
 #########################################################################