]>
Commit | Line | Data |
---|---|---|
1 | # MinGW specific Makefile for libsamplerate. | |
2 | ||
3 | @SET_MAKE@ | |
4 | ||
5 | PROGRAMS = sndfile-resample.exe | |
6 | TARGETS = libsamplerate.dll $(PROGRAMS) varispeed-play.exe samplerate.pc | |
7 | ||
8 | AR = @AR@ | |
9 | CC = @CC@ | |
10 | CFLAGS = @CFLAGS@ -Isrc | |
11 | COMPILER_IS_GCC = @COMPILER_IS_GCC@ | |
12 | CPP = @CPP@ | |
13 | CPPFLAGS = @CPPFLAGS@ | |
14 | CXX = @CXX@ | |
15 | DLLTOOL = @DLLTOOL@ | |
16 | DLLWRAP = @DLLWRAP@ | |
17 | FFTW3_CFLAGS = @FFTW3_CFLAGS@ | |
18 | FFTW3_LIBS = @FFTW3_LIBS@ | |
19 | INSTALL = @INSTALL@ | |
20 | INSTALL_DATA = ${INSTALL} -m 644 | |
21 | install_sh = @install_sh@ | |
22 | LDFLAGS = @LDFLAGS@ | |
23 | LN_S = @LN_S@ | |
24 | PEXPORTS = @PEXPORTS@ | |
25 | PACKAGE = @PACKAGE@ | |
26 | PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ | |
27 | PACKAGE_NAME = @PACKAGE_NAME@ | |
28 | PACKAGE_STRING = @PACKAGE_STRING@ | |
29 | PACKAGE_TARNAME = @PACKAGE_TARNAME@ | |
30 | PACKAGE_VERSION = @PACKAGE_VERSION@ | |
31 | RANLIB = @RANLIB@ | |
32 | SNDFILE_CFLAGS = -std=c99 @SNDFILE_CFLAGS@ | |
33 | SNDFILE_LIBS = @SNDFILE_LIBS@ | |
34 | STRIP = @STRIP@ | |
35 | ||
36 | #==================================================================== | |
37 | # Target directories. | |
38 | ||
39 | bindir = @bindir@ | |
40 | exec_prefix = @exec_prefix@ | |
41 | htmldocdir = @htmldocdir@ | |
42 | includedir = @includedir@ | |
43 | libdir = @libdir@ | |
44 | pkgconfigdir = @libdir@/pkgconfig | |
45 | prefix = @prefix@ | |
46 | ||
47 | #==================================================================== | |
48 | # Targets | |
49 | ||
50 | all : $(TARGETS) | |
51 | ||
52 | clean : | |
53 | rm -f $(TARGETS) *.del *.lib src/*.o tests/*.o tests/*.exe | |
54 | ||
55 | install : $(TARGETS) | |
56 | $(install_sh) -c libsamplerate.dll $(libdir) | |
57 | $(install_sh) -c samplerate.pc $(pkgconfigdir) | |
58 | @for prog in $(PROGRAMS); do \ | |
59 | echo "installing ... $$prog" ; \ | |
60 | $(install_sh) -c "$$prog" $(bindir) ; \ | |
61 | done; | |
62 | $(install_sh) -c src/samplerate.h $(includedir) | |
63 | ||
64 | uninstall : | |
65 | rm -f $(libdir)/libsamplerate.dll | |
66 | rm -f $(pkgconfigdir)/samplerate.pc | |
67 | @for prog in $(PROGRAMS); do \ | |
68 | echo "removing ... $(bindir)/$$prog" ; \ | |
69 | rm -f $(bindir)/"$$prog" ; \ | |
70 | done; | |
71 | rm -f $(includedir)/samplerate.h | |
72 | ||
73 | #==================================================================== | |
74 | ||
75 | LINK_OBJS = \ | |
76 | src/src_linear.o \ | |
77 | src/src_sinc.o \ | |
78 | src/src_zoh.o \ | |
79 | src/samplerate.o | |
80 | ||
81 | libsamplerate.dll libsamplerate.lib : $(LINK_OBJS) | |
82 | $(DLLWRAP) --def Win32/libsamplerate.def $(LINK_OBJS) --output-lib libsamplerate.lib -o libsamplerate.dll | |
83 | $(STRIP) libsamplerate.dll | |
84 | ||
85 | sndfile-resample.exe : examples/sndfile-resample.c libsamplerate.lib | |
86 | $(CC) $(CFLAGS) $(SNDFILE_CFLAGS) $+ $(SNDFILE_LIBS) -o $@ | |
87 | ||
88 | varispeed-play.exe : examples/varispeed-play.c examples/audio_out.o libsamplerate.lib | |
89 | $(CC) $(CFLAGS) $(SNDFILE_CFLAGS) $+ $(SNDFILE_LIBS) -lwinmm -o $@ | |
90 | ||
91 | examples/audio_out.o : examples/audio_out.c | |
92 | $(CC) $(CFLAGS) $(SNDFILE_CFLAGS) -c $+ -o $@ | |
93 | ||
94 | samplerate.pc : samplerate.pc.in config.status | |
95 | @./config.status $@ | |
96 | ||
97 | config.status : | |
98 | ./configure | |
99 | ||
100 | #==================================================================== | |
101 | # Testing programs. | |
102 | ||
103 | TEST_PROGS = \ | |
104 | tests/misc_test.exe \ | |
105 | tests/termination_test.exe \ | |
106 | tests/simple_test.exe \ | |
107 | tests/callback_test.exe \ | |
108 | tests/reset_test.exe \ | |
109 | tests/multi_channel_test.exe \ | |
110 | tests/float_short_test.exe \ | |
111 | tests/snr_bw_test.exe | |
112 | ||
113 | ||
114 | check : $(TEST_PROGS) | |
115 | tests/misc_test.exe | |
116 | tests/termination_test.exe | |
117 | tests/simple_test.exe | |
118 | tests/callback_test.exe | |
119 | tests/reset_test.exe | |
120 | tests/multi_channel_test.exe | |
121 | tests/float_short_test.exe | |
122 | tests/snr_bw_test.exe | |
123 | @echo ---------------------------------------------------------------------- | |
124 | @echo libsamplerate passed all tests | |
125 | @echo ---------------------------------------------------------------------- | |
126 | ||
127 | #==================================================================== | |
128 | # Test programs. | |
129 | ||
130 | tests/misc_test.exe : tests/misc_test.c tests/util.c libsamplerate.lib | |
131 | $(CC) $(CFLAGS) $+ -o $@ | |
132 | ||
133 | tests/termination_test.exe : tests/termination_test.c tests/util.c libsamplerate.lib | |
134 | $(CC) $(CFLAGS) $+ -o $@ | |
135 | ||
136 | tests/simple_test.exe : tests/simple_test.c tests/util.c libsamplerate.lib | |
137 | $(CC) $(CFLAGS) $+ -o $@ | |
138 | ||
139 | tests/callback_test.exe : tests/callback_test.c tests/util.c libsamplerate.lib | |
140 | $(CC) $(CFLAGS) $+ -o $@ | |
141 | ||
142 | tests/reset_test.exe : tests/reset_test.c tests/util.c libsamplerate.lib | |
143 | $(CC) $(CFLAGS) $+ -o $@ | |
144 | ||
145 | tests/float_short_test.exe : tests/float_short_test.c tests/util.c libsamplerate.lib | |
146 | $(CC) $(CFLAGS) $+ -o $@ | |
147 | ||
148 | tests/multi_channel_test.exe : tests/multi_channel_test.c tests/util.c tests/calc_snr.c libsamplerate.lib | |
149 | $(CC) $(CFLAGS) $(FFTW3_CFLAGS) $+ $(FFTW3_LIBS) -o $@ | |
150 | ||
151 | tests/snr_bw_test.exe : tests/snr_bw_test.c tests/util.c tests/calc_snr.c libsamplerate.lib | |
152 | $(CC) $(CFLAGS) $(FFTW3_CFLAGS) $+ $(FFTW3_LIBS) -o $@ | |
153 | ||
154 | # End of Makefile | |
155 | #==================================================================== |