summaryrefslogtreecommitdiff
path: root/board/mpr2/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'board/mpr2/Makefile')
-rw-r--r--board/mpr2/Makefile12
1 files changed, 8 insertions, 4 deletions
diff --git a/board/mpr2/Makefile b/board/mpr2/Makefile
index a10ec77478..69e652579d 100644
--- a/board/mpr2/Makefile
+++ b/board/mpr2/Makefile
@@ -30,11 +30,15 @@
include $(TOPDIR)/config.mk
-LIB = lib$(BOARD).a
+LIB = $(obj)lib$(BOARD).a
OBJS := mpr2.o
SOBJS := lowlevel_init.o
+SRCS := $(SOBJS:.o=.S) $(COBJS:.o=.c)
+OBJS := $(addprefix $(obj),$(COBJS))
+SOBJS := $(addprefix $(obj),$(SOBJS))
+
$(LIB): $(OBJS) $(SOBJS)
$(AR) $(ARFLAGS) $@ $(OBJS) $(SOBJS)
@@ -46,9 +50,9 @@ distclean: clean
#########################################################################
-.depend: Makefile $(SOBJS:.o=.S) $(OBJS:.o=.c)
- $(CC) -M $(CPPFLAGS) $(SOBJS:.o=.S) $(OBJS:.o=.c) > $@
+# defines $(obj).depend target
+include $(SRCTREE)/rules.mk
--include .depend
+sinclude $(obj).depend
#########################################################################