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.

123 lines
2.8KB

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