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.

126 lines
2.9KB

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