Skip to content

Commit

Permalink
Merge pull request #2749 from jimklimov/Windows_cross_build_documenta…
Browse files Browse the repository at this point in the history
…tion_cleaned

Windows cross build documentation cleaned
  • Loading branch information
jimklimov authored Jan 3, 2025
2 parents bdc139d + 2e95768 commit 9cc85f8
Showing 1 changed file with 29 additions and 5 deletions.
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

0 comments on commit 9cc85f8

Please sign in to comment.