Skip to content

Commit

Permalink
mingw: Use Makefile.unix to build opusfile.
Browse files Browse the repository at this point in the history
This is faster. We still don't have good dependency tracking
among the components, but roughly:

    make
    make opusfile-0.dll
    make package

Should automate the basics of putting together a win32 binary
package. It still doesn't include documentation. See the
mingw/README for additional steps there.

Also, don't copy dll.a files. They don't seem to be necessary.
  • Loading branch information
rillian committed Jun 24, 2020
1 parent a0c9136 commit 1a3c932
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 11 deletions.
12 changes: 5 additions & 7 deletions mingw/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -99,14 +99,12 @@ $(DIST): $(addprefix $(CURDIR)/bin/, libogg-0.dll libopus-0.dll)
#cd .. && make install
mkdir -p $(DIST)
cp ../AUTHORS ../COPYING ../README.md ../include/opusfile.h $@
cp ../.libs/libopusfile-0.dll $@
cp ../.libs/libopusfile.a $@
cp ../.libs/libopusfile.dll.a $@
cp ../.libs/libopusurl-0.dll $@
cp ../.libs/libopusurl.a $@
cp ../.libs/libopusurl.dll.a $@
cp .libs/libopusfile-0.dll $@
cp .libs/libopusfile.a $@
cp .libs/libopusurl-0.dll $@
cp .libs/libopusurl.a $@
cp bin/*.dll $@
cp ../examples/.libs/*.exe $@
cp *.exe $@
cp /usr/i686-w64-mingw32/sys-root/mingw/bin/libgcc_s_dw2-1.dll $@
cp /usr/i686-w64-mingw32/sys-root/mingw/bin/libwinpthread-1.dll $@
i686-w64-mingw32-strip $@/*.exe
Expand Down
9 changes: 5 additions & 4 deletions mingw/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Cross-compiling under mingw

Just running `make` in this directory should download
Just running `make libopusfile-0.dll` in this directory should download
and build opusfile and its dependencies. Some mingw
libraries need to be compiled into the final package.

Expand Down Expand Up @@ -44,12 +44,13 @@ The steps are something like
- Convert README.md to DOS line endings.
- Copy .libs/libopusfile-0.dll to the release dir.
- Copy .libs/libopusfile.a to the release dir.
- Copy .libs/libopusfile.dll.a to the release dir. (May not be needed?)
- Copy .libs/libopusurl-0.dll to the release dir.
- Copy .libs/libopusurl.a to the release dir.
- Copy .libs/libopusurl.dll.a to the release dir. (May not be needed?)
- Copy mingw/bin/*.dll to the release dir for dependencies.
- Copy any other dependent dlls, e.g. on Fedora 23 I needed to copy
- Copy any other dependent dlls, e.g. on Fedora 32 I needed to copy
/usr/i686-w64-mingw32/sys-root/mingw/bin/libgcc_s_dw2-1.dll
/usr/i686-w64-mingw32/sys-root/mingw/bin/libwinpthread-1.dll
On Fedora 23 I needed to copy
/usr/i686-w64-mingw32/sys-root/mingw/bin/libgcc_s_sjlj-1.dll
/usr/i686-w64-mingw32/sys-root/mingw/bin/libwinpthread-1.dll
On Gentoo I needed to copy
Expand Down

0 comments on commit 1a3c932

Please sign in to comment.