X-Git-Url: https://git.sur5r.net/?a=blobdiff_plain;f=board%2Fesd%2Fdasa_sim%2FMakefile;h=f1cadb181e14e0161f693012db0a4f59f49f5200;hb=882b7d726febe65579d6502c271412ecb05821d7;hp=e3b1c872b0c3959489e83b662cef0a73dbde548e;hpb=8bde7f776c77b343aca29b8c7b58464d915ac245;p=u-boot diff --git a/board/esd/dasa_sim/Makefile b/board/esd/dasa_sim/Makefile index e3b1c872b0..f1cadb181e 100644 --- a/board/esd/dasa_sim/Makefile +++ b/board/esd/dasa_sim/Makefile @@ -1,6 +1,6 @@ # -# (C) Copyright 2000 +# (C) Copyright 2000-2006 # Wolfgang Denk, DENX Software Engineering, wd@denx.de. # # See file CREDITS for list of people who contributed to this @@ -23,25 +23,32 @@ # include $(TOPDIR)/config.mk +ifneq ($(OBJTREE),$(SRCTREE)) +$(shell mkdir -p $(obj)../common) +endif -LIB = lib$(BOARD).a +LIB = $(obj)lib$(BOARD).o -OBJS = $(BOARD).o flash.o cmd_dasa_sim.o eeprom.o ../common/pci.o +COBJS = $(BOARD).o flash.o cmd_dasa_sim.o eeprom.o ../common/pci.o + +SRCS := $(SOBJS:.o=.S) $(COBJS:.o=.c) +OBJS := $(addprefix $(obj),$(COBJS)) +SOBJS := $(addprefix $(obj),$(SOBJS)) $(LIB): $(OBJS) - $(AR) crv $@ $(OBJS) + $(call cmd_link_o_target, $(OBJS)) clean: rm -f $(SOBJS) $(OBJS) distclean: clean - rm -f $(LIB) core *.bak .depend + rm -f $(LIB) core *.bak $(obj).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 #########################################################################