[FFmpeg-cvslog] r20412 - in trunk: Makefile common.mak libavcodec/Makefile subdir.mak
mru
subversion
Thu Oct 29 01:55:36 CET 2009
Author: mru
Date: Thu Oct 29 01:55:35 2009
New Revision: 20412
Log:
Add generic rules for building helpers with HOSTCC
Modified:
trunk/Makefile
trunk/common.mak
trunk/libavcodec/Makefile
trunk/subdir.mak
Modified: trunk/Makefile
==============================================================================
--- trunk/Makefile Wed Oct 28 23:41:45 2009 (r20411)
+++ trunk/Makefile Thu Oct 29 01:55:35 2009 (r20412)
@@ -13,6 +13,7 @@ PROGS_G = $(addsuffix _g$(EXESUF), $
OBJS = $(addsuffix .o, $(PROGS-yes)) cmdutils.o
MANPAGES = $(addprefix doc/, $(addsuffix .1, $(PROGS-yes)))
TOOLS = $(addprefix tools/, $(addsuffix $(EXESUF), cws2fws pktdumper probetest qt-faststart trasher))
+HOSTPROGS = $(addprefix tests/, audiogen videogen rotozoom tiny_psnr)
BASENAMES = ffmpeg ffplay ffserver
ALLPROGS = $(addsuffix $(EXESUF), $(BASENAMES))
@@ -47,7 +48,8 @@ $(PROGS): %$(EXESUF): %_g$(EXESUF)
$(STRIP) $@
SUBDIR_VARS := OBJS FFLIBS CLEANFILES DIRS TESTPROGS EXAMPLES SKIPHEADERS \
- ALTIVEC-OBJS MMX-OBJS NEON-OBJS X86-OBJS YASM-OBJS-FFT YASM-OBJS
+ ALTIVEC-OBJS MMX-OBJS NEON-OBJS X86-OBJS YASM-OBJS-FFT YASM-OBJS \
+ HOSTPROGS
define RESET
$(1) :=
@@ -324,9 +326,6 @@ tests/data/asynth1.sw: tests/audiogen$(H
mkdir -p tests/data
$(BUILD_ROOT)/$< $@
-tests/%$(HOSTEXESUF): tests/%.c
- $(HOSTCC) $(HOSTCFLAGS) $(HOSTLDFLAGS) -o $@ $< $(HOSTLIBS)
-
tests/seek_test$(EXESUF): tests/seek_test.o $(FF_DEP_LIBS)
$(LD) $(FF_LDFLAGS) -o $@ $< $(FF_EXTRALIBS)
Modified: trunk/common.mak
==============================================================================
--- trunk/common.mak Wed Oct 28 23:41:45 2009 (r20411)
+++ trunk/common.mak Thu Oct 29 01:55:35 2009 (r20412)
@@ -61,6 +61,8 @@ FFLDFLAGS := $(addprefix -L$(BUILD_ROO
EXAMPLES := $(addprefix $(SUBDIR),$(addsuffix -example$(EXESUF),$(EXAMPLES)))
OBJS := $(addprefix $(SUBDIR),$(OBJS))
TESTPROGS := $(addprefix $(SUBDIR),$(addsuffix -test$(EXESUF),$(TESTPROGS)))
+HOSTOBJS := $(addprefix $(SUBDIR),$(addsuffix .o,$(HOSTPROGS)))
+HOSTPROGS := $(addprefix $(SUBDIR),$(addsuffix $(HOSTEXESUF),$(HOSTPROGS)))
DEP_LIBS := $(foreach NAME,$(FFLIBS),$(BUILD_ROOT_REL)/lib$(NAME)/$($(CONFIG_SHARED:yes=S)LIBNAME))
@@ -68,6 +70,12 @@ ALLHEADERS := $(subst $(SRC_DIR)/,$(SUBD
SKIPHEADERS = $(addprefix $(SUBDIR),$(SKIPHEADERS-))
checkheaders: $(filter-out $(SKIPHEADERS:.h=.ho),$(ALLHEADERS:.h=.ho))
+$(HOSTOBJS): %.o: %.c
+ $(HOSTCC) $(HOSTCFLAGS) -c -o $@ $<
+
+$(HOSTPROGS): %$(HOSTEXESUF): %.o
+ $(HOSTCC) $(HOSTLDFLAGS) -o $@ $< $(HOSTLIBS)
+
DEPS := $(OBJS:.o=.d)
depend dep: $(DEPS)
Modified: trunk/libavcodec/Makefile
==============================================================================
--- trunk/libavcodec/Makefile Wed Oct 28 23:41:45 2009 (r20411)
+++ trunk/libavcodec/Makefile Thu Oct 29 01:55:35 2009 (r20412)
@@ -685,17 +685,16 @@ TESTPROGS = cabac dct eval fft h264 iirf
TESTPROGS-$(ARCH_X86) += x86/cpuid
TESTPROGS-$(HAVE_MMX) += motion
+HOSTPROGS = costablegen
+
DIRS = alpha arm bfin mlib ppc ps2 sh4 sparc x86
-CLEANFILES = sin_tables.c cos_tables.c costablegen$(HOSTEXESUF) *_tables.h *_tablegen$(HOSTEXESUF)
+CLEANFILES = sin_tables.c cos_tables.c *_tables.h *_tablegen$(HOSTEXESUF)
include $(SUBDIR)../subdir.mak
$(SUBDIR)dct-test$(EXESUF): $(SUBDIR)dctref.o
-$(SUBDIR)costablegen$(HOSTEXESUF): $(SUBDIR)costablegen.c
- $(HOSTCC) $(HOSTCFLAGS) $(HOSTLDFLAGS) -o $@ $< $(HOSTLIBS)
-
$(SUBDIR)cos_tables.c: $(SUBDIR)costablegen$(HOSTEXESUF)
./$< > $@
Modified: trunk/subdir.mak
==============================================================================
--- trunk/subdir.mak Wed Oct 28 23:41:45 2009 (r20411)
+++ trunk/subdir.mak Thu Oct 29 01:55:35 2009 (r20412)
@@ -36,7 +36,8 @@ $(SUBDIR)x86/%.o: $(SUBDIR)x86/%.asm
clean::
rm -f $(addprefix $(SUBDIR),*-example$(EXESUF) *-test$(EXESUF) $(CLEANFILES) $(CLEANSUFFIXES) $(LIBSUFFIXES)) \
- $(addprefix $(SUBDIR), $(foreach suffix,$(CLEANSUFFIXES),$(addsuffix /$(suffix),$(DIRS))))
+ $(addprefix $(SUBDIR), $(foreach suffix,$(CLEANSUFFIXES),$(addsuffix /$(suffix),$(DIRS)))) \
+ $(HOSTOBJS) $(HOSTPROGS)
distclean:: clean
rm -f $(addprefix $(SUBDIR),$(DISTCLEANSUFFIXES)) \
More information about the ffmpeg-cvslog
mailing list