]> git.sesse.net Git - ffmpeg/blobdiff - libavcodec/Makefile
unused variable
[ffmpeg] / libavcodec / Makefile
index 18bdda1ac6686a6a15f5e46349367eebee0b6fe4..44dcfa1d120648957f015ed75ee3d781caf51f82 100644 (file)
@@ -4,16 +4,9 @@
 #
 include ../config.mak
 
-VPATH=$(SRC_PATH)/libavcodec
-
 # NOTE: -I.. is needed to include config.h
 CFLAGS=$(OPTFLAGS) -DHAVE_AV_CONFIG_H -I.. -I$(SRC_PATH)/libavutil -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_GNU_SOURCE $(AMR_CFLAGS)
 
-#FIXME: This should be in configure/config.mak
-ifeq ($(CONFIG_WIN32),yes)
-    LDFLAGS=-Wl,--output-def,$(@:.dll=.def),--out-implib,lib$(SLIBNAME:$(SLIBSUF)=.dll.a)
-endif
-
 OBJS= bitstream.o utils.o mem.o allcodecs.o \
       mpegvideo.o jrevdct.o jfdctfst.o jfdctint.o\
       mpegaudio.o ac3enc.o mjpeg.o resample.o resample2.o dsputil.o \
@@ -25,6 +18,8 @@ OBJS= bitstream.o utils.o mem.o allcodecs.o \
       vp3dsp.o h264idct.o rangecoder.o pnm.o h263.o msmpeg4.o h263dec.o \
       opt.o
 
+HEADERS = avcodec.h dsputil.h
+
 ifeq ($(CONFIG_AASC_DECODER),yes)
     OBJS+= aasc.o
 endif
@@ -34,6 +29,9 @@ endif
 ifneq ($(CONFIG_ASV1_DECODER)$(CONFIG_ASV1_ENCODER)$(CONFIG_ASV2_DECODER)$(CONFIG_ASV2_ENCODER),)
     OBJS+= asv1.o
 endif
+ifeq ($(CONFIG_AVS_DECODER),yes)
+    OBJS+= avs.o
+endif
 ifeq ($(CONFIG_CINEPAK_DECODER),yes)
     OBJS+= cinepak.o
 endif
@@ -169,6 +167,9 @@ endif
 ifeq ($(CONFIG_TRUESPEECH_DECODER),yes)
     OBJS+= truespeech.o
 endif
+ifeq ($(CONFIG_TTA_DECODER),yes)
+    OBJS+= tta.o
+endif
 ifeq ($(CONFIG_TSCC_DECODER),yes)
     OBJS+= tscc.o
 endif
@@ -215,6 +216,12 @@ endif
 ifeq ($(CONFIG_BMP_DECODER),yes)
        OBJS+= bmp.o
 endif
+ifeq ($(CONFIG_MMVIDEO_DECODER),yes)
+       OBJS+= mmvideo.o
+endif
+ifeq ($(CONFIG_ZMBV_DECODER),yes)
+       OBJS+= zmbv.o
+endif
 
 AMROBJS=
 ifeq ($(AMR_NB),yes)
@@ -300,15 +307,6 @@ ifeq ($(CONFIG_X264),yes)
 OBJS+= x264.o
 endif
 
-ifeq ($(CONFIG_PP),yes)
-ifeq ($(BUILD_SHARED),yes)
-EXTRALIBS += -Llibpostproc -lpostproc$(BUILDSUF)
-else
-# LIBS += libpostproc/libpostproc.a ... should be fixed
-OBJS += libpostproc/postprocess.o
-endif
-endif
-
 ifeq ($(CONFIG_MP3LAME),yes)
 OBJS += mp3lameaudio.o
 endif
@@ -326,18 +324,13 @@ ifeq ($(CONFIG_LIBGSM),yes)
 OBJS += libgsm.o
 endif
 
-ifeq ($(TARGET_GPROF),yes)
-CFLAGS+=-p
-LDFLAGS+=-p
-endif
-
 # i386 mmx specific stuff
 ifeq ($(TARGET_MMX),yes)
 OBJS += i386/fdct_mmx.o i386/cputest.o \
        i386/dsputil_mmx.o i386/mpegvideo_mmx.o \
        i386/idct_mmx.o i386/motion_est_mmx.o \
        i386/simple_idct_mmx.o i386/fft_sse.o i386/vp3dsp_mmx.o \
-       i386/vp3dsp_sse2.o
+       i386/vp3dsp_sse2.o i386/fft_3dn.o i386/fft_3dn2.o
 ifeq ($(CONFIG_GPL),yes)
 OBJS += i386/idct_mmx_xvid.o
 endif
@@ -345,6 +338,10 @@ ifdef TARGET_BUILTIN_VECTOR
 i386/fft_sse.o: CFLAGS+= -msse
 depend: CFLAGS+= -msse
 endif
+ifdef TARGET_BUILTIN_3DNOW
+i386/fft_3dn.o: CFLAGS+= -m3dnow
+i386/fft_3dn2.o: CFLAGS+= -march=athlon
+endif
 endif
 
 # armv4l specific stuff
