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.

168 lines
3.7KB

  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)/libavutil -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. # demuxers
  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 mmf.o swf.o au.o gif.o mov.o mpjpeg.o dv.o \
  13. yuv4mpeg.o 4xm.o flvdec.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 \
  16. ogg2.o oggparsevorbis.o oggparsetheora.o oggparseflac.o daud.o
  17. # muxers
  18. ifeq ($(CONFIG_MUXERS),yes)
  19. OBJS+= flvenc.o movenc.o asf-enc.o
  20. endif
  21. AMROBJS=
  22. ifeq ($(AMR_NB),yes)
  23. AMROBJS= amr.o
  24. endif
  25. ifeq ($(AMR_NB_FIXED),yes)
  26. AMROBJS= amr.o
  27. endif
  28. ifeq ($(AMR_WB),yes)
  29. AMROBJS= amr.o
  30. endif
  31. OBJS+= $(AMROBJS)
  32. # image formats
  33. OBJS+= pnm.o yuv.o png.o jpeg.o gifdec.o sgi.o
  34. OBJS+= framehook.o
  35. ifeq ($(CONFIG_VIDEO4LINUX),yes)
  36. OBJS+= grab.o
  37. endif
  38. ifeq ($(CONFIG_BKTR),yes)
  39. OBJS+= grab_bktr.o
  40. endif
  41. ifeq ($(CONFIG_DV1394),yes)
  42. OBJS+= dv1394.o
  43. endif
  44. ifeq ($(CONFIG_DC1394),yes)
  45. OBJS+= dc1394.o
  46. endif
  47. ifeq ($(CONFIG_AUDIO_OSS),yes)
  48. OBJS+= audio.o
  49. endif
  50. EXTRALIBS += -L../libavutil -lavutil$(BUILDSUF)
  51. ifeq ($(CONFIG_AUDIO_BEOS),yes)
  52. PPOBJS+= beosaudio.o
  53. endif
  54. # protocols I/O
  55. OBJS+= avio.o aviobuf.o
  56. ifeq ($(CONFIG_PROTOCOLS),yes)
  57. OBJS+= file.o
  58. ifeq ($(CONFIG_NETWORK),yes)
  59. OBJS+= udp.o tcp.o http.o rtsp.o rtp.o rtpproto.o
  60. # BeOS and Darwin network stuff
  61. ifeq ($(NEED_INET_ATON),yes)
  62. OBJS+= barpainet.o
  63. endif
  64. endif
  65. endif
  66. ifeq ($(CONFIG_LIBOGG),yes)
  67. OBJS+= ogg.o
  68. endif
  69. ifeq ($(TARGET_ARCH_SPARC64),yes)
  70. CFLAGS+= -mcpu=ultrasparc -mtune=ultrasparc
  71. endif
  72. NAME=avformat
  73. ifeq ($(BUILD_SHARED),yes)
  74. LIBVERSION=$(LAVFVERSION)
  75. LIBMAJOR=$(LAVFMAJOR)
  76. AVCLIBS+=-lavcodec$(BUILDSUF) -L../libavcodec -lavutil$(BUILDSUF) -L../libavutil
  77. endif
  78. SRCS := $(OBJS:.o=.c) $(PPOBJS:.o=.cpp)
  79. all: $(LIB) $(SLIBNAME)
  80. $(LIB): $(OBJS) $(PPOBJS)
  81. rm -f $@
  82. $(AR) rc $@ $(OBJS) $(PPOBJS)
  83. $(RANLIB) $@
  84. $(SLIBNAME): $(OBJS)
  85. ifeq ($(CONFIG_WIN32),yes)
  86. $(CC) $(SHFLAGS) -Wl,--output-def,$(@:.dll=.def) -o $@ $(OBJS) $(PPOBJS) $(AVCLIBS) $(EXTRALIBS)
  87. -lib /machine:i386 /def:$(@:.dll=.def)
  88. else
  89. $(CC) $(SHFLAGS) $(LDFLAGS) -o $@ $(OBJS) $(PPOBJS) $(AVCLIBS) $(EXTRALIBS)
  90. endif
  91. depend: $(SRCS)
  92. $(CC) -MM $(CFLAGS) $^ 1>.depend
  93. ifeq ($(BUILD_SHARED),yes)
  94. install: all install-headers
  95. ifeq ($(CONFIG_WIN32),yes)
  96. install $(INSTALLSTRIP) -m 755 $(SLIBNAME) "$(prefix)"
  97. else
  98. install -d $(libdir)
  99. install $(INSTALLSTRIP) -m 755 $(SLIBNAME) \
  100. $(libdir)/$(SLIBNAME_WITH_VERSION)
  101. ln -sf $(SLIBNAME_WITH_VERSION) \
  102. $(libdir)/$(SLIBNAME_WITH_MAJOR)
  103. ln -sf $(SLIBNAME_WITH_VERSION) \
  104. $(libdir)/$(SLIBNAME)
  105. $(LDCONFIG) || true
  106. endif
  107. else
  108. install:
  109. endif
  110. installlib: all install-headers
  111. install -m 644 $(LIB) "$(libdir)"
  112. install-headers:
  113. mkdir -p "$(prefix)/include/ffmpeg"
  114. install -m 644 $(SRC_PATH)/libavformat/avformat.h $(SRC_PATH)/libavformat/avio.h \
  115. $(SRC_PATH)/libavformat/rtp.h $(SRC_PATH)/libavformat/rtsp.h \
  116. $(SRC_PATH)/libavformat/rtspcodes.h \
  117. "$(prefix)/include/ffmpeg"
  118. install -d "$(libdir)/pkgconfig"
  119. install -m 644 ../libavformat.pc "$(libdir)/pkgconfig"
  120. %.o: %.c
  121. $(CC) $(CFLAGS) $(LIBOBJFLAGS) -c -o $@ $<
  122. # BeOS: remove -Wall to get rid of all the "multibyte constant" warnings
  123. %.o: %.cpp
  124. g++ $(subst -Wall,,$(CFLAGS)) -c -o $@ $<
  125. clean:
  126. rm -f *.o *.d *~ *.a *.lib *.so *.dylib *.dll
  127. distclean: clean
  128. rm -f .depend
  129. #
  130. # include dependency files if they exist
  131. #
  132. ifneq ($(wildcard .depend),)
  133. include .depend
  134. endif