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

Allow passing make options to mingw64-build.bat #1441

Closed
Show file tree
Hide file tree
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
2 changes: 2 additions & 0 deletions doc/compiling.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@ On Windows users should ensure that the following software is installed:
2. Move to the `stlink` directory with `cd C:\$Path-to-your-stlink-folder$\`
3. Execute `mingw64-build.bat`

You can provide make options to the call to the bat file. For example, use `-j8` to build in parallel with 8 jobs: `mingw64-build.bat -j8`

Depending on the flavour of compilation the final executables will be placed in the following directories:
- Local compilation: `<project_root>\build-mingw\bin`
- Local installation: `C:\Program Files (x86)\stlink\bin`
Expand Down
14 changes: 10 additions & 4 deletions mingw64-build.bat
Original file line number Diff line number Diff line change
@@ -1,10 +1,16 @@
@echo on
@echo off
set MAKE_OPTIONS=%1

if not "%MAKE_OPTIONS%"=="" (
echo Using custom make options: %MAKE_OPTIONS%
)

@echo on
mkdir build-mingw
cd build-mingw
set PATH=C:\Program Files\CMake\bin;C:\msys64\ucrt64\bin;C:\msys64\mingw64\bin;%PATH%
cmake -G "MinGW Makefiles" ..
mingw32-make
mingw32-make install
mingw32-make package
mingw32-make %MAKE_OPTIONS%
mingw32-make install %MAKE_OPTIONS%
mingw32-make package %MAKE_OPTIONS%
cd ..
Loading