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.

128 lines
3.1KB

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