aboutsummaryrefslogtreecommitdiffstats
path: root/x-loader/common/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'x-loader/common/Makefile')
-rw-r--r--x-loader/common/Makefile13
1 files changed, 7 insertions, 6 deletions
diff --git a/x-loader/common/Makefile b/x-loader/common/Makefile
index de856cf..8f4ee2c 100644
--- a/x-loader/common/Makefile
+++ b/x-loader/common/Makefile
@@ -23,26 +23,27 @@
include $(TOPDIR)/config.mk
-LIB = libcommon.a
+LIB = $(obj)libcommon.a
AOBJS =
COBJS = cmd_load.o
-OBJS = $(AOBJS) $(COBJS)
+SRCS := $(AOBJS:.o=.S) $(COBJS:.o=.c)
+OBJS := $(addprefix $(obj),$(AOBJS) $(COBJS))
CPPFLAGS += -I..
all: $(LIB) $(AOBJS)
-$(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
#########################################################################