Skip to content

Commit

Permalink
unify windows build system
Browse files Browse the repository at this point in the history
  • Loading branch information
shikokuchuo committed Jan 31, 2025
1 parent 3fec6a6 commit 392811a
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 18 deletions.
1 change: 0 additions & 1 deletion cleanup.ucrt

This file was deleted.

1 change: 1 addition & 0 deletions cleanup.win
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
rm -rf src/Makevars install
10 changes: 10 additions & 0 deletions configure.ucrt → configure.win
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@
LIB_VER="110"
TLS_VER="362"

# Find compiler and export flags
CC=`"${R_HOME}/bin/R" CMD config CC`
export CC

tar -xf src/mbedtls-$TLS_VER.tar.xz
cd mbedtls-$TLS_VER
echo "Compiling 'libmbedtls' from source ..."
Expand All @@ -18,5 +22,11 @@ cmake --build . --target install
cd ..
rm -rf nng-$LIB_VER

PKG_CFLAGS="-I../install/include -DNNG_STATIC_LIB"
PKG_LIBS="-L../install/lib -lnng -lmbedtls -lmbedx509 -lmbedcrypto -lbcrypt -lws2_32"

# Write to Makevars
sed -e "s|@cflags@|$PKG_CFLAGS|" -e "s|@libs@|$PKG_LIBS|" src/Makevars.in > src/Makevars

# Success
exit 0
2 changes: 0 additions & 2 deletions src/Makevars.ucrt

This file was deleted.

15 changes: 0 additions & 15 deletions src/Makevars.win

This file was deleted.

0 comments on commit 392811a

Please sign in to comment.