]> git.sur5r.net Git - u-boot/blobdiff - lib_nios2/Makefile
License cleanup: remove all files with "All Rights Reserved" notices.
[u-boot] / lib_nios2 / Makefile
index 44b893c9ae601cce3ad2b7115aa1e5294e48709e..b69bc38850e363ad660d0d3b5bd1e5b720014905 100644 (file)
@@ -1,5 +1,5 @@
 #
-# (C) Copyright 2000
+# (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    = lib$(ARCH).a
+LIB    = $(obj)lib$(ARCH).a
 
-AOBJS  = cache.o
+SOBJS-y        += cache.o
 
-COBJS  = board.o divmod.o nios_linux.o mult.o time.o
+COBJS-y        += board.o
+COBJS-y        += bootm.o
+COBJS-y        += divmod.o
+COBJS-y        += mult.o
+COBJS-y        += time.o
 
-OBJS   = $(AOBJS) $(COBJS)
+SRCS   := $(SOBJS-y:.o=.S) $(COBJS-y:.o=.c)
+OBJS   := $(addprefix $(obj),$(SOBJS-y) $(COBJS-y))
 
-$(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
 
 #########################################################################