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.

135 lines
3.2KB

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