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.

151 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. 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_DC1394),yes)
  41. OBJS+= dc1394.o
  42. endif
  43. ifeq ($(CONFIG_AUDIO_OSS),yes)
  44. OBJS+= audio.o
  45. endif
  46. ifeq ($(CONFIG_AUDIO_BEOS),yes)
  47. PPOBJS+= beosaudio.o
  48. EXTRALIBS+=-lbe -lmedia
  49. # this should be the default !
  50. EXTRALIBS+=-lavcodec -L../libavcodec
  51. endif
  52. ifeq ($(CONFIG_NETWORK),yes)
  53. OBJS+= udp.o tcp.o http.o rtsp.o rtp.o rtpproto.o
  54. # BeOS and Darwin network stuff
  55. ifeq ($(NEED_INET_ATON),yes)
  56. OBJS+= barpainet.o
  57. endif
  58. endif
  59. ifeq ($(CONFIG_VORBIS),yes)
  60. OBJS+= ogg.o
  61. endif
  62. ifeq ($(TARGET_ARCH_SPARC64),yes)
  63. CFLAGS+= -mcpu=ultrasparc -mtune=ultrasparc
  64. endif
  65. LIB= $(LIBPREF)avformat$(LIBSUF)
  66. ifeq ($(BUILD_SHARED),yes)
  67. SLIB= $(SLIBPREF)avformat$(SLIBSUF)
  68. endif
  69. EXTRALIBS+=-lavcodec -L../libavcodec
  70. ifeq ($(CONFIG_MP3LAME),yes)
  71. EXTRALIBS+=-lmp3lame
  72. endif
  73. SRCS := $(OBJS:.o=.c) $(PPOBJS:.o=.cpp)
  74. all: $(LIB) $(SLIB)
  75. $(LIB): $(OBJS) $(PPOBJS)
  76. rm -f $@
  77. $(AR) rc $@ $(OBJS) $(PPOBJS)
  78. $(RANLIB) $@
  79. $(SLIB): $(OBJS)
  80. ifeq ($(CONFIG_WIN32),yes)
  81. $(CC) $(SHFLAGS) -Wl,--output-def,$(@:.dll=.def) -o $@ $(OBJS) $(PPOBJS) $(EXTRALIBS) $(VPATH)/../libavcodec/avcodec.dll
  82. -lib /machine:i386 /def:$(@:.dll=.def)
  83. else
  84. $(CC) $(SHFLAGS) -o $@ $(OBJS) $(PPOBJS) $(EXTRALIBS)
  85. endif
  86. depend: $(SRCS)
  87. $(CC) -MM $(CFLAGS) $^ 1>.depend
  88. ifeq ($(BUILD_SHARED),yes)
  89. install: all install-headers
  90. ifeq ($(CONFIG_WIN32),yes)
  91. install $(INSTALLSTRIP) -m 755 $(SLIB) "$(prefix)"
  92. else
  93. install -d $(prefix)/lib
  94. install $(INSTALLSTRIP) -m 755 $(SLIB) $(prefix)/lib/libavformat-$(VERSION).so
  95. ln -sf libavformat-$(VERSION).so $(prefix)/lib/libavformat.so
  96. ldconfig || true
  97. endif
  98. else
  99. install:
  100. endif
  101. installlib: all install-headers
  102. install -m 644 $(LIB) $(prefix)/lib
  103. install-headers:
  104. mkdir -p "$(prefix)/include/ffmpeg"
  105. install -m 644 $(SRC_PATH)/libavformat/avformat.h $(SRC_PATH)/libavformat/avio.h \
  106. $(SRC_PATH)/libavformat/rtp.h $(SRC_PATH)/libavformat/rtsp.h \
  107. $(SRC_PATH)/libavformat/rtspcodes.h \
  108. "$(prefix)/include/ffmpeg"
  109. %.o: %.c
  110. $(CC) $(CFLAGS) -c -o $@ $<
  111. # BeOS: remove -Wall to get rid of all the "multibyte constant" warnings
  112. %.o: %.cpp
  113. g++ $(subst -Wall,,$(CFLAGS)) -c -o $@ $<
  114. distclean clean:
  115. rm -f *.o *.d .depend *~ *.a *.so $(LIB)
  116. #
  117. # include dependency files if they exist
  118. #
  119. ifneq ($(wildcard .depend),)
  120. include .depend
  121. endif