X-Git-Url: https://git.sur5r.net/?a=blobdiff_plain;f=board%2Fbf533-ezkit%2FMakefile;h=e55c1a78a82b5b38b9e3af5a6b587f463d0bfcce;hb=7187db73491c8de0fb56efb5e5134ba5ec443089;hp=677668e07b74f82b563cd738a86627a48396534b;hpb=3f0606ad0b5639f7f22848fe5b4574e754d0470f;p=u-boot diff --git a/board/bf533-ezkit/Makefile b/board/bf533-ezkit/Makefile index 677668e07b..e55c1a78a8 100644 --- a/board/bf533-ezkit/Makefile +++ b/board/bf533-ezkit/Makefile @@ -3,7 +3,7 @@ # # Copyright (c) 2005-2007 Analog Device Inc. # -# (C) Copyright 2000-2004 +# (C) Copyright 2000-2006 # Wolfgang Denk, DENX Software Engineering, wd@denx.de. # # See file CREDITS for list of people who contributed to this @@ -27,22 +27,32 @@ include $(TOPDIR)/config.mk -LIB = lib$(BOARD).a +LIB = $(obj)lib$(BOARD).a -OBJS = $(BOARD).o flash.o +COBJS := $(BOARD).o flash.o -$(LIB): .depend $(OBJS) u-boot.lds - $(AR) cr $@ $(OBJS) +SRCS := $(SOBJS:.o=.S) $(COBJS:.o=.c) +OBJS := $(addprefix $(obj),$(COBJS)) +SOBJS := $(addprefix $(obj),$(SOBJS)) + +$(LIB): $(obj).depend $(OBJS) $(SOBJS) u-boot.lds + $(AR) $(ARFLAGS) $@ $(OBJS) $(SOBJS) u-boot.lds: u-boot.lds.S $(CPP) $(CPPFLAGS) -P -Ubfin $^ > $@.tmp mv -f $@.tmp $@ +clean: + rm -f $(SOBJS) $(OBJS) + +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 #########################################################################