X-Git-Url: https://git.sur5r.net/?a=blobdiff_plain;f=board%2Fsbc2410x%2FMakefile;h=95f2ad120d215038e2864e1ac071f6e6ff34f145;hb=6d8d4ef994a7c46e34b5fe53b1af7aa4f78192bf;hp=ae8665ec3795d11f77adebddd540d91bc8487098;hpb=32cb2c70c46c2be977215eb33aea049add647c09;p=u-boot diff --git a/board/sbc2410x/Makefile b/board/sbc2410x/Makefile index ae8665ec37..95f2ad120d 100644 --- a/board/sbc2410x/Makefile +++ b/board/sbc2410x/Makefile @@ -1,5 +1,5 @@ # -# (C) Copyright 2000, 2001, 2002 +# (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 := sbc2410x.o flash.o +COBJS := sbc2410x.o flash.o SOBJS := lowlevel_init.o -$(LIB): $(OBJS) $(SOBJS) - $(AR) crv $@ $(OBJS) $(SOBJS) +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 #########################################################################