2007-05-14 09:55:24 +00:00
|
|
|
## Process this file with automake to produce Makefile.in
|
|
|
|
|
2007-08-25 07:12:35 +00:00
|
|
|
# Prevent any extension.
|
|
|
|
EXEEXT =
|
2007-08-24 21:52:11 +00:00
|
|
|
|
2007-08-25 13:15:21 +00:00
|
|
|
CXXLD = $(CXX)
|
|
|
|
CXXLINK = $(LIBTOOL) --tag=CXX --mode=link $(CXXLD) $(AM_CXXFLAGS) \
|
|
|
|
$(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
|
|
|
|
|
2007-08-25 11:05:25 +00:00
|
|
|
EXTRA_DIST = sndfile_load.m sndfile_save.m sndfile_play.m \
|
2008-10-27 11:14:09 +00:00
|
|
|
octave_test.m octave_test.sh $(oct_module_srcs) PKG_ADD
|
2007-05-14 09:55:24 +00:00
|
|
|
|
|
|
|
octconfigdir = $(exec_prefix)/share/octave/site/m
|
|
|
|
octconfig_DATA = sndfile_load.m sndfile_save.m sndfile_play.m
|
2007-08-24 21:52:11 +00:00
|
|
|
|
2007-08-25 08:58:47 +00:00
|
|
|
OCTAVE_DEST_MDIR = @OCTAVE_DEST_MDIR@
|
2008-10-27 10:05:24 +00:00
|
|
|
OCTAVE_DEST_ODIR = @OCTAVE_DEST_ODIR@/sndfile
|
2007-05-14 09:55:24 +00:00
|
|
|
|
2007-08-25 08:58:47 +00:00
|
|
|
OCT_CXXFLAGS = @OCT_CXXFLAGS@
|
|
|
|
OCT_LIB_DIR = @OCT_LIB_DIR@
|
|
|
|
OCT_LIBS = @OCT_LIBS@
|
2007-08-24 21:52:11 +00:00
|
|
|
|
2007-08-25 13:15:21 +00:00
|
|
|
SNDFILEDIR = $(top_builddir)/src
|
|
|
|
INCLUDES = -I$(SNDFILEDIR)
|
2007-08-25 07:12:35 +00:00
|
|
|
|
2008-10-27 08:53:36 +00:00
|
|
|
oct_module_srcs = sndfile.cc
|
2008-10-27 11:14:09 +00:00
|
|
|
oct_module_files = sndfile.oct PKG_ADD
|
2007-08-25 08:58:47 +00:00
|
|
|
|
|
|
|
# Make these noinst so they can be installed manually.
|
2008-10-27 11:14:09 +00:00
|
|
|
noinst_DATA = $(oct_module_files)
|
2007-08-25 07:12:35 +00:00
|
|
|
|
|
|
|
|
2009-02-23 23:26:10 +00:00
|
|
|
# Used by shave which cleans up automake generated Makefile output.
|
|
|
|
V = @
|
|
|
|
Q = $(V:1=)
|
|
|
|
QUIET_GEN = $(Q:@=@echo ' GEN '$@;)
|
|
|
|
|
|
|
|
|
2008-10-27 11:14:09 +00:00
|
|
|
# Use Octave's mkoctfile to do all the heavy lifting. Unfortunately, its
|
|
|
|
# a little dumb so we need to guide it carefully.
|
|
|
|
sndfile.oct : sndfile.o
|
2009-02-23 23:26:10 +00:00
|
|
|
$(QUIET_GEN) $(MKOCTFILE) -v $(INCLUDES) $(top_builddir)/Octave/$+ -L$(SNDFILEDIR)/.libs -L$(SNDFILEDIR) -lsndfile -o $(top_builddir)/Octave/$@ > /dev/null
|
2008-10-27 11:14:09 +00:00
|
|
|
|
|
|
|
sndfile.o : sndfile.cc
|
2009-02-23 23:26:10 +00:00
|
|
|
$(QUIET_GEN) $(MKOCTFILE) -v $(INCLUDES) -c $+ -o $(top_builddir)/Octave/$@ > /dev/null
|
2007-08-25 11:43:44 +00:00
|
|
|
|
|
|
|
# Allow for the test being run in the build dir, but the test script
|
2007-08-26 02:45:48 +00:00
|
|
|
# being located in the source dir.
|
2007-08-25 11:43:44 +00:00
|
|
|
check :
|
2007-08-26 03:12:04 +00:00
|
|
|
octave_src_dir=$(srcdir) $(srcdir)/octave_test.sh
|
2007-08-25 11:43:44 +00:00
|
|
|
|
|
|
|
|
|
|
|
# Since the octave modules are installed in a special location, a custom install
|
|
|
|
# and uninstall routine must be specified.
|
2008-10-27 11:14:09 +00:00
|
|
|
install-exec-local : $(oct_module_files)
|
2007-08-25 08:58:47 +00:00
|
|
|
@$(NORMAL_INSTALL)
|
|
|
|
test -z "$(OCTAVE_DEST_ODIR)" || $(mkdir_p) "$(DESTDIR)$(OCTAVE_DEST_ODIR)"
|
2008-10-27 11:14:09 +00:00
|
|
|
@list='$(oct_module_files)'; for p in $$list; do \
|
2007-08-25 08:58:47 +00:00
|
|
|
p1=`echo $$p|sed 's/$(EXEEXT)$$//'`; \
|
|
|
|
if test -f $$p \
|
|
|
|
|| test -f $$p1 \
|
|
|
|
; then \
|
|
|
|
f=`echo "$$p1" | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'`; \
|
|
|
|
echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) --mode=install $(INSTALL) '$$p' '$(DESTDIR)$(OCTAVE_DEST_ODIR)/$$f'"; \
|
|
|
|
$(INSTALL_PROGRAM_ENV) $(LIBTOOL) --mode=install $(INSTALL) "$$p" "$(DESTDIR)$(OCTAVE_DEST_ODIR)/$$f" || exit 1; \
|
|
|
|
else :; fi; \
|
|
|
|
done
|
|
|
|
|
|
|
|
uninstall-local :
|
|
|
|
@$(NORMAL_UNINSTALL)
|
2008-10-27 11:14:09 +00:00
|
|
|
@list='$(oct_module_files)'; for p in $$list; do \
|
2007-08-25 08:58:47 +00:00
|
|
|
f=`echo "$$p" | sed 's,^.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/'`; \
|
|
|
|
echo " rm -f '$(DESTDIR)$(OCTAVE_DEST_ODIR)/$$f'"; \
|
|
|
|
rm -f "$(DESTDIR)$(OCTAVE_DEST_ODIR)/$$f"; \
|
|
|
|
done
|
2007-08-25 11:05:25 +00:00
|
|
|
|
2007-08-25 13:15:21 +00:00
|
|
|
clean-local :
|
2008-10-27 11:14:09 +00:00
|
|
|
rm -f sndfile.o sndfile.oct
|