X-Git-Url: https://git.sur5r.net/?a=blobdiff_plain;f=board%2Fo2dnt%2FMakefile;h=3c99739bdbfbb767cd520ac8c02cb2bfce28603e;hb=8d1af94220f62d2227fc7e633c5cef5f78ec4f4a;hp=2eb4366bf71bd26d6ff8665dcb565695ceebea0b;hpb=ec2e5a2ccea77102ba7357d31d5670b4467967d3;p=u-boot 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 #########################################################################