Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Windows cross build documentation cleaned #2749

Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 29 additions & 5 deletions scripts/Windows/README.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -77,12 +77,33 @@ On Redhat and similar systems, use:
You will also need pthread and mingw regex libraries, and other recommended
dependencies as detailed below.

[NOTE]
======
Be sure to install NUT build prerequisites and toolkits, as detailed
in `docs/config-prereqs.txt` file.

If builds complain similarly to
----
syntax error near unexpected token 'LIBUSB_1_0,'
'PKG_CHECK_MODULES(LIBUSB_1_0, libusb-1.0 >= 0.9.1)'
----
make sure you have installed `pkgconf`, e.g.:

# apt-get install pkgconf
======

[NOTE]
================================================================================

If you use script `./build-mingw-nut.sh` mentioned below, you may skip setting
these environment variables when building NUT. You would however need to use
them once (per `ARCH`) to provide the prerequisites below if built from source.
these environment variables when building NUT itself. You would however need
to use them once (per `ARCH`) to provide the prerequisites below if they are
built from source.

The build routines detailed below expect to be run in a terminal (shell per
`ARCH`) with all these environment variables set once and inherited from one
component build to another. Should you need to rebuild something, you would
have to set these variables again in that session.

When using the compilation approach, you would typically use the following
`ARCH`, `HOST_FLAG` and `BUILD_FLAG`, as well as `CC`, `CFLAGS`, `LDFLAGS`
Expand Down Expand Up @@ -222,9 +243,12 @@ presumed inconsequential. You can try a not-"inlined" build instead.

Finally, install the resulting files into locations under `PREFIX`:

:; sudo cp *.dll ${PREFIX}/pthreads/lib/
:; sudo cp *.a ${PREFIX}/lib/
:; sudo cp pthread.h sched.h semaphore.h ${PREFIX}/pthreads/include
:; sudo mkdir -p "${PREFIX}/pthreads/lib/"
:; sudo cp *.dll "${PREFIX}/pthreads/lib/"
:; sudo mkdir -p "${PREFIX}/lib/"
:; sudo cp *.a "${PREFIX}/lib/"
:; sudo mkdir -p "${PREFIX}/pthreads/include/"
:; sudo cp pthread.h sched.h semaphore.h "${PREFIX}/pthreads/include/"


MinGW regex library
Expand Down
Loading