summaryrefslogtreecommitdiff
path: root/board/vpac270/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'board/vpac270/Makefile')
-rw-r--r--board/vpac270/Makefile20
1 files changed, 12 insertions, 8 deletions
diff --git a/board/vpac270/Makefile b/board/vpac270/Makefile
index 0f3eacd43f..c6f4c7c36f 100644
--- a/board/vpac270/Makefile
+++ b/board/vpac270/Makefile
@@ -24,25 +24,29 @@
include $(TOPDIR)/config.mk
-LIB = lib$(BOARD).a
+LIB = $(obj)lib$(BOARD).a
-OBJS := vpac270.o
+COBJS := vpac270.o
SOBJS := lowlevel_init.o
-$(LIB): $(OBJS) $(SOBJS)
- $(AR) crv $@ $(OBJS) $(SOBJS)
+SRCS := $(SOBJS:.o=.S) $(COBJS:.o=.c)
+OBJS := $(addprefix $(obj),$(COBJS))
+SOBJS := $(addprefix $(obj),$(SOBJS))
+
+$(LIB): $(obj).depend $(OBJS) $(SOBJS)
+ $(AR) $(ARFLAGS) $@ $(OBJS) $(SOBJS)
clean:
rm -f $(SOBJS) $(OBJS)
distclean: clean
- rm -f $(LIB) core *.bak .depend
+ rm -f $(LIB) core *.bak $(obj).depend
#########################################################################
-.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
#########################################################################