Makefile.am 2.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879
  1. ## Process this file with automake to produce Makefile.in
  2. # Prevent any extension.
  3. EXEEXT =
  4. CXXLD = $(CXX)
  5. CXXLINK = $(LIBTOOL) --tag=CXX --mode=link $(CXXLD) $(AM_CXXFLAGS) \
  6. $(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
  7. EXTRA_DIST = sndfile_load.m sndfile_save.m sndfile_play.m \
  8. octave_test.m octave_test.sh $(oct_module_srcs) PKG_ADD
  9. octconfigdir = $(exec_prefix)/share/octave/site/m
  10. octconfig_DATA = sndfile_load.m sndfile_save.m sndfile_play.m
  11. OCTAVE_DEST_MDIR = @OCTAVE_DEST_MDIR@
  12. OCTAVE_DEST_ODIR = @OCTAVE_DEST_ODIR@/sndfile
  13. OCT_CXXFLAGS = @OCT_CXXFLAGS@
  14. OCT_LIB_DIR = @OCT_LIB_DIR@
  15. OCT_LIBS = @OCT_LIBS@
  16. SNDFILEDIR = $(top_builddir)/src
  17. AM_CPPFLAGS = -I$(SNDFILEDIR)
  18. oct_module_srcs = sndfile.cc
  19. oct_module_files = sndfile.oct PKG_ADD
  20. # Make these noinst so they can be installed manually.
  21. noinst_DATA = $(oct_module_files)
  22. # Used by shave which cleans up automake generated Makefile output.
  23. V = @
  24. Q = $(V:1=)
  25. QUIET_GEN = $(Q:@=@echo ' GEN '$@;)
  26. # Use Octave's mkoctfile to do all the heavy lifting. Unfortunately, its
  27. # a little dumb so we need to guide it carefully.
  28. sndfile.oct : sndfile.o
  29. $(QUIET_GEN) $(MKOCTFILE) -v $(INCLUDES) $(top_builddir)/Octave/$+ -L$(SNDFILEDIR)/.libs -L$(SNDFILEDIR) -lsndfile -o $(top_builddir)/Octave/$@ > /dev/null
  30. sndfile.o : sndfile.cc
  31. $(QUIET_GEN) $(MKOCTFILE) -v $(INCLUDES) -c $+ -o $(top_builddir)/Octave/$@ > /dev/null
  32. # Allow for the test being run in the build dir, but the test script
  33. # being located in the source dir.
  34. check :
  35. octave_src_dir=$(srcdir) $(srcdir)/octave_test.sh
  36. # Since the octave modules are installed in a special location, a custom install
  37. # and uninstall routine must be specified.
  38. install-exec-local : $(oct_module_files)
  39. @$(NORMAL_INSTALL)
  40. test -z "$(OCTAVE_DEST_ODIR)" || $(mkdir_p) "$(DESTDIR)$(OCTAVE_DEST_ODIR)"
  41. @list='$(oct_module_files)'; for p in $$list; do \
  42. p1=`echo $$p|sed 's/$(EXEEXT)$$//'`; \
  43. if test -f $$p \
  44. || test -f $$p1 \
  45. ; then \
  46. f=`echo "$$p1" | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'`; \
  47. echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) --mode=install $(INSTALL) '$$p' '$(DESTDIR)$(OCTAVE_DEST_ODIR)/$$f'"; \
  48. $(INSTALL_PROGRAM_ENV) $(LIBTOOL) --mode=install $(INSTALL) "$$p" "$(DESTDIR)$(OCTAVE_DEST_ODIR)/$$f" || exit 1; \
  49. else :; fi; \
  50. done
  51. uninstall-local :
  52. @$(NORMAL_UNINSTALL)
  53. @list='$(oct_module_files)'; for p in $$list; do \
  54. f=`echo "$$p" | sed 's,^.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/'`; \
  55. echo " rm -f '$(DESTDIR)$(OCTAVE_DEST_ODIR)/$$f'"; \
  56. rm -f "$(DESTDIR)$(OCTAVE_DEST_ODIR)/$$f"; \
  57. done
  58. clean-local :
  59. rm -f sndfile.o sndfile.oct
  60. @if test $(abs_builddir) != $(abs_srcdir) ; then rm -f PKG_ADD ; fi