libsndfile source files.
[Faustine.git] / interpretor / libsndfile-1.0.25 / Octave / Makefile.am
1 ## Process this file with automake to produce Makefile.in
2
3 # Prevent any extension.
4 EXEEXT =
5
6 CXXLD = $(CXX)
7 CXXLINK = $(LIBTOOL) --tag=CXX --mode=link $(CXXLD) $(AM_CXXFLAGS) \
8 $(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
9
10 EXTRA_DIST = sndfile_load.m sndfile_save.m sndfile_play.m \
11 octave_test.m octave_test.sh $(oct_module_srcs) PKG_ADD
12
13 octconfigdir = $(exec_prefix)/share/octave/site/m
14 octconfig_DATA = sndfile_load.m sndfile_save.m sndfile_play.m
15
16 OCTAVE_DEST_MDIR = @OCTAVE_DEST_MDIR@
17 OCTAVE_DEST_ODIR = @OCTAVE_DEST_ODIR@/sndfile
18
19 OCT_CXXFLAGS = @OCT_CXXFLAGS@
20 OCT_LIB_DIR = @OCT_LIB_DIR@
21 OCT_LIBS = @OCT_LIBS@
22
23 SNDFILEDIR = $(top_builddir)/src
24 INCLUDES = -I$(SNDFILEDIR)
25
26 oct_module_srcs = sndfile.cc
27 oct_module_files = sndfile.oct PKG_ADD
28
29 # Make these noinst so they can be installed manually.
30 noinst_DATA = $(oct_module_files)
31
32
33 # Used by shave which cleans up automake generated Makefile output.
34 V = @
35 Q = $(V:1=)
36 QUIET_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.
41 sndfile.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
44 sndfile.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.
49 check :
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.
55 install-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
69 uninstall-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
77 clean-local :
78 rm -f sndfile.o sndfile.oct