summaryrefslogtreecommitdiff
path: root/board/m5271evb
diff options
context:
space:
mode:
Diffstat (limited to 'board/m5271evb')
-rw-r--r--board/m5271evb/Makefile18
1 files changed, 11 insertions, 7 deletions
diff --git a/board/m5271evb/Makefile b/board/m5271evb/Makefile
index 34de983..424ab1c 100644
--- a/board/m5271evb/Makefile
+++ b/board/m5271evb/Makefile
@@ -23,18 +23,22 @@
include $(TOPDIR)/config.mk
-LIB = lib$(BOARD).a
+LIB = $(obj)lib$(BOARD).a
-OBJS = $(BOARD).o
+COBJS = $(BOARD).o
-$(LIB): .depend $(OBJS)
- $(AR) crv $@ $(OBJS)
+SRCS := $(SOBJS:.o=.S) $(COBJS:.o=.c)
+OBJS := $(addprefix $(obj),$(COBJS))
+SOBJS := $(addprefix $(obj),$(SOBJS))
+
+$(LIB): $(obj).depend $(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
#########################################################################