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.

142 lines
3.1KB

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