You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

148 lines
3.4KB

  1. #
  2. # libavformat Makefile
  3. # (c) 2000-2003 Fabrice Bellard
  4. #
  5. include ../config.mak
  6. VPATH=$(SRC_PATH)/libavformat
  7. CFLAGS=$(OPTFLAGS) -I.. -I$(SRC_PATH) -I$(SRC_PATH)/libavcodec -DHAVE_AV_CONFIG_H -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_GNU_SOURCE
  8. OBJS= utils.o cutils.o os_support.o allformats.o
  9. PPOBJS=
  10. # mux and demuxes
  11. OBJS+=mpeg.o mpegts.o mpegtsenc.o ffm.o crc.o img.o img2.o raw.o rm.o \
  12. avienc.o avidec.o wav.o swf.o au.o gif.o mov.o mpjpeg.o dv.o \
  13. yuv4mpeg.o 4xm.o flvenc.o flvdec.o movenc.o psxstr.o idroq.o ipmovie.o \
  14. nut.o wc3movie.o mp3.o westwood.o segafilm.o idcin.o flic.o \
  15. sierravmd.o matroska.o sol.o electronicarts.o nsvdec.o asf.o asf-enc.o \
  16. ogg2.o oggparsevorbis.o oggparsetheora.o oggparseflac.o
  17. AMROBJS=
  18. ifeq ($(AMR_NB),yes)
  19. AMROBJS= amr.o
  20. endif
  21. ifeq ($(AMR_NB_FIXED),yes)
  22. AMROBJS= amr.o
  23. endif
  24. ifeq ($(AMR_WB),yes)
  25. AMROBJS= amr.o
  26. endif
  27. OBJS+= $(AMROBJS)
  28. # image formats
  29. OBJS+= pnm.o yuv.o png.o jpeg.o gifdec.o sgi.o
  30. # file I/O
  31. OBJS+= avio.o aviobuf.o file.o
  32. OBJS+= framehook.o
  33. ifeq ($(CONFIG_VIDEO4LINUX),yes)
  34. OBJS+= grab.o
  35. endif
  36. ifeq ($(CONFIG_DV1394),yes)
  37. OBJS+= dv1394.o
  38. endif
  39. ifeq ($(CONFIG_DC1394),yes)
  40. OBJS+= dc1394.o
  41. endif
  42. ifeq ($(CONFIG_AUDIO_OSS),yes)
  43. OBJS+= audio.o
  44. endif
  45. ifeq ($(CONFIG_AUDIO_BEOS),yes)
  46. PPOBJS+= beosaudio.o
  47. EXTRALIBS+=-lbe -lmedia
  48. endif
  49. ifeq ($(CONFIG_NETWORK),yes)
  50. OBJS+= udp.o tcp.o http.o rtsp.o rtp.o rtpproto.o
  51. # BeOS and Darwin network stuff
  52. ifeq ($(NEED_INET_ATON),yes)
  53. OBJS+= barpainet.o
  54. endif
  55. endif
  56. ifeq ($(CONFIG_LIBOGG),yes)
  57. OBJS+= ogg.o
  58. endif
  59. ifeq ($(TARGET_ARCH_SPARC64),yes)
  60. CFLAGS+= -mcpu=ultrasparc -mtune=ultrasparc
  61. endif
  62. LIB= $(LIBPREF)avformat$(LIBSUF)
  63. ifeq ($(BUILD_SHARED),yes)
  64. SLIB= $(SLIBPREF)avformat$(SLIBSUF)
  65. AVCLIBS+=-lavcodec$(BUILDSUF) -L../libavcodec
  66. ifeq ($(CONFIG_MP3LAME),yes)
  67. AVCLIBS+=-lmp3lame
  68. endif
  69. endif
  70. SRCS := $(OBJS:.o=.c) $(PPOBJS:.o=.cpp)
  71. all: $(LIB) $(SLIB)
  72. $(LIB): $(OBJS) $(PPOBJS)
  73. rm -f $@
  74. $(AR) rc $@ $(OBJS) $(PPOBJS)
  75. $(RANLIB) $@
  76. $(SLIB): $(OBJS)
  77. ifeq ($(CONFIG_WIN32),yes)
  78. $(CC) $(SHFLAGS) -Wl,--output-def,$(@:.dll=.def) -o $@ $(OBJS) $(PPOBJS) $(AVCLIBS) $(EXTRALIBS)
  79. -lib /machine:i386 /def:$(@:.dll=.def)
  80. else
  81. $(CC) $(SHFLAGS) -o $@ $(OBJS) $(PPOBJS) $(AVCLIBS) $(EXTRALIBS)
  82. endif
  83. depend: $(SRCS)
  84. $(CC) -MM $(CFLAGS) $^ 1>.depend
  85. ifeq ($(BUILD_SHARED),yes)
  86. install: all install-headers
  87. ifeq ($(CONFIG_WIN32),yes)
  88. install $(INSTALLSTRIP) -m 755 $(SLIB) "$(prefix)"
  89. else
  90. install -d $(libdir)
  91. install $(INSTALLSTRIP) -m 755 $(SLIB) $(libdir)/libavformat-$(VERSION).so
  92. ln -sf libavformat-$(VERSION).so $(libdir)/libavformat.so
  93. $(LDCONFIG) || true
  94. endif
  95. else
  96. install:
  97. endif
  98. installlib: all install-headers
  99. install -m 644 $(LIB) "$(libdir)"
  100. install-headers:
  101. mkdir -p "$(prefix)/include/ffmpeg"
  102. install -m 644 $(SRC_PATH)/libavformat/avformat.h $(SRC_PATH)/libavformat/avio.h \
  103. $(SRC_PATH)/libavformat/rtp.h $(SRC_PATH)/libavformat/rtsp.h \
  104. $(SRC_PATH)/libavformat/rtspcodes.h \
  105. "$(prefix)/include/ffmpeg"
  106. install -d $(libdir)/pkgconfig
  107. install -m 644 ../libavformat.pc $(libdir)/pkgconfig
  108. %.o: %.c
  109. $(CC) $(CFLAGS) -c -o $@ $<
  110. # BeOS: remove -Wall to get rid of all the "multibyte constant" warnings
  111. %.o: %.cpp
  112. g++ $(subst -Wall,,$(CFLAGS)) -c -o $@ $<
  113. distclean clean:
  114. rm -f *.o *.d .depend *~ *.a *.so $(LIB)
  115. #
  116. # include dependency files if they exist
  117. #
  118. ifneq ($(wildcard .depend),)
  119. include .depend
  120. endif