X-Git-Url: https://git.librecmc.org/?a=blobdiff_plain;f=board%2Famcc%2Focotea%2FMakefile;h=284629f23837a45abec56f062971e3bef96c8b84;hb=9c6b47d53ed329b31c5f26e9ec710f67559c07f0;hp=af223d2c5596f9a37b2c3c3d349ea418b6297b27;hpb=05b47540aae996908e48e10a5ff8b69862aadef3;p=oweals%2Fu-boot.git diff --git a/board/amcc/ocotea/Makefile b/board/amcc/ocotea/Makefile index af223d2c55..284629f238 100644 --- a/board/amcc/ocotea/Makefile +++ b/board/amcc/ocotea/Makefile @@ -1,5 +1,5 @@ # -# (C) Copyright 2002 +# (C) Copyright 2002-2006 # Wolfgang Denk, DENX Software Engineering, wd@denx.de. # # See file CREDITS for list of people who contributed to this @@ -23,25 +23,23 @@ include $(TOPDIR)/config.mk -LIB = lib$(BOARD).a +LIB = $(obj)lib$(BOARD).o -OBJS = $(BOARD).o flash.o +COBJS = $(BOARD).o flash.o SOBJS = init.o -$(LIB): $(OBJS) $(SOBJS) - $(AR) crv $@ $(OBJS) - -clean: - rm -f $(SOBJS) $(OBJS) +SRCS := $(SOBJS:.o=.S) $(COBJS:.o=.c) +OBJS := $(addprefix $(obj),$(COBJS)) +SOBJS := $(addprefix $(obj),$(SOBJS)) -distclean: clean - rm -f $(LIB) core *.bak .depend *~ +$(LIB): $(OBJS) $(SOBJS) + $(call cmd_link_o_target, $(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 #########################################################################