aboutsummaryrefslogtreecommitdiffstats
path: root/x-loader/board/omap2430sdp
diff options
context:
space:
mode:
Diffstat (limited to 'x-loader/board/omap2430sdp')
-rw-r--r--x-loader/board/omap2430sdp/Makefile20
1 files changed, 12 insertions, 8 deletions
diff --git a/x-loader/board/omap2430sdp/Makefile b/x-loader/board/omap2430sdp/Makefile
index a9bb3f0..b6c984c 100644
--- a/x-loader/board/omap2430sdp/Makefile
+++ b/x-loader/board/omap2430sdp/Makefile
@@ -23,25 +23,29 @@
include $(TOPDIR)/config.mk
-LIB = lib$(BOARD).a
+LIB = $(obj)lib$(BOARD).a
-OBJS := omap2430sdp.o
+COBJS := omap2430sdp.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
#########################################################################