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.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. nut.o
  15. ifeq ($(CONFIG_RISKY),yes)
  16. OBJS+= asf.o
  17. endif
  18. ifeq ($(AMR_NB),yes)
  19. OBJS+= amr.o
  20. endif
  21. # image formats
  22. OBJS+= pnm.o yuv.o png.o jpeg.o gifdec.o
  23. # file I/O
  24. OBJS+= avio.o aviobuf.o file.o
  25. OBJS+= framehook.o
  26. ifeq ($(BUILD_STRPTIME),yes)
  27. OBJS+= strptime.o
  28. endif
  29. ifeq ($(BUILD_LOCALTIME_R),yes)
  30. OBJS+= localtime_r.o
  31. endif
  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 ($(TARGET_MINGW32),yes)
  69. $(CC) $(SHFLAGS) -Wl,--output-def,$(@:.dll=.def) -o $@ $(OBJS) $(PPOBJS) $(EXTRALIBS) $(AMREXTRALIBS) $(VPATH)/../libavcodec/avcodec.dll
  70. -lib /machine:i386 /def:$(@:.dll=.def)
  71. else
  72. $(CC) $(SHFLAGS) -o $@ $(OBJS) $(PPOBJS) $(EXTRALIBS) $(AMREXTRALIBS)
  73. endif
  74. depend: $(SRCS)
  75. $(CC) -MM $(CFLAGS) $^ 1>.depend
  76. install: all
  77. ifeq ($(BUILD_SHARED),yes)
  78. install -d $(prefix)/lib
  79. install -s -m 755 $(SLIB) $(prefix)/lib/libavformat-$(VERSION).so
  80. ln -sf libavformat-$(VERSION).so $(prefix)/lib/libavformat.so
  81. ldconfig || true
  82. mkdir -p $(prefix)/include/ffmpeg
  83. install -m 644 $(VPATH)/avformat.h $(prefix)/include/ffmpeg/avformat.h
  84. install -m 644 $(VPATH)/avio.h $(prefix)/include/ffmpeg/avio.h
  85. install -m 644 $(VPATH)/rtp.h $(prefix)/include/ffmpeg/rtp.h
  86. install -m 644 $(VPATH)/rtsp.h $(prefix)/include/ffmpeg/rtsp.h
  87. install -m 644 $(VPATH)/rtspcodes.h $(prefix)/include/ffmpeg/rtspcodes.h
  88. endif
  89. installlib: all
  90. install -m 644 $(LIB) $(prefix)/lib
  91. mkdir -p $(prefix)/include/ffmpeg
  92. install -m 644 $(SRC_PATH)/libavformat/avformat.h $(SRC_PATH)/libavformat/avio.h \
  93. $(SRC_PATH)/libavformat/rtp.h $(SRC_PATH)/libavformat/rtsp.h \
  94. $(SRC_PATH)/libavformat/rtspcodes.h \
  95. $(prefix)/include/ffmpeg
  96. %.o: %.c
  97. $(CC) $(CFLAGS) -c -o $@ $<
  98. # BeOS: remove -Wall to get rid of all the "multibyte constant" warnings
  99. %.o: %.cpp
  100. g++ $(subst -Wall,,$(CFLAGS)) -c -o $@ $<
  101. clean:
  102. rm -f *.o *.d .depend *~ *.a $(LIB)
  103. #
  104. # include dependency files if they exist
  105. #
  106. ifneq ($(wildcard .depend),)
  107. include .depend
  108. endif