X-Git-Url: https://git.librecmc.org/?a=blobdiff_plain;f=board%2Fcm41xx%2FMakefile;h=952a8ae21bc61321632d739a4e39b6c29f33d156;hb=75183b1a7fc04206d9779d13f16e03853d7e965d;hp=f0d3451989d9359a8ee897b86a28dc538295180f;hpb=16b013e750345afdf73977be73eb046f2b476495;p=oweals%2Fu-boot.git diff --git a/board/cm41xx/Makefile b/board/cm41xx/Makefile index f0d3451989..952a8ae21b 100644 --- a/board/cm41xx/Makefile +++ b/board/cm41xx/Makefile @@ -1,5 +1,5 @@ # -# (C) Copyright 2000, 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,24 +23,28 @@ include $(TOPDIR)/config.mk -LIB = lib$(BOARD).a +LIB = $(obj)lib$(BOARD).a -OBJS := cm41xx.o flash.o +COBJS := cm41xx.o flash.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 #########################################################################