Revision 320d060a

View differences:

configure
31 31
echo "  --enable-a52bin          open liba52.so.0 at runtime [default=no]"
32 32
echo "  --enable-dts             enable GPLed DTS support [default=no]"
33 33
echo "  --enable-pp              enable GPLed postprocessing support [default=no]"
34
echo "  --enable-static          build static libraries [default=yes]"
35
echo "  --disable-static         do not build static libraries [default=no]"
34 36
echo "  --enable-shared          build shared libraries [default=no]"
37
echo "  --disable-shared         do not build shared libraries [default=yes]"
35 38
echo "  --enable-amr_nb          enable amr_nb float audio codec"
36 39
echo "  --enable-amr_nb-fixed    use fixed point for amr-nb codec"
37 40
echo "  --enable-amr_wb          enable amr_wb float audio codec"
......
206 209
mingwce="no"
207 210
cygwin="no"
208 211
os2="no"
212
lstatic="yes"
209 213
lshared="no"
210 214
optimize="yes"
211 215
debug="yes"
......
549 553
  ;;
550 554
  --enable-mingwce) mingwce="yes"
551 555
  ;;
556
  --enable-static) lstatic="yes"
557
  ;;
558
  --disable-static) lstatic="no"
559
  ;;
552 560
  --enable-shared) lshared="yes"
553 561
  ;;
562
  --disable-shared) lshared="no"
563
  ;;
554 564
  --disable-debug) debug="no"
555 565
  ;;
556 566
  --disable-opts) optimize="no"
......
607 617
  esac
608 618
done
609 619

  
620
# we need to build at least one lib type
621
if test "$lstatic" = "no" && test "$lshared" = "no" ; then
622
    cat <<EOF
623
At least one library type must be built.
624
Specify --enable-static to build the static libraries or --enable-shared to
625
build the shared libraries as well. To only build the shared libraries specify
626
--disable-static in addition to --enable-shared.
627
EOF
628
    exit 1;
629
fi
630

  
610 631
if test "$theora" = "yes" ; then
611 632
    if test "$libogg" = "no"; then
612 633
        echo "libogg must be enabled to enable Theora."
......
869 890
fi
870 891

  
871 892
if test "$mingw32" = "yes" -o "$mingwce" = "yes"; then
893
    if test "$lshared" = "yes" && test "$lstatic" = "yes" ; then
894
        cat <<EOF
895
You can only build one library type at once on MinGW.
896
Specify --disable-static --enable-shared to only build
897
the shared libraries. To build only the static libraries
898
you don't need to pass additional options.
899
EOF
900
        exit 1
901
    fi
872 902
    v4l="no"
873 903
    bktr="no"
874 904
    audio_oss="no"
......
1296 1326
echo "debug symbols    $debug"
1297 1327
echo "strip symbols    $dostrip"
1298 1328
echo "optimize         $optimize"
1329
echo "static           $lstatic"
1299 1330
echo "shared           $lshared"
1300 1331
echo "video hooking    $vhook"
1301 1332
echo "SDL support      $sdl"
......
1364 1395
echo "BUILDSUF=$BUILDSUF" >> config.mak
1365 1396
echo "LIBPREF=$LIBPREF" >> config.mak
1366 1397
echo "LIBSUF=\${BUILDSUF}$LIBSUF" >> config.mak
1367
echo "LIB=$LIB" >> config.mak
1398
if test "$lstatic" = "yes" ; then
1399
  echo "LIB=$LIB" >> config.mak
1400
fi
1368 1401
echo "SLIBPREF=$SLIBPREF" >> config.mak
1369 1402
echo "SLIBSUF=\${BUILDSUF}$SLIBSUF" >> config.mak
1370 1403
echo "EXESUF=\${BUILDSUF}$EXESUF" >> config.mak
......
1508 1541

  
1509 1542

  
1510 1543
if test "$lshared" = "yes" ; then
1544
  echo "#define BUILD_SHARED_AV 1" >> $TMPH
1511 1545
  echo "BUILD_SHARED=yes" >> config.mak
1512 1546
  echo "PIC=-fPIC -DPIC" >> config.mak
1513 1547
  echo "SPPMAJOR=${lavc_version%%.*}" >> config.mak
