From 1c1b6762472d89851ebf7d9bd15e99d21c8f5de6 Mon Sep 17 00:00:00 2001 From: Steve Karg Date: Thu, 12 May 2022 14:38:04 -0500 Subject: [PATCH] fix DOS command line build using build.bat or build.sh file (#272) Co-authored-by: Steve Karg --- build.bat | 18 +++++++++++++----- build.sh | 15 ++++++++++----- 2 files changed, 23 insertions(+), 10 deletions(-) diff --git a/build.bat b/build.bat index 1de737ca..a2703f9a 100644 --- a/build.bat +++ b/build.bat @@ -1,10 +1,18 @@ @echo off -echo Build with MinGW and MSYS: mingw.sourceforge.net -rem set PATH=C:\MinGW\msys\1.0\bin;C:\MinGW\bin +echo Build with MinGW32 and MSYS: mingw.sourceforge.net +set PATH=C:\MinGW\msys\1.0\bin;C:\MinGW\bin;%PATH% rem assumes rm, cp, size are already in path -set CC=gcc -set AR=ar -set MAKE=make +set CC=mingw32-gcc.exe +set AR=mingw32-gcc-ar.exe +set NM=mingw32-gcc-nm.exe +set NM=mingw32-gcc-nm.exe +set OBJCOPY=objcopy.exe +set SIZE=size.exe +set MAKE=mingw32-make.exe + +doskey make = mingw32-make.exe $* + +make BACNET_PORT=win32 clean make BACNET_PORT=win32 BUILD=release clean all rem Build for MinGW debug diff --git a/build.sh b/build.sh index a158ac4e..f667b8df 100755 --- a/build.sh +++ b/build.sh @@ -1,7 +1,12 @@ #!/bin/sh -rm -rf _build -mkdir _build -cd _build -cmake .. -make +alias make=mingw32-make.exe +PATH=/c/MinGW/bin:$PATH +export MAKE=mingw32-make.exe +export CC=mingw32-gcc.exe +export OBJCOPY=objcopy.exe +export AR=ar.exe +export SIZE=size.exe + +make clean +make all \ No newline at end of file