summaryrefslogtreecommitdiff
path: root/board/mpc7448hpc2/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'board/mpc7448hpc2/Makefile')
-rw-r--r--board/mpc7448hpc2/Makefile20
1 files changed, 12 insertions, 8 deletions
diff --git a/board/mpc7448hpc2/Makefile b/board/mpc7448hpc2/Makefile
index d5ed01f..e3d757d 100644
--- a/board/mpc7448hpc2/Makefile
+++ b/board/mpc7448hpc2/Makefile
@@ -23,26 +23,30 @@
include $(TOPDIR)/config.mk
-LIB = lib$(BOARD).a
+LIB = $(obj)lib$(BOARD).a
-OBJS = $(BOARD).o tsi108_init.o
+COBJS := $(BOARD).o tsi108_init.o
+SOBJS := asm_init.o
-SOBJS = asm_init.o
+SRCS := $(SOBJS:.o=.S) $(COBJS:.o=.c)
+OBJS := $(addprefix $(obj),$(COBJS))
+SOBJS := $(addprefix $(obj),$(SOBJS))
-$(LIB): .depend $(OBJS) $(SOBJS)
- $(AR) crv $@ $(OBJS) $(SOBJS)
+$(LIB): $(obj).depend $(OBJS) $(SOBJS)
+ $(AR) $(ARFLAGS) $@ $(OBJS) $(SOBJS)
clean:
rm -f $(SOBJS) $(OBJS)
+.PHONY: distclean
distclean: clean
rm -f $(LIB) core *.bak .depend
#########################################################################
-.depend: Makefile $(SOBJS:.o=.S) $(OBJS:.o=.c)
- $(CC) -M $(CFLAGS) $(SOBJS:.o=.S) $(OBJS:.o=.c) > $@
+# defines $(obj).depend target
+include $(SRCTREE)/rules.mk
-sinclude .depend
+sinclude ($obj).depend
#########################################################################