libavcodec/Makefile
11 11

  
12 12
#FIXME: This should be in configure/config.mak
13 13
ifeq ($(CONFIG_WIN32),yes)
14
    LDFLAGS=-Wl,--output-def,$(@:.dll=.def)
14
    LDFLAGS=-Wl,--output-def,$(@:.dll=.def),--out-implib,lib$(SLIBNAME:$(SLIBSUF)=.dll.a)
15 15
endif
16 16

  
17 17
OBJS= bitstream.o utils.o mem.o allcodecs.o \
......
449 449

  
450 450
clean: $(CLEANAMR)
451 451
	rm -f *.o *.d *~ *.a *.lib *.so *.dylib *.dll \
452
	   *.dll.a *.def *.exp \
452 453
	   i386/*.o i386/*~ \
453 454
	   armv4l/*.o armv4l/*~ \
454 455
	   mlib/*.o mlib/*~ \
libavformat/Makefile
10 10

  
11 11
#FIXME: This should be in configure/config.mak
12 12
ifeq ($(CONFIG_WIN32),yes)
13
    LDFLAGS=-Wl,--output-def,$(@:.dll=.def)
13
    LDFLAGS=-Wl,--output-def,$(@:.dll=.def),--out-implib,lib$(SLIBNAME:$(SLIBSUF)=.dll.a)
14 14
endif
15 15

  
16 16
OBJS= utils.o cutils.o os_support.o allformats.o
......
157 157
	g++ $(subst -Wall,,$(CFLAGS)) -c -o $@ $<
158 158

  
159 159
clean:
160
	rm -f *.o *.d *~ *.a *.lib *.so *.dylib *.dll
160
	rm -f *.o *.d *~ *.a *.lib *.so *.dylib *.dll \
161
	      *.lib *.def *.dll.a *.exp
161 162

  
162 163
distclean: clean
163 164
	rm -f .depend
libavutil/Makefile
6 6
VPATH=$(SRC_PATH)/libavutil
7 7

  
8 8
# NOTE: -I.. is needed to include config.h
9
CFLAGS=$(OPTFLAGS) -DHAVE_AV_CONFIG_H -I.. -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_GNU_SOURCE
9
CFLAGS=$(OPTFLAGS) -DHAVE_AV_CONFIG_H -DBUILD_AVUTIL -I.. -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_GNU_SOURCE
10 10

  
11 11
#FIXME: This should be in configure/config.mak
12 12
ifeq ($(CONFIG_WIN32),yes)
13
    LDFLAGS=-Wl,--output-def,$(@:.dll=.def)
13
    LDFLAGS=-Wl,--output-def,$(@:.dll=.def),--out-implib,lib$(SLIBNAME:$(SLIBSUF)=.dll.a)
14 14
endif
15 15

  
16 16
OBJS= mathematics.o \
......
53 53
dep:	depend
54 54

  
55 55
clean:
56
	rm -f *.o *.d *~ *.a *.lib *.so *.dylib *.dll
56
	rm -f *.o *.d *~ *.a *.lib *.so *.dylib *.dll \
57
	      *.lib *.def *.dll.a *.exp
57 58

  
58 59
distclean: clean
59 60
	rm -f .depend
libavutil/common.h
247 247

  
248 248
#ifdef HAVE_AV_CONFIG_H
249 249

  
250
#if defined(__MINGW32__) && !defined(BUILD_AVUTIL) && defined(BUILD_SHARED_AV)
251
#  define FF_IMPORT_ATTR __declspec(dllimport)
252
#else
253
#  define FF_IMPORT_ATTR
254
#endif
255

  
256

  
250 257
#    include "bswap.h"
251 258

  
252 259
// Use rip-relative addressing if compiling PIC code on x86-64.
......
345 352
#endif
346 353

  
347 354
/* misc math functions */
348
extern const uint8_t ff_log2_tab[256];
355
extern FF_IMPORT_ATTR const uint8_t ff_log2_tab[256];
349 356

  
350 357
static inline int av_log2(unsigned int v)
351 358
{
......
423 430
}
424 431

  
425 432
/* math */
426
extern const uint8_t ff_sqrt_tab[128];
433
extern FF_IMPORT_ATTR const uint8_t ff_sqrt_tab[128];
427 434

  
428 435
int64_t ff_gcd(int64_t a, int64_t b);
429 436

  

Also available in: Unified diff