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.

94 lines
2.1KB

  1. #
  2. # libavutil Makefile
  3. #
  4. include ../config.mak
  5. VPATH=$(SRC_PATH)/libavutil
  6. # NOTE: -I.. is needed to include config.h
  7. CFLAGS=$(OPTFLAGS) -DHAVE_AV_CONFIG_H -I.. -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_GNU_SOURCE
  8. OBJS= mathematics.o \
  9. integer.o \
  10. rational.o \
  11. intfloat_readwrite.o \
  12. ifeq ($(TARGET_ARCH_SPARC64),yes)
  13. CFLAGS+= -mcpu=ultrasparc -mtune=ultrasparc
  14. endif
  15. SRCS := $(OBJS:.o=.c)
  16. LIB= $(LIBPREF)avutil$(LIBSUF)
  17. ifeq ($(BUILD_SHARED),yes)
  18. LIBVERSION=$(LAVUMAJOR)
  19. SLIBNAME= $(SLIBPREF)avutil$(SLIBSUF)
  20. endif
  21. all: $(LIB) $(SLIBNAME)
  22. $(LIB): $(OBJS)
  23. rm -f $@
  24. $(AR) rc $@ $(OBJS)
  25. $(RANLIB) $@
  26. $(SLIBNAME): $(OBJS)
  27. ifeq ($(CONFIG_WIN32),yes)
  28. $(CC) $(SHFLAGS) -Wl,--output-def,$(@:.dll=.def) -o $@ $(OBJS) $(EXTRALIBS) $(AMREXTRALIBS)
  29. -lib /machine:i386 /def:$(@:.dll=.def)
  30. else
  31. $(CC) $(SHFLAGS) $(LDFLAGS) -o $@ $(OBJS) $(EXTRALIBS) $(AMREXTRALIBS)
  32. endif
  33. %.o: %.c
  34. $(CC) $(CFLAGS) $(LIBOBJFLAGS) -c -o $@ $<
  35. depend: $(SRCS)
  36. $(CC) -MM $(CFLAGS) $^ 1>.depend
  37. dep: depend
  38. clean:
  39. rm -f *.o *.d *~ .depend $(LIB) $(SLIBNAME) *$(SLIBSUF)
  40. distclean: clean
  41. rm -f Makefile.bak .depend
  42. ifeq ($(BUILD_SHARED),yes)
  43. install: all install-headers
  44. ifeq ($(CONFIG_WIN32),yes)
  45. install $(INSTALLSTRIP) -m 755 $(SLIBNAME) "$(prefix)"
  46. else
  47. install -d $(libdir)
  48. install $(INSTALLSTRIP) -m 755 $(SLIBNAME) $(libdir)/libavutil-$(VERSION)$(SLIBSUF)
  49. ln -sf libavutil-$(VERSION)$(SLIBSUF) $(libdir)/$(SLIBNAME)
  50. $(LDCONFIG) || true
  51. endif
  52. else
  53. install:
  54. endif
  55. installlib: all install-headers
  56. install -m 644 $(LIB) "$(libdir)"
  57. install-headers:
  58. mkdir -p "$(prefix)/include/ffmpeg"
  59. install -m 644 $(SRC_PATH)/libavutil/avutil.h \
  60. $(SRC_PATH)/libavutil/common.h \
  61. $(SRC_PATH)/libavutil/mathematics.h \
  62. $(SRC_PATH)/libavutil/integer.h \
  63. $(SRC_PATH)/libavutil/rational.h \
  64. $(SRC_PATH)/libavutil/intfloat_readwrite.h \
  65. "$(prefix)/include/ffmpeg"
  66. install -d "$(libdir)/pkgconfig"
  67. install -m 644 ../libavutil.pc "$(libdir)/pkgconfig"
  68. #
  69. # include dependency files if they exist
  70. #
  71. ifneq ($(wildcard .depend),)
  72. include .depend
  73. endif