X-Git-Url: https://git.librecmc.org/?a=blobdiff_plain;f=board%2Fo2dnt%2FMakefile;h=3c99739bdbfbb767cd520ac8c02cb2bfce28603e;hb=b9d77535e9335b554af03aa0e0a54b664677d018;hp=2eb4366bf71bd26d6ff8665dcb565695ceebea0b;hpb=6df6d38d2d59ba2964e9ee33aa559707a6c1c4b7;p=oweals%2Fu-boot.git diff --git a/board/o2dnt/Makefile b/board/o2dnt/Makefile index 2eb4366bf7..3c99739bdb 100644 --- a/board/o2dnt/Makefile +++ b/board/o2dnt/Makefile @@ -1,6 +1,6 @@ # -# (C) Copyright 2005 +# (C) Copyright 2005-2006 # Wolfgang Denk, DENX Software Engineering, wd@denx.de. # # See file CREDITS for list of people who contributed to this @@ -24,24 +24,28 @@ include $(TOPDIR)/config.mk -LIB = lib$(BOARD).a +LIB = $(obj)lib$(BOARD).o -OBJS := $(BOARD).o flash.o +COBJS := $(BOARD).o flash.o -$(LIB): $(OBJS) $(SOBJS) - $(AR) crv $@ $(OBJS) +SRCS := $(SOBJS:.o=.S) $(COBJS:.o=.c) +OBJS := $(addprefix $(obj),$(COBJS)) +SOBJS := $(addprefix $(obj),$(SOBJS)) + +$(LIB): $(obj).depend $(OBJS) + $(call cmd_link_o_target, $(OBJS)) 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 #########################################################################