]> git.kernelconcepts.de Git - karo-tx-uboot.git/blobdiff - cpu/microblaze/Makefile
fix: clean interrupt
[karo-tx-uboot.git] / cpu / microblaze / Makefile
index 610043eca95a6c34ae4451f87b9fe77dc4252f70..b7be5e146cb5379975414daadfb6a745c1ebf9fe 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$(CPU).a
+LIB    = $(obj)lib$(CPU).a
 
 START  = start.o
-OBJS   = cpu.o interrupts.o
+#SOBJS = dcache.o icache.o irq.o disable_int.o enable_int.o
+SOBJS  = dcache.o icache.o irq.o
+COBJS  = cpu.o interrupts.o cache.o exception.o timer.o
 
-all:   .depend $(START) $(LIB)
+SRCS   := $(START:.o=.S) $(SOBJS:.o=.S) $(COBJS:.o=.c)
+OBJS   := $(addprefix $(obj),$(SOBJS) $(COBJS))
+START  := $(addprefix $(obj),$(START))
+
+all:   $(obj).depend $(START) $(LIB)
 
 $(LIB):        $(OBJS)
-       $(AR) crv $@ $(OBJS)
+       $(AR) $(ARFLAGS) $@ $(OBJS)
 
 #########################################################################
 
-.depend: Makefile $(START:.o=.S) $(OBJS:.o=.c) $(AOBJS:.o=.S)
-       $(CC) -M $(CFLAGS) $(START:.o=.S) $(OBJS:.o=.c) $(AOBJS:.o=.S) > $@
+# defines $(obj).depend target
+include $(SRCTREE)/rules.mk
 
-sinclude .depend
+sinclude $(obj).depend
 
 #########################################################################