summaryrefslogtreecommitdiff
path: root/board/siemens/SCM/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'board/siemens/SCM/Makefile')
-rw-r--r--board/siemens/SCM/Makefile21
1 files changed, 14 insertions, 7 deletions
diff --git a/board/siemens/SCM/Makefile b/board/siemens/SCM/Makefile
index af646e4..b4bbb53 100644
--- a/board/siemens/SCM/Makefile
+++ b/board/siemens/SCM/Makefile
@@ -1,5 +1,5 @@
#
-# (C) Copyright 2001
+# (C) Copyright 2001-2006
# Wolfgang Denk, DENX Software Engineering, wd@denx.de.
#
# See file CREDITS for list of people who contributed to this
@@ -22,21 +22,28 @@
#
include $(TOPDIR)/config.mk
+ifneq ($(OBJTREE),$(SRCTREE))
+$(shell mkdir -p $(obj)../common)
+$(shell mkdir -p $(obj)../../tqm8xx/)
+endif
-LIB = lib$(BOARD).a
+LIB = $(obj)lib$(BOARD).a
-OBJS = scm.o flash.o fpga_scm.o ../common/fpga.o \
+COBJS = scm.o flash.o fpga_scm.o ../common/fpga.o \
../../tqm8xx/load_sernum_ethaddr.o
+SRCS := $(SOBJS:.o=.S) $(COBJS:.o=.c)
+OBJS := $(addprefix $(obj),$(COBJS))
+SOBJS := $(addprefix $(obj),$(SOBJS))
-$(LIB): .depend $(OBJS)
+$(LIB): $(obj).depend $(OBJS)
$(AR) crv $@ $(OBJS)
#########################################################################
-.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
#########################################################################