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.

136 lines
3.0KB

  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 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
  15. ifeq ($(CONFIG_RISKY),yes)
  16. OBJS+= asf.o
  17. endif
  18. ifeq ($(AMR_NB),yes)
  19. OBJS+= amr.o
  20. endif
  21. ifeq ($(AMR_NB_FIXED),yes)
  22. OBJS+= amr.o
  23. endif
  24. ifeq ($(AMR_WB),yes)
  25. OBJS+= amr.o
  26. endif
  27. # image formats
  28. OBJS+= pnm.o yuv.o png.o jpeg.o gifdec.o
  29. # file I/O
  30. OBJS+= avio.o aviobuf.o file.o
  31. OBJS+= framehook.o
  32. ifeq ($(CONFIG_VIDEO4LINUX),yes)
  33. OBJS+= grab.o
  34. endif
  35. ifeq ($(CONFIG_DV1394),yes)
  36. OBJS+= dv1394.o
  37. endif
  38. ifeq ($(CONFIG_AUDIO_OSS),yes)
  39. OBJS+= audio.o
  40. endif
  41. ifeq ($(CONFIG_AUDIO_BEOS),yes)
  42. PPOBJS+= beosaudio.o
  43. EXTRALIBS+=-lbe -lmedia
  44. # this should be the default !
  45. EXTRALIBS+=-lavcodec -L../libavcodec
  46. endif
  47. ifeq ($(CONFIG_NETWORK),yes)
  48. OBJS+= udp.o tcp.o http.o rtsp.o rtp.o rtpproto.o
  49. # BeOS and Darwin network stuff
  50. ifeq ($(NEED_INET_ATON),yes)
  51. OBJS+= barpainet.o
  52. endif
  53. endif
  54. ifeq ($(CONFIG_VORBIS),yes)
  55. OBJS+= ogg.o
  56. endif
  57. LIB= $(LIBPREF)avformat$(LIBSUF)
  58. ifeq ($(BUILD_SHARED),yes)
  59. SLIB= $(SLIBPREF)avformat$(SLIBSUF)
  60. endif
  61. SRCS := $(OBJS:.o=.c) $(PPOBJS:.o=.cpp)
  62. all: $(LIB) $(SLIB)
  63. $(LIB): $(OBJS) $(PPOBJS)
  64. rm -f $@
  65. $(AR) rc $@ $(OBJS) $(PPOBJS)
  66. $(RANLIB) $@
  67. $(SLIB): $(OBJS)
  68. ifeq ($(CONFIG_WIN32),yes)
  69. $(CC) $(SHFLAGS) -Wl,--output-def,$(@:.dll=.def) -o $@ $(OBJS) $(PPOBJS) $(EXTRALIBS) $(VPATH)/../libavcodec/avcodec.dll
  70. -lib /machine:i386 /def:$(@:.dll=.def)
  71. else
  72. $(CC) $(SHFLAGS) -o $@ $(OBJS) $(PPOBJS) $(EXTRALIBS)
  73. endif
  74. depend: $(SRCS)
  75. $(CC) -MM $(CFLAGS) $^ 1>.depend
  76. ifeq ($(BUILD_SHARED),yes)
  77. install: all install-headers
  78. ifeq ($(CONFIG_WIN32),yes)
  79. install -s -m 755 $(SLIB) "$(prefix)"
  80. else
  81. install -d $(prefix)/lib
  82. install -s -m 755 $(SLIB) $(prefix)/lib/libavformat-$(VERSION).so
  83. ln -sf libavformat-$(VERSION).so $(prefix)/lib/libavformat.so
  84. ldconfig || true
  85. endif
  86. else
  87. install:
  88. endif
  89. installlib: all install-headers
  90. install -m 644 $(LIB) $(prefix)/lib
  91. install-headers:
  92. mkdir -p "$(prefix)/include/ffmpeg"
  93. install -m 644 $(SRC_PATH)/libavformat/avformat.h $(SRC_PATH)/libavformat/avio.h \
  94. $(SRC_PATH)/libavformat/rtp.h $(SRC_PATH)/libavformat/rtsp.h \
  95. $(SRC_PATH)/libavformat/rtspcodes.h \
  96. "$(prefix)/include/ffmpeg"
  97. %.o: %.c
  98. $(CC) $(CFLAGS) -c -o $@ $<
  99. # BeOS: remove -Wall to get rid of all the "multibyte constant" warnings
  100. %.o: %.cpp
  101. g++ $(subst -Wall,,$(CFLAGS)) -c -o $@ $<
  102. clean:
  103. rm -f *.o *.d .depend *~ *.a $(LIB)
  104. #
  105. # include dependency files if they exist
  106. #
  107. ifneq ($(wildcard .depend),)
  108. include .depend
  109. endif