SoftEtherVPN_Stable
SoftEtherVPN_Stable copied to clipboard
allow to redefine ar and ranlib
Makefiles call 'ar r' and 'ranlib' command. It causes issues on cross-compilation (e.g. build on macos for linux target)
This patch allows to redifine ar and ranlib using AR and RANLIB Makefile variables
This patch is fully backward compatible. Default values for AR=ar and RANLIB=ranlib to reproduce current behaviour if these variables are not set.
Signed-off-by: Sergey V. Lobanov [email protected]
Additional comment: Looks like makefiles were deleted in dev/main tree but this (stable) tree is still actual so please accept this patch to stable tree to simplify cross-compile builds
Maybe add a test line, how to cross-compile it under macOS now.
cross-compile example is in OpenWrt project, my version working on macos (build host=macos, target=linux): https://github.com/openwrt/packages/blob/bc8e3e3d7903b5160b2d3a42f80877a1e06e8c0f/net/softethervpn/Makefile
General idea is:
- make hamcore.se2 using host compiler (apple clang on macos) with src/makefiles/macos_XXX.mak Makefile
- shift timestamp for hamcore.se2 to protect it from rebuilding with target toolchain (otherwise, it will fail if target and build hosts are different)
- build everything else using target toolchain with src/makefiles/linux_XXX.mak