summaryrefslogtreecommitdiff
path: root/board/m501sk
diff options
context:
space:
mode:
Diffstat (limited to 'board/m501sk')
-rw-r--r--board/m501sk/Makefile14
1 files changed, 9 insertions, 5 deletions
diff --git a/board/m501sk/Makefile b/board/m501sk/Makefile
index da7987b..b403095 100644
--- a/board/m501sk/Makefile
+++ b/board/m501sk/Makefile
@@ -23,12 +23,16 @@
include $(TOPDIR)/config.mk
-LIB = lib$(BOARD).a
+LIB = $(obj)lib$(BOARD).a
-OBJS := m501sk.o eeprom.o
+COBJS := m501sk.o eeprom.o
SOBJS := memsetup.o
+SRCS := $(SOBJS:.o=.S) $(COBJS:.o=.c)
+OBJS := $(addprefix $(obj),$(COBJS))
+SOBJS := $(addprefix $(obj),$(SOBJS))
+
$(LIB): $(OBJS) $(SOBJS)
$(AR) crv $@ $(OBJS) $(SOBJS)
@@ -40,9 +44,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
#########################################################################