X-Git-Url: https://git.sur5r.net/?a=blobdiff_plain;f=board%2Fsacsng%2FMakefile;h=d9e78bae918058c7ba3d8ee0f5c5b9cc468aadbd;hb=6b9408edd3f6af6e91bcc0eebd4aedc0aca28934;hp=baefa4a747e9cfac91add4da13b9f899a136806d;hpb=8bde7f776c77b343aca29b8c7b58464d915ac245;p=u-boot diff --git a/board/sacsng/Makefile b/board/sacsng/Makefile index baefa4a747..d9e78bae91 100644 --- a/board/sacsng/Makefile +++ b/board/sacsng/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,24 +23,22 @@ include $(TOPDIR)/config.mk -LIB = lib$(BOARD).a +LIB = $(obj)lib$(BOARD).o -OBJS := sacsng.o flash.o clkinit.o +COBJS := sacsng.o flash.o clkinit.o -$(LIB): $(OBJS) $(SOBJS) - $(AR) crv $@ $(OBJS) +SRCS := $(SOBJS:.o=.S) $(COBJS:.o=.c) +OBJS := $(addprefix $(obj),$(COBJS)) +SOBJS := $(addprefix $(obj),$(SOBJS)) -clean: - rm -f $(SOBJS) $(OBJS) - -distclean: clean - rm -f $(LIB) core *.bak .depend +$(LIB): $(obj).depend $(OBJS) + $(call cmd_link_o_target, $(OBJS)) ######################################################################### -.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 #########################################################################