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.

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