diff options
Diffstat (limited to 'board/esd/pmc405/Makefile')
-rw-r--r-- | board/esd/pmc405/Makefile | 19 |
1 files changed, 13 insertions, 6 deletions
diff --git a/board/esd/pmc405/Makefile b/board/esd/pmc405/Makefile index 741e4aacdcd..2775b8a6350 100644 --- a/board/esd/pmc405/Makefile +++ b/board/esd/pmc405/Makefile @@ -1,5 +1,5 @@ # -# (C) Copyright 2000, 2001 +# (C) Copyright 2000-2006 # Wolfgang Denk, DENX Software Engineering, wd@denx.de. # # See file CREDITS for list of people who contributed to this @@ -22,15 +22,22 @@ # include $(TOPDIR)/config.mk +ifneq ($(OBJTREE),$(SRCTREE)) +$(shell mkdir -p $(obj)../common/xilinx_jtag) +endif -LIB = lib$(BOARD).a +LIB = $(obj)lib$(BOARD).a # Objects for Xilinx JTAG programming (CPLD) CPLD = ../common/xilinx_jtag/lenval.o \ ../common/xilinx_jtag/micro.o \ ../common/xilinx_jtag/ports.o -OBJS = $(BOARD).o ../common/misc.o ../common/cmd_loadpci.o $(CPLD) +COBJS = $(BOARD).o ../common/misc.o ../common/cmd_loadpci.o $(CPLD) + +SRCS := $(SOBJS:.o=.S) $(COBJS:.o=.c) +OBJS := $(addprefix $(obj),$(COBJS)) +SOBJS := $(addprefix $(obj),$(SOBJS)) $(LIB): $(OBJS) $(SOBJS) $(AR) crv $@ $(OBJS) @@ -43,9 +50,9 @@ distclean: clean ######################################################################### -.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 ######################################################################### |