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.

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