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