@@ -400,14 +397,9 @@ OBJS+=sparc/dsputil_vis.o
 sparc/%.o: sparc/%.c
        $(CC) -mcpu=ultrasparc -mtune=ultrasparc $(CFLAGS) -c -o $@ $<
 endif
-ifeq ($(TARGET_ARCH_SPARC64),yes)
-CFLAGS+= -mcpu=ultrasparc -mtune=ultrasparc
-endif
-
-SRCS := $(OBJS:.o=.c) $(ASM_OBJS:.o=.S)
-OBJS := $(OBJS) $(ASM_OBJS)
 
 NAME=avcodec
+SUBDIR=libavcodec
 LIBAVUTIL= $(SRC_PATH)/libavutil/$(LIBPREF)avutil$(LIBSUF)
 ifeq ($(BUILD_SHARED),yes)
 LIBVERSION=$(LAVCVERSION)
@@ -415,46 +407,21 @@ LIBMAJOR=$(LAVCMAJOR)
 endif
 TESTS= imgresample-test dct-test motion-test fft-test
 
-all: $(LIB) $(SLIBNAME)
+EXTRAOBJS = $(AMREXTRALIBS)
+
+include $(SRC_PATH)/common.mak
+
+$(LIB): $(AMRLIBS)
 
 amrlibs:
        $(MAKE) -C amr spclib fipoplib
 
 tests: apiexample cpuid_test $(TESTS)
 
-$(LIB): $(OBJS) $(AMRLIBS)
-       rm -f $@
-       $(AR) rc $@ $(OBJS) $(AMREXTRALIBS)
-       $(RANLIB) $@
-
-$(SLIBNAME): $(OBJS)
-ifeq ($(CONFIG_PP),yes)
-       $(MAKE) -C libpostproc
-endif
-       $(CC) $(SHFLAGS) $(LDFLAGS) -o $@ $(OBJS) $(EXTRALIBS) $(AMREXTRALIBS)
-ifeq ($(CONFIG_WIN32),yes)
-       -lib /machine:i386 /def:$(@:.dll=.def)
-endif
-
 dsputil.o: dsputil.c dsputil.h
 
-libpostproc/libpostproc.a:
-       $(MAKE) -C libpostproc
-
-%.o: %.c
-       $(CC) $(CFLAGS) $(LIBOBJFLAGS) -c -o $@ $<
-
-%.o: %.S
-       $(CC) $(CFLAGS) $(LIBOBJFLAGS) -c -o $@ $<
-
-depend: $(SRCS)
-       $(CC) -MM $(CFLAGS) $^ 1>.depend
-
-dep:   depend
-
-clean: $(CLEANAMR)
-       rm -f *.o *.d *~ *.a *.lib *.so *.dylib *.dll \
-          *.dll.a *.def *.exp \
+clean:: $(CLEANAMR)
+       rm -f \
           i386/*.o i386/*~ \
           armv4l/*.o armv4l/*~ \
           mlib/*.o mlib/*~ \
@@ -465,11 +432,6 @@ clean: $(CLEANAMR)
           sparc/*.o sparc/*~ \
           liba52/*.o liba52/*~ \
           apiexample $(TESTS)
-       $(MAKE) -C libpostproc clean
-
-distclean: clean
-       rm -f .depend
-       $(MAKE) -C libpostproc distclean
 
 cleanamr:
        $(MAKE) -C amr clean
@@ -501,43 +463,3 @@ motion-test: motion_test.o $(LIB)
 
 fft-test: fft-test.o $(LIB)
        $(CC) -o $@ $^ $(LIBAVUTIL) -lm
-
-ifeq ($(BUILD_SHARED),yes)
-install: all install-headers
-ifeq ($(CONFIG_WIN32),yes)
-       install $(INSTALLSTRIP) -m 755 $(SLIBNAME) "$(prefix)"
-else
-       install -d $(libdir)
-       install $(INSTALLSTRIP) -m 755 $(SLIBNAME) \
-               $(libdir)/$(SLIBNAME_WITH_VERSION)
-       ln -sf $(SLIBNAME_WITH_VERSION) \
-               $(libdir)/$(SLIBNAME_WITH_MAJOR)
-       ln -sf $(SLIBNAME_WITH_VERSION) \
-               $(libdir)/$(SLIBNAME)
-       $(LDCONFIG) || true
-endif
-ifeq ($(CONFIG_PP),yes)
-       $(MAKE) -C libpostproc $@
-endif
-else
-install:
-endif
-
-installlib: all install-headers
-       install -m 644 $(LIB) "$(libdir)"
-
-install-headers:
-       mkdir -p "$(prefix)/include/ffmpeg"
-       install -m 644 $(SRC_PATH)/libavcodec/avcodec.h \
-                "$(prefix)/include/ffmpeg"
-       install -m 644 $(SRC_PATH)/libavcodec/dsputil.h \
-                "$(prefix)/include/ffmpeg"
-       install -d "$(libdir)/pkgconfig"
-       install -m 644 ../libavcodec.pc "$(libdir)/pkgconfig"
-
-#
-# include dependency files if they exist
-#
-ifneq ($(wildcard .depend),)
-include .depend
-endif