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.

153 lines
3.3KB

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