diff options
author | Mans Rullgard <mans@mansr.com> | 2011-07-10 20:26:25 +0100 |
---|---|---|
committer | Mans Rullgard <mans@mansr.com> | 2011-07-10 21:13:38 +0100 |
commit | 28e1c97916b026c8785f54ec591718379b251bbb (patch) | |
tree | 6470dc3b69d61e32eaabde2b979387c5790dd4a5 /common.mak | |
parent | b695256eddf2b3608e6f8da4663d31dcf96612af (diff) | |
download | ffmpeg-28e1c97916b026c8785f54ec591718379b251bbb.tar.gz |
build: rework rules for things in the tools dir
Declaring tools associated with each library in their respective
makefiles allows these tools to easily depend on the correct
prerequisites and link against the libs they need.
Signed-off-by: Mans Rullgard <mans@mansr.com>
Diffstat (limited to 'common.mak')
-rw-r--r-- | common.mak | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/common.mak b/common.mak index bd210462b9..da51495a16 100644 --- a/common.mak +++ b/common.mak @@ -20,6 +20,9 @@ TESTOBJS := $(TESTOBJS:%=$(SUBDIR)%) $(TESTPROGS:%=$(SUBDIR)%-test.o) TESTPROGS := $(TESTPROGS:%=$(SUBDIR)%-test$(EXESUF)) HOSTOBJS := $(HOSTPROGS:%=$(SUBDIR)%.o) HOSTPROGS := $(HOSTPROGS:%=$(SUBDIR)%$(HOSTEXESUF)) +TOOLS += $(TOOLS-yes) +TOOLOBJS := $(TOOLS:%=tools/%.o) +TOOLS := $(TOOLS:%=tools/%$(EXESUF)) DEP_LIBS := $(foreach NAME,$(FFLIBS),lib$(NAME)/$($(CONFIG_SHARED:yes=S)LIBNAME)) @@ -28,6 +31,8 @@ SKIPHEADERS += $(ARCH_HEADERS:%=$(ARCH)/%) $(SKIPHEADERS-) SKIPHEADERS := $(SKIPHEADERS:%=$(SUBDIR)%) checkheaders: $(filter-out $(SKIPHEADERS:.h=.ho),$(ALLHEADERS:.h=.ho)) +alltools: $(TOOLS) + $(HOSTOBJS): %.o: %.c $(HOSTCC) $(HOSTCFLAGS) -c -o $@ $< @@ -37,6 +42,7 @@ $(HOSTPROGS): %$(HOSTEXESUF): %.o $(OBJS): | $(dir $(OBJS)) $(HOSTOBJS): | $(dir $(HOSTOBJS)) $(TESTOBJS): | $(dir $(TESTOBJS)) +$(TOOLOBJS): | tools OBJDIRS := $(OBJDIRS) $(dir $(OBJS) $(HOSTOBJS) $(TESTOBJS)) |