aboutsummaryrefslogtreecommitdiffstats
path: root/x-loader/cpu/arm1136/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'x-loader/cpu/arm1136/Makefile')
-rw-r--r--x-loader/cpu/arm1136/Makefile16
1 files changed, 10 insertions, 6 deletions
diff --git a/x-loader/cpu/arm1136/Makefile b/x-loader/cpu/arm1136/Makefile
index 565d016..b556419 100644
--- a/x-loader/cpu/arm1136/Makefile
+++ b/x-loader/cpu/arm1136/Makefile
@@ -23,21 +23,25 @@
include $(TOPDIR)/config.mk
-LIB = lib$(CPU).a
+LIB = $(obj)lib$(CPU).a
START = start.o
-OBJS = cpu.o
+COBJS = cpu.o
-all: .depend $(START) $(LIB)
+SRCS := $(START:.o=.S) $(SOBJS:.o=.S) $(COBJS:.o=.c)
+OBJS := $(addprefix $(obj),$(SOBJS) $(COBJS))
+START := $(addprefix $(obj),$(START))
+
+all: $(obj).depend $(START) $(LIB)
$(LIB): $(OBJS)
$(AR) crv $@ $(OBJS)
#########################################################################
-.depend: Makefile $(START:.o=.S) $(OBJS:.o=.c)
- $(CC) -M $(CFLAGS) $(START:.o=.S) $(OBJS:.o=.c) > $@
+# defines $(obj).depend target
+include $(SRCTREE)/rules.mk
-sinclude .depend
+sinclude $(obj).depend
#########################################################################