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.

98 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. NAME=avutil
  17. ifeq ($(BUILD_SHARED),yes)
  18. LIBVERSION=$(LAVUVERSION)
  19. LIBMAJOR=$(LAVUMAJOR)
  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 *~ *.a *.lib *.so *.dylib *.dll
  40. distclean: clean
  41. rm -f .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) \
  49. $(libdir)/$(SLIBNAME_WITH_VERSION)
  50. ln -sf $(SLIBNAME_WITH_VERSION) \
  51. $(libdir)/$(SLIBNAME_WITH_MAJOR)
  52. ln -sf $(SLIBNAME_WITH_VERSION) \
  53. $(libdir)/$(SLIBNAME)
  54. $(LDCONFIG) || true
  55. endif
  56. else
  57. install:
  58. endif
  59. installlib: all install-headers
  60. install -m 644 $(LIB) "$(libdir)"
  61. install-headers:
  62. mkdir -p "$(prefix)/include/ffmpeg"
  63. install -m 644 $(SRC_PATH)/libavutil/avutil.h \
  64. $(SRC_PATH)/libavutil/common.h \
  65. $(SRC_PATH)/libavutil/mathematics.h \
  66. $(SRC_PATH)/libavutil/integer.h \
  67. $(SRC_PATH)/libavutil/rational.h \
  68. $(SRC_PATH)/libavutil/intfloat_readwrite.h \
  69. "$(prefix)/include/ffmpeg"
  70. install -d "$(libdir)/pkgconfig"
  71. install -m 644 ../libavutil.pc "$(libdir)/pkgconfig"
  72. #
  73. # include dependency files if they exist
  74. #
  75. ifneq ($(wildcard .depend),)
  76. include .depend
  77. endif