summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorMans Rullgard <mans@mansr.com>2012-10-15 04:05:03 +0100
committerMans Rullgard <mans@mansr.com>2012-10-23 12:00:22 +0100
commit80521c1997a23e148edf89e11b939ab8646297ca (patch)
treebdaee0989d84e85268fb158868e8874589ca8e23 /Makefile
parenta805cefd8b81e551ab7dfb6a7ae8b5a1512e7893 (diff)
downloadffmpeg-80521c1997a23e148edf89e11b939ab8646297ca.tar.gz
build: allow targets to specify extra objects to link with executables
This allows targets to include special objects when linking executables without including them in (shared) libraries. Signed-off-by: Mans Rullgard <mans@mansr.com>
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile8
1 files changed, 4 insertions, 4 deletions
diff --git a/Makefile b/Makefile
index 3202f5d71a..07df53871a 100644
--- a/Makefile
+++ b/Makefile
@@ -59,7 +59,7 @@ PROGS-$(CONFIG_AVPROBE) += avprobe
PROGS-$(CONFIG_AVSERVER) += avserver
PROGS := $(PROGS-yes:%=%$(EXESUF))
-OBJS = cmdutils.o
+OBJS = cmdutils.o $(EXEOBJS)
OBJS-avconv = avconv_opt.o avconv_filter.o
TESTTOOLS = audiogen videogen rotozoom tiny_psnr base64
HOSTPROGS := $(TESTTOOLS:%=tests/%) doc/print_options
@@ -90,8 +90,8 @@ FF_DEP_LIBS := $(DEP_LIBS)
all: $(PROGS)
-$(TOOLS): %$(EXESUF): %.o
- $(LD) $(LDFLAGS) $(LD_O) $< $(ELIBS)
+$(TOOLS): %$(EXESUF): %.o $(EXEOBJS)
+ $(LD) $(LDFLAGS) $(LD_O) $^ $(ELIBS)
tools/cws2fws$(EXESUF): ELIBS = $(ZLIB)
@@ -124,7 +124,7 @@ endef
$(foreach D,$(FFLIBS),$(eval $(call DOSUBDIR,lib$(D))))
define DOPROG
-OBJS-$(1) += $(1).o cmdutils.o
+OBJS-$(1) += $(1).o cmdutils.o $(EXEOBJS)
$(1)$(EXESUF): $$(OBJS-$(1))
$$(OBJS-$(1)): CFLAGS += $(CFLAGS-$(1))
$(1)$(EXESUF): LDFLAGS += $(LDFLAGS-$(1))