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.

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