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.

130 lines
2.9KB

  1. #
  2. # libavformat Makefile
  3. # (c) 2000-2003 Fabrice Bellard
  4. #
  5. include ../config.mak
  6. VPATH=$(SRC_PATH)/libavformat
  7. CFLAGS= -Wall $(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 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 mp3.o
  15. ifeq ($(CONFIG_RISKY),yes)
  16. OBJS+= asf.o
  17. endif
  18. ifeq ($(AMR_NB),yes) | ifeq ($(AMR_NB_FIXED),yes) | ifeq ($(AMR_WB),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 ($(CONFIG_WIN32),yes)
  63. $(CC) $(SHFLAGS) -Wl,--output-def,$(@:.dll=.def) -o $@ $(OBJS) $(PPOBJS) $(EXTRALIBS) $(VPATH)/../libavcodec/avcodec.dll
  64. -lib /machine:i386 /def:$(@:.dll=.def)
  65. else
  66. $(CC) $(SHFLAGS) -o $@ $(OBJS) $(PPOBJS) $(EXTRALIBS)
  67. endif
  68. depend: $(SRCS)
  69. $(CC) -MM $(CFLAGS) $^ 1>.depend
  70. ifeq ($(BUILD_SHARED),yes)
  71. install: all install-headers
  72. ifeq ($(CONFIG_WIN32),yes)
  73. install -s -m 755 $(SLIB) "$(prefix)"
  74. else
  75. install -d $(prefix)/lib
  76. install -s -m 755 $(SLIB) $(prefix)/lib/libavformat-$(VERSION).so
  77. ln -sf libavformat-$(VERSION).so $(prefix)/lib/libavformat.so
  78. ldconfig || true
  79. endif
  80. else
  81. install:
  82. endif
  83. installlib: all install-headers
  84. install -m 644 $(LIB) $(prefix)/lib
  85. install-headers:
  86. mkdir -p "$(prefix)/include/ffmpeg"
  87. install -m 644 $(SRC_PATH)/libavformat/avformat.h $(SRC_PATH)/libavformat/avio.h \
  88. $(SRC_PATH)/libavformat/rtp.h $(SRC_PATH)/libavformat/rtsp.h \
  89. $(SRC_PATH)/libavformat/rtspcodes.h \
  90. "$(prefix)/include/ffmpeg"
  91. %.o: %.c
  92. $(CC) $(CFLAGS) -c -o $@ $<
  93. # BeOS: remove -Wall to get rid of all the "multibyte constant" warnings
  94. %.o: %.cpp
  95. g++ $(subst -Wall,,$(CFLAGS)) -c -o $@ $<
  96. clean:
  97. rm -f *.o *.d .depend *~ *.a $(LIB)
  98. #
  99. # include dependency files if they exist
  100. #
  101. ifneq ($(wildcard .depend),)
  102. include .depend
  103. endif