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.

89 lines
1.8KB

  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 -DBUILD_AVUTIL -I.. -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_GNU_SOURCE
  8. #FIXME: This should be in configure/config.mak
  9. ifeq ($(CONFIG_WIN32),yes)
  10. LDFLAGS=-Wl,--output-def,$(@:.dll=.def),--out-implib,lib$(SLIBNAME:$(SLIBSUF)=.dll.a)
  11. endif
  12. OBJS= mathematics.o \
  13. integer.o \
  14. rational.o \
  15. intfloat_readwrite.o \
  16. ifeq ($(TARGET_ARCH_SPARC64),yes)
  17. CFLAGS+= -mcpu=ultrasparc -mtune=ultrasparc
  18. endif
  19. SRCS := $(OBJS:.o=.c)
  20. NAME=avutil
  21. ifeq ($(BUILD_SHARED),yes)
  22. LIBVERSION=$(LAVUVERSION)
  23. LIBMAJOR=$(LAVUMAJOR)
  24. endif
  25. all: $(LIB) $(SLIBNAME)
  26. $(LIB): $(OBJS)
  27. rm -f $@
  28. $(AR) rc $@ $(OBJS)
  29. $(RANLIB) $@
  30. $(SLIBNAME): $(OBJS)
  31. $(CC) $(SHFLAGS) $(LDFLAGS) -o $@ $(OBJS) $(EXTRALIBS) $(AMREXTRALIBS)
  32. ifeq ($(CONFIG_WIN32),yes)
  33. -lib /machine:i386 /def:$(@:.dll=.def)
  34. endif
  35. %.o: %.c
  36. $(CC) $(CFLAGS) $(LIBOBJFLAGS) -c -o $@ $<
  37. depend: $(SRCS)
  38. $(CC) -MM $(CFLAGS) $^ 1>.depend
  39. dep: depend
  40. clean:
  41. rm -f *.o *.d *~ *.a *.lib *.so *.dylib *.dll \
  42. *.lib *.def *.dll.a *.exp
  43. distclean: clean
  44. rm -f .depend
  45. install-lib-shared: $(SLIBNAME)
  46. ifeq ($(CONFIG_WIN32),yes)
  47. install $(INSTALLSTRIP) -m 755 $(SLIBNAME) "$(prefix)"
  48. else
  49. install $(INSTALLSTRIP) -m 755 $(SLIBNAME) \
  50. $(libdir)/$(SLIBNAME_WITH_VERSION)
  51. ln -sf $(SLIBNAME_WITH_VERSION) \
  52. $(libdir)/$(SLIBNAME_WITH_MAJOR)
  53. ln -sf $(SLIBNAME_WITH_VERSION) \
  54. $(libdir)/$(SLIBNAME)
  55. endif
  56. install-lib-static: $(LIB)
  57. install -m 644 $(LIB) "$(libdir)"
  58. install-headers:
  59. install -m 644 avutil.h common.h mathematics.h integer.h \
  60. rational.h intfloat_readwrite.h "$(incdir)"
  61. install -m 644 $(SRC_PATH)/libavutil.pc "$(libdir)/pkgconfig"
  62. #
  63. # include dependency files if they exist
  64. #
  65. ifneq ($(wildcard .depend),)
  66. include .depend
  67. endif