summaryrefslogtreecommitdiff
path: root/board/freescale/m5275evb/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'board/freescale/m5275evb/Makefile')
-rw-r--r--board/freescale/m5275evb/Makefile14
1 files changed, 9 insertions, 5 deletions
diff --git a/board/freescale/m5275evb/Makefile b/board/freescale/m5275evb/Makefile
index 9a0fa80..ef0b19e 100644
--- a/board/freescale/m5275evb/Makefile
+++ b/board/freescale/m5275evb/Makefile
@@ -23,18 +23,22 @@
include $(TOPDIR)/config.mk
-LIB = lib$(BOARD).a
+LIB = $(obj)lib$(BOARD).a
OBJS = $(BOARD).o mii.o
+SRCS := $(SOBJS:.o=.S) $(COBJS:.o=.c)
+OBJS := $(addprefix $(obj),$(COBJS))
+SOBJS := $(addprefix $(obj),$(SOBJS))
+
$(LIB): .depend $(OBJS)
- $(AR) crv $@ $(OBJS)
+ $(AR) $(ARFLAGS) $@ $(OBJS)
#########################################################################
-.depend: Makefile $(SOBJS:.o=.S) $(OBJS:.o=.c)
- $(CC) -M $(CFLAGS) $(SOBJS:.o=.S) $(OBJS:.o=.c) > $@
+# defines $(obj).depend target
+include $(SRCTREE)/rules.mk
-sinclude .depend
+sinclude $(obj).depend
#########################################################################