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