83xx: Replace CONFIG_MPC83XX with CONFIG_MPC83xx
[oweals/u-boot.git] / cpu / i386 / Makefile
index c44412a025b7884bba2561b9f2cee986eb0f4e11..e98bd3d7dab3ede7d28fcb3c8ea659e0398b961a 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$(CPU).a
+LIB    = $(obj)lib$(CPU).a
+
+START  = start.o start16.o resetvec.o
+COBJS  = serial.o interrupts.o exceptions.o cpu.o
 
-START  = start.o start16.o reset.o
-COBJS  = serial.o interrupts.o cpu.o timer.o sc520.o
-AOBJS  = sc520_asm.o
+SRCS   := $(START:.o=.S) $(SOBJS:.o=.S) $(COBJS:.o=.c)
+OBJS   := $(addprefix $(obj),$(SOBJS) $(COBJS))
+START  := $(addprefix $(obj),$(START))
 
-all:   .depend $(START) $(LIB)
+all:   $(obj).depend $(START) $(LIB)
 
-$(LIB):        $(COBJS) $(AOBJS)
-       $(AR) crv $@ $(COBJS) $(AOBJS)
+$(LIB):        $(OBJS)
+       $(AR) $(ARFLAGS) $@ $(OBJS)
 
 #########################################################################
 
-.depend:       Makefile $(START:.o=.S) $(COBJS:.o=.c) $(AOBJS:.o=.S)
-               $(CC) -M $(CFLAGS) $(START:.o=.S) $(COBJS:.o=.c) $(AOBJS:.o=.S) > $@
+# defines $(obj).depend target
+include $(SRCTREE)/rules.mk
 
-sinclude .depend
+sinclude $(obj).depend
 
 #########################################################################