Closed amokmen closed 1 year ago
You don't need to modify Makefile
at all. Revert all changes, run make clean
, create file named .config
with the following contents and recompile.
CPU=x86_64
SYS=Win64
CC=x86_64-w64-mingw32-gcc
STRIP=x86_64-w64-mingw32-strip
WINDRES=x86_64-w64-mingw32-windres
CONFIG_WINDOWS=y
Thank you!
So, as I see, I did half-way :)
Was wrong compiler - gcc
(by default from Makefile
).
And complete new setting SYS
.
Well, should I add PR to create .config file? Or you could add it by yourself?
# Optional configuration file for Makefile
# Any symbol after "=" would initialize variable, in other words would make it "true"
CONFIG_X86_NO_SSE_MATH=
CONFIG_VARIABLE_SERVER_FPS=
# Three mutually exclusive options
CONFIG_SQLITE=
CONFIG_CURL=
CONFIG_UDP=
# Cross-compile section (uncomment all lines if need to compile for Windows)
# For Ubuntu there should be pre-installed: `sudo apt install mingw-w64`
#CONFIG_WINDOWS=y
#CPU=x86_64
#SYS=Win64
#CC=x86_64-w64-mingw32-gcc
#STRIP=x86_64-w64-mingw32-strip
#WINDRES=x86_64-w64-mingw32-windres
And probably second file - INSTALL.md
with smth like this:
Install
Check out
.config
file for all compiling options and cross-compile info.
SYS
is actually not needed, I forgot about that.
.config
file is supposed to be created by user, thus it should not exist by default. Maybe it belongs to examples/
. But I plan to ditch legacy Makefile-based build system anyway, so it will become obsolete very soon.
is supposed to be created by user
Yeap, like this? :)
cat Makefile | grep CONFIG | tail -7 | cut -d" " -f2
Poor user :(
it will become obsolete very soon.
Okay then.
I am noob in compilation and absolute zero at cross-compilation. Lost 2 hours for useless and stupid monkey-copy-pasting.
Installed
sudo apt install mingw-w64
.Changes in
Makefile
:Tried to set:
Tried to remove (because of errors):
Added search path
-L "/usr/x86_64-w64-mingw32/lib/"
here:Last output: