]> git.sur5r.net Git - u-boot/blobdiff - board/sc520_cdp/Makefile
nios2: add gpio_request
[u-boot] / board / sc520_cdp / Makefile
index 0f50393468ec4f896ee36446db20cdc135d34d8a..7944a01a64338880d2cd26fedc762fbc3972bb3c 100644 (file)
@@ -1,4 +1,7 @@
 #
+# (C) Copyright 2006
+# Wolfgang Denk, DENX Software Engineering, wd@denx.de.
+#
 # (C) Copyright 2002
 # Daniel Engström, Omicron Ceti AB, daniel@omicron.se.
 #
 
 include $(TOPDIR)/config.mk
 
-LIB    = lib$(BOARD).a
+LIB    = $(obj)lib$(BOARD).a
+
+COBJS-y        += sc520_cdp.o
+COBJS-y        += flash.o
+COBJS-$(CONFIG_PCI) += sc520_cdp_pci.o
+SOBJS-y        += sc520_cdp_asm.o
+SOBJS-y        += sc520_cdp_asm16.o
 
-OBJS   := sc520_cdp.o flash.o 
-SOBJS  := sc520_cdp_asm.o sc520_cdp_asm16.o
+SRCS   := $(SOBJS-y:.o=.S) $(COBJS-y:.o=.c)
+OBJS   := $(addprefix $(obj),$(SOBJS-y) $(COBJS-y))
 
-$(LIB):        $(OBJS) $(SOBJS)
-       $(AR) crv $@ $^
+$(LIB):        $(obj).depend $(OBJS) $(SOBJS)
+       $(AR) $(ARFLAGS) $@ $(OBJS) $(SOBJS)
 
 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
 
 #########################################################################