]> git.sesse.net Git - ffmpeg/commitdiff
Simplify test program build.
authorDiego Biurrun <diego@biurrun.de>
Thu, 5 Oct 2006 17:10:33 +0000 (17:10 +0000)
committerDiego Biurrun <diego@biurrun.de>
Thu, 5 Oct 2006 17:10:33 +0000 (17:10 +0000)
Originally committed as revision 6563 to svn://svn.ffmpeg.org/ffmpeg/trunk

common.mak
libavcodec/Makefile

index 01d44840c885304ed5db0248e27a354f764c1bc4..7ef4693b127b49e222f128f22108adeb4d1ea2c4 100644 (file)
@@ -36,6 +36,9 @@ $(SLIBNAME_WITH_MAJOR): $(SHARED_OBJS)
 %.o: %.cpp
        g++ $(subst -Wall,,$(CFLAGS)) -c -o $@ $<
 
+%: %.o $(LIB)
+       $(CC) $(LDFLAGS) -o $@ $^ $(EXTRALIBS)
+
 depend dep: $(SRCS)
        $(CC) -MM $(CFLAGS) $^ 1>.depend
 
index fbf8e0b17d91ddb6fa92fbf06d99150575a200ed..daef1b2840f2f787ba358ba1c66535eccdb53a2b 100644 (file)
@@ -429,26 +429,18 @@ clean::
        -$(MAKE) -C amr clean
        -$(MAKE) -C amrwb_float -f makefile.gcc clean
 
-# api example program
-apiexample: apiexample.c $(LIB)
-       $(CC) $(CFLAGS) -o $@ $^ $(EXTRALIBS)
+apiexample: apiexample.o $(LIB)
 
-# cpuid test
 cpuid_test: i386/cputest.c
        $(CC) $(CFLAGS) -D__TEST__ -o $@ $<
 
-# testing progs
-
 imgresample-test: imgresample.c $(LIB)
        $(CC) $(CFLAGS) -DTEST -o $@ $^ $(EXTRALIBS)
 
 dct-test: dct-test.o fdctref.o $(LIB)
-       $(CC) -o $@ $^ $(EXTRALIBS)
 
 motion-test: motion_test.o $(LIB)
-       $(CC) -o $@ $^ -lm
 
 fft-test: fft-test.o $(LIB)
-       $(CC) -o $@ $^ $(EXTRALIBS)
 
 .PHONY: amrlibs tests