From 07b3790d36266358e3bda19cec3b843e5129a986 Mon Sep 17 00:00:00 2001 From: Mans Rullgard Date: Mon, 15 Oct 2012 03:59:16 +0100 Subject: [PATCH] build: simplify linking tools with cmdutils.o This avoids repeating cmdutils.o in both the prerequisites and the link command. Signed-off-by: Mans Rullgard --- Makefile | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Makefile b/Makefile index 1cbf2aa1e2..3202f5d71a 100644 --- a/Makefile +++ b/Makefile @@ -124,8 +124,8 @@ endef $(foreach D,$(FFLIBS),$(eval $(call DOSUBDIR,lib$(D)))) define DOPROG -OBJS-$(1) += $(1).o -$(1)$(EXESUF): $(OBJS-$(1)) +OBJS-$(1) += $(1).o cmdutils.o +$(1)$(EXESUF): $$(OBJS-$(1)) $$(OBJS-$(1)): CFLAGS += $(CFLAGS-$(1)) $(1)$(EXESUF): LDFLAGS += $(LDFLAGS-$(1)) $(1)$(EXESUF): FF_EXTRALIBS += $(LIBS-$(1)) @@ -134,8 +134,8 @@ endef $(foreach P,$(PROGS-yes),$(eval $(call DOPROG,$(P)))) -$(PROGS): %$(EXESUF): %.o cmdutils.o $(FF_DEP_LIBS) - $(LD) $(LDFLAGS) $(LD_O) $(OBJS-$*) cmdutils.o $(FF_EXTRALIBS) +$(PROGS): %$(EXESUF): %.o $(FF_DEP_LIBS) + $(LD) $(LDFLAGS) $(LD_O) $(OBJS-$*) $(FF_EXTRALIBS) OBJDIRS += tools