aboutsummaryrefslogtreecommitdiffstats
path: root/x-loader/board/omap3530beagle/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'x-loader/board/omap3530beagle/Makefile')
-rw-r--r--x-loader/board/omap3530beagle/Makefile20
1 files changed, 12 insertions, 8 deletions
diff --git a/x-loader/board/omap3530beagle/Makefile b/x-loader/board/omap3530beagle/Makefile
index 2dab831..b7b51ce 100644
--- a/x-loader/board/omap3530beagle/Makefile
+++ b/x-loader/board/omap3530beagle/Makefile
@@ -23,25 +23,29 @@
include $(TOPDIR)/config.mk
-LIB = lib$(BOARD).a
+LIB = $(obj)lib$(BOARD).a
-OBJS := omap3530beagle.o
+COBJS := omap3530beagle.o
SOBJS := platform.o
-$(LIB): $(OBJS) $(SOBJS)
- $(AR) crv $@ $^
+SRCS := $(SOBJS:.o=.S) $(COBJS:.o=.c)
+OBJS := $(addprefix $(obj),$(COBJS))
+SOBJS := $(addprefix $(obj),$(SOBJS))
+
+$(LIB): $(obj).depend $(OBJS) $(SOBJS)
+ $(AR) crv $@ $(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
#########################################################################