aboutsummaryrefslogtreecommitdiffstats
path: root/x-loader/lib/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'x-loader/lib/Makefile')
-rw-r--r--x-loader/lib/Makefile15
1 files changed, 8 insertions, 7 deletions
diff --git a/x-loader/lib/Makefile b/x-loader/lib/Makefile
index 60b8090..32b3798 100644
--- a/x-loader/lib/Makefile
+++ b/x-loader/lib/Makefile
@@ -25,22 +25,23 @@
include $(TOPDIR)/config.mk
-LIB = lib$(ARCH).a
+LIB = $(obj)lib$(ARCH).a
-AOBJS = _udivsi3.o _umodsi3.o
+SOBJS = _udivsi3.o _umodsi3.o
COBJS = board.o ecc.o printf.o div0.o
-OBJS = $(AOBJS) $(COBJS)
+SRCS := $(SOBJS:.o=.S) $(COBJS:.o=.c)
+OBJS := $(addprefix $(obj),$(SOBJS) $(COBJS))
-$(LIB): .depend $(OBJS)
+$(LIB): $(obj).depend $(OBJS)
$(AR) crv $@ $(OBJS)
#########################################################################
-.depend: Makefile $(AOBJS:.o=.S) $(COBJS:.o=.c)
- $(CC) -M $(CFLAGS) $(AOBJS:.o=.S) $(COBJS:.o=.c) > $@
+# defines $(obj).depend target
+include $(SRCTREE)/rules.mk
-sinclude .depend
+sinclude $(obj).depend
#########################################################################