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.

21 lines
858 B

  1. SWIFTC = /usr/bin/swiftc
  2. INSTALL_NAME_TOOL = /usr/bin/install_name_tool
  3. SWIFTLIB = libswiftspeech.dylib
  4. LIBDIR = ../inst/lib
  5. DEVLIB = ../lib
  6. PKG_LIBS = -lswiftspeech -L../inst/lib
  7. all: $(SHLIB) swiftLibrary
  8. swiftLibrary: $(SWIFTLIB)
  9. -@if test ! -e $(LIBDIR); then mkdir -p $(LIBDIR); fi
  10. -@if test ! -e $(DEVLIB); then mkdir -p $(DEVLIB); fi
  11. cp $(SWIFTLIB) $(LIBDIR)
  12. cp $(SWIFTLIB) $(DEVLIB)
  13. $(SWIFTLIB): $(OBJECTS)
  14. $(SHLIB_CXXLD) -o $(SWIFTLIB) $^ $(SHLIB_CXXLDFLAGS) $(LDFLAGS) $(ALL_LIBS)
  15. $(SWIFTC) -I /Library/Frameworks/R.framework/Headers -F/Library/Frameworks -framework R -framework CoreML -framework NaturalLanguage -import-objc-header swiftspeech.h -emit-library swiftspeech.swift
  16. $(INSTALL_NAME_TOOL) -change $(SWIFTLIB) @loader_path/../lib/$(SWIFTLIB) swiftspeech.so
  17. clean:
  18. rm -Rf $(SHLIB) $(SWIFTLIB) $(OBJECTS) $(DEVLIB)/$(SWIFTLIB)