History

Preliminary support for compiling with MinGW.

Erik de Castro Lopo committed 22 years ago

Commit 8ef3d1e1 parent 850e9c33 files · +137 −13Browse files

Unified · Split

3 files
  1. ChangeLog +7 −1
  2. Win32/Makefile.mingw.in +107 −0
  3. configure.ac +23 −12
ChangeLog+7−1
@@ -1,3 +1,9 @@
12004-09-12 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
2
3 * configure.ac Win32/Makefile.mingw.in
4 Add preliminary support for compiling on Win32 using MinGW.
5 Bump version to 0.1.2.
6
12004-09-10 Erik de Castro Lopo <erikd AT mega-nerd DOT com>72004-09-10 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
2 8
3 * tests/util.h tests/*.c9 * tests/util.h tests/*.c
@@ -13,7 +19,7 @@ · 9 unmodified lines
132004-08-27 Erik de Castro Lopo <erikd AT mega-nerd DOT com>192004-08-27 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
14 20
15 * src/src_sinc.c21 * src/src_sinc.c
16 Fix typos in converter name strings. Thanks to Tom Szilagyi for find them.22 Fix typos in converter name strings. Thanks to Tom Szilagyi for finding them.
17 23
182004-07-18 Erik de Castro Lopo <erikd AT mega-nerd DOT com>242004-07-18 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
19 25
Win32/Makefile.mingw.in+107−0
@@ -0,0 +1,107 @@
1TARGETS = libsamplerate.dll sndfile-resample.exe varispeed-play.exe
2
3AR = @AR@
4CC = @CC@
5CFLAGS = @CFLAGS@ -Isrc
6COMPILER_IS_GCC = @COMPILER_IS_GCC@
7CPP = @CPP@
8CPPFLAGS = @CPPFLAGS@
9CXX = @CXX@
10DLLTOOL = @DLLTOOL@
11DLLWRAP = @DLLWRAP@
12LDFLAGS = @LDFLAGS@
13LN_S = @LN_S@
14OS_SPECIFIC_CFLAGS = @OS_SPECIFIC_CFLAGS@
15OS_SPECIFIC_LINKS = @OS_SPECIFIC_LINKS@
16PEXPORTS = @PEXPORTS@
17PACKAGE = @PACKAGE@
18PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
19PACKAGE_NAME = @PACKAGE_NAME@
20PACKAGE_STRING = @PACKAGE_STRING@
21PACKAGE_TARNAME = @PACKAGE_TARNAME@
22PACKAGE_VERSION = @PACKAGE_VERSION@
23RANLIB = @RANLIB@
24STRIP = @STRIP@
25
26#====================================================================
27# Targets
28
29all : $(TARGETS)
30
31clean :
32 rm -f $(TARGETS) *.del *.lib src/*.o tests/*.o tests/*.exe
33
34#====================================================================
35
36LINK_OBJS = \
37 src/src_linear.o \
38 src/src_sinc.o \
39 src/src_zoh.o \
40 src/samplerate.o
41
42libsamplerate.dll libsamplerate.lib : $(LINK_OBJS)
43 $(DLLWRAP) --def Win32/libsamplerate.def $(LINK_OBJS) --output-lib libsamplerate.lib -o libsamplerate.dll
44 $(STRIP) libsamplerate.dll
45
46sndfile-resample.exe : examples/sndfile-resample.o libsamplerate.lib
47 $(CC) $+ -o $@
48
49varispeed-play.exe : examples/varispeed-play.o libsamplerate.lib
50 $(CC) $+ -lwinmm -o $@
51
52#====================================================================
53# Testing programs.
54
55TEST_PROGS = \
56 tests/misc_test.exe \
57 tests/termination_test.exe \
58 tests/simple_test.exe \
59 tests/callback_test.exe \
60 tests/reset_test.exe \
61 tests/multi_channel_test.exe \
62 tests/float_short_test.exe \
63 tests/snr_bw_test.exe
64
65
66check : $(TEST_PROGS)
67 tests/misc_test.exe
68 tests/termination_test.exe
69 tests/simple_test.exe
70 tests/callback_test.exe
71 tests/reset_test.exe
72 tests/multi_channel_test.exe
73 tests/float_short_test.exe
74 tests/snr_bw_test.exe
75 @echo ----------------------------------------------------------------------
76 @echo libsamplerate passed all tests
77 @echo ----------------------------------------------------------------------
78
79#====================================================================
80# Test programs.
81
82tests/misc_test.exe : tests/misc_test.o tests/util.o libsamplerate.lib
83 $(CC) $+ -o $@
84
85tests/termination_test.exe : tests/termination_test.o tests/util.o libsamplerate.lib
86 $(CC) $+ -o $@
87
88tests/simple_test.exe : tests/simple_test.o tests/util.o libsamplerate.lib
89 $(CC) $+ -o $@
90
91tests/callback_test.exe : tests/callback_test.o tests/util.o libsamplerate.lib
92 $(CC) $+ -o $@
93
94tests/reset_test.exe : tests/reset_test.o tests/util.o libsamplerate.lib
95 $(CC) $+ -o $@
96
97tests/multi_channel_test.exe : tests/multi_channel_test.o tests/util.o tests/calc_snr.o libsamplerate.lib
98 $(CC) $+ -o $@
99
100tests/float_short_test.exe : tests/float_short_test.o tests/util.o libsamplerate.lib
101 $(CC) $+ -o $@
102
103tests/snr_bw_test.exe : tests/snr_bw_test.o tests/util.o tests/calc_snr.o libsamplerate.lib
104 $(CC) $+ -o $@
105
106# End of Makefile
107#====================================================================
configure.ac+23−12
@@ -35,6 +35,12 @@ AC_PROG_LN_S · 34 unmodified lines
35AC_PROG_LIBTOOL35AC_PROG_LIBTOOL
36AM_PROG_LIBTOOL36AM_PROG_LIBTOOL
37 37
38if test "x-$build_os-$host_os-$target_os" = x-mingw32-mingw32-mingw32 ; then
39 AC_CHECK_PROG(DLLTOOL, dlltool, dlltool)
40 AC_CHECK_PROG(DLLWRAP, dllwrap, dllwrap)
41 AC_CHECK_PROG(PEXPORTS, pexports, pexports)
42 fi
43
38AC_HEADER_STDC44AC_HEADER_STDC
39 45
40AC_CHECK_HEADERS(stdint.h sys/times.h)46AC_CHECK_HEADERS(stdint.h sys/times.h)
@@ -210,17 +216,8 @@ case "$target_os" in · 169 unmodified lines
210 OS_SPECIFIC_INCLUDES="-fpascal-strings -I/Developer/Headers/FlatCarbon"216 OS_SPECIFIC_INCLUDES="-fpascal-strings -I/Developer/Headers/FlatCarbon"
211 OS_SPECIFIC_LINKS="-framework CoreAudio"217 OS_SPECIFIC_LINKS="-framework CoreAudio"
212 ;;218 ;;
213 mingw32msvc)219 mingw32*)
214 AC_CHECK_HEADERS(mmreg.h)220 OS_SPECIFIC_LINKS="-lwinmm"
215 if test "x$ac_cv_header_mmreg_h" = xno ; then
216 AC_MSG_WARN([[******************************************************************]])
217 AC_MSG_WARN([[*** Can't find mmreg.h which means that we can't build one of ]])
218 AC_MSG_WARN([[*** the example programs. The library can however be built. ]])
219 AC_MSG_WARN([[*** To correct this, you can grab the mmreg.h file from the ]])
220 AC_MSG_WARN([[*** WINE project (http://www.winehq.com/) and placing it in a ]])
221 AC_MSG_WARN([[*** directory where the cross compiler can find it. ]])
222 AC_MSG_WARN([[******************************************************************]])
223 fi
224 ;;221 ;;
225 *)222 *)
226 OS_SPECIFIC_INCLUDES=""223 OS_SPECIFIC_INCLUDES=""
@@ -256,11 +253,25 @@ AC_SUBST(HAVE_SNDFILE) · 29 unmodified lines
256AC_SUBST(SNDFILE_CFLAGS)253AC_SUBST(SNDFILE_CFLAGS)
257AC_SUBST(SNDFILE_LIBS)254AC_SUBST(SNDFILE_LIBS)
258 255
259AC_CONFIG_FILES([Makefile src/Version_script Win32/Makefile \256AC_CONFIG_FILES([Makefile src/Version_script Win32/Makefile Win32/Makefile.mingw \
260 src/Makefile examples/Makefile tests/Makefile doc/Makefile \257 src/Makefile examples/Makefile tests/Makefile doc/Makefile \
261 libsamplerate.spec samplerate.pc])258 libsamplerate.spec samplerate.pc])
262AC_OUTPUT259AC_OUTPUT
263 260
261#====================================================================================
262# Special case for MinGW32.
263
264if test "x-$build_os-$host_os-$target_os" = x-mingw32-mingw32-mingw32 ; then
265 cp -f Win32/Makefile.mingw Makefile
266 echo
267 echo "Now run \"make\" and \"make check\"."
268 echo
269 echo "There is no automatic install script on this platform."
270 echo
271
272 exit 0
273 fi
274
264#====================================================================================275#====================================================================================
265 276
266AC_MSG_RESULT([277AC_MSG_RESULT([

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t