X-Git-Url: https://git.sur5r.net/?a=blobdiff_plain;f=board%2Frsdproto%2FMakefile;h=5c9c33c9fb26f4f1349322872408c2b0d36d0714;hb=8b33abde0ad386de0d786ff260cff634e16ebe9c;hp=9934787e4761abcaf9486076e69c5e5a93f199e3;hpb=ea3b8c58ffad8f701b9f4e7cc4d885bbeaad8d30;p=u-boot diff --git a/board/rsdproto/Makefile b/board/rsdproto/Makefile index 9934787e47..5c9c33c9fb 100644 --- a/board/rsdproto/Makefile +++ b/board/rsdproto/Makefile @@ -1,5 +1,5 @@ # -# (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,29 @@ include $(TOPDIR)/config.mk -LIB = lib$(BOARD).a +LIB = $(obj)lib$(BOARD).a -OBJS := rsdproto.o flash.o +COBJS := rsdproto.o flash.o SOBJS := flash_asm.o -$(LIB): $(OBJS) $(SOBJS) - $(AR) crv $@ $^ +SRCS := $(SOBJS:.o=.S) $(COBJS:.o=.c) +OBJS := $(addprefix $(obj),$(COBJS)) +SOBJS := $(addprefix $(obj),$(SOBJS)) + +$(LIB): $(obj).depend $(OBJS) $(SOBJS) + $(AR) $(ARFLAGS) $@ $(OBJS) $(SOBJS) 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 $(CPPFLAGS) $(SOBJS:.o=.S) $(OBJS:.o=.c) > $@ +# defines $(obj).depend target +include $(SRCTREE)/rules.mk --include .depend +sinclude $(obj).depend #########################################################################