blob: 7834e283d212e14e7e0f529c315177058a9b677d [file] [log] [blame]
Alexandre Lision7c6f4a62013-09-05 13:27:01 -04001## Process this file with automake to produce Makefile.in
2
3AUTOMAKE_OPTIONS = subdir-objects
4
5INCLUDES = @EXTERNAL_CFLAGS@
6
7lib_LTLIBRARIES = libsndfile.la
8include_HEADERS = sndfile.hh
9nodist_include_HEADERS = sndfile.h
10
11noinst_LTLIBRARIES = GSM610/libgsm.la G72x/libg72x.la libcommon.la
12
13OS_SPECIFIC_CFLAGS = @OS_SPECIFIC_CFLAGS@
14OS_SPECIFIC_LINKS = @OS_SPECIFIC_LINKS@
15
16SYMBOL_FILES = Symbols.gnu-binutils Symbols.darwin libsndfile-1.def Symbols.os2 Symbols.static
17
18EXTRA_DIST = sndfile.h.in config.h.in test_endswap.tpl test_endswap.def \
19 $(SYMBOL_FILES) create_symbols_file.py binheader_writef_check.py \
20 GSM610/README GSM610/COPYRIGHT GSM610/ChangeLog \
21 G72x/README G72x/README.original G72x/ChangeLog \
22 make-static-lib-hidden-privates.sh
23
24noinst_HEADERS = common.h sfconfig.h sfendian.h wav_w64.h sf_unistd.h ogg.h chanmap.h
25
26check_PROGRAMS = test_main G72x/g72x_test
27
28COMMON = common.c file_io.c command.c pcm.c ulaw.c alaw.c float32.c \
29 double64.c ima_adpcm.c ms_adpcm.c gsm610.c dwvw.c vox_adpcm.c \
30 interleave.c strings.c dither.c broadcast.c audio_detect.c \
31 ima_oki_adpcm.c ima_oki_adpcm.h chunk.c ogg.c chanmap.c \
32 windows.c id3.c $(WIN_VERSION_FILE)
33
34FILESPECIFIC = sndfile.c aiff.c au.c avr.c caf.c dwd.c flac.c g72x.c htk.c ircam.c \
35 macbinary3.c macos.c mat4.c mat5.c nist.c paf.c pvf.c raw.c rx2.c sd2.c \
36 sds.c svx.c txw.c voc.c wve.c w64.c wav_w64.c wav.c xi.c mpc2k.c rf64.c \
37 ogg_vorbis.c ogg_speex.c ogg_pcm.c
38
39CLEANFILES = *~
40
41if USE_WIN_VERSION_FILE
42WIN_VERSION_FILE = version-metadata.rc
43else
44WIN_VERSION_FILE =
45endif
46
47#===============================================================================
48# MinGW requires -no-undefined if a DLL is to be built.
49libsndfile_la_LDFLAGS = -no-undefined -version-info @SHARED_VERSION_INFO@ @SHLIB_VERSION_ARG@
50libsndfile_la_SOURCES = $(FILESPECIFIC) $(noinst_HEADERS)
51nodist_libsndfile_la_SOURCES = $(nodist_include_HEADERS)
52libsndfile_la_LIBADD = libcommon.la GSM610/libgsm.la G72x/libg72x.la \
53 @EXTERNAL_LIBS@ -lm
54
55libcommon_la_SOURCES = $(COMMON)
56
57#======================================================================
58# Subdir libraries.
59
60GSM610_libgsm_la_SOURCES = GSM610/config.h GSM610/gsm.h GSM610/gsm610_priv.h \
61 GSM610/add.c GSM610/code.c GSM610/decode.c GSM610/gsm_create.c \
62 GSM610/gsm_decode.c GSM610/gsm_destroy.c GSM610/gsm_encode.c \
63 GSM610/gsm_option.c GSM610/long_term.c GSM610/lpc.c GSM610/preprocess.c \
64 GSM610/rpe.c GSM610/short_term.c GSM610/table.c
65
66G72x_libg72x_la_SOURCES = $(COMMON)G72x/g72x.h G72x/g72x_priv.h \
67 G72x/g721.c G72x/g723_16.c G72x/g723_24.c G72x/g723_40.c G72x/g72x.c
68
69#======================================================================
70# Test programs.
71
72test_main_SOURCES = test_main.c test_main.h test_conversions.c test_float.c test_endswap.c \
73 test_audio_detect.c test_log_printf.c test_file_io.c test_ima_oki_adpcm.c \
74 test_strncpy_crlf.c test_broadcast_var.c
75test_main_LDADD = libcommon.la
76
77G72x_g72x_test_SOURCES = G72x/g72x_test.c
78G72x_g72x_test_LDADD = G72x/libg72x.la
79
80test_endswap.c: test_endswap.def test_endswap.tpl
81 autogen --writable test_endswap.def
82
83genfiles : test_endswap.c $(SYMBOL_FILES)
84
85check :
86 @if [ -x /usr/bin/python ]; then $(srcdir)/binheader_writef_check.py $(srcdir)/*.c ; fi
87 G72x/g72x_test$(EXEEXT) all
88 ./test_main$(EXEEXT)
89
90# Need this target to force building of test programs.
91checkprograms : $(check_PROGRAMS)
92
93#======================================================================
94# Generate an OS specific Symbols files. This is done when the author
95# builds the distribution tarball. There should be not need for the
96# end user to create these files.
97
98Symbols.gnu-binutils: create_symbols_file.py
99 ./create_symbols_file.py linux $(VERSION) > $@
100
101Symbols.darwin: create_symbols_file.py
102 ./create_symbols_file.py darwin $(VERSION) > $@
103
104libsndfile-1.def: create_symbols_file.py
105 ./create_symbols_file.py win32 $(VERSION) > $@
106
107Symbols.os2: create_symbols_file.py
108 ./create_symbols_file.py os2 $(VERSION) > $@
109
110Symbols.static: create_symbols_file.py
111 ./create_symbols_file.py static $(VERSION) > $@
112
113# Fake dependancy to force the creation of these files.
114sndfile.o : $(SYMBOL_FILES)
115
116#======================================================================
117# Building windows resource files (if needed).
118
119.rc.lo:
120 $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --tag=RC --mode=compile $(RC) $(RCFLAGS) $< -o $@
121
122#======================================================================
123# Disable autoheader.
124AUTOHEADER=echo
125
126
127