Make program in Linux x86-64 and compile it to mobile phone running android (ARM instruction set requirement because what I know is android is arm based) -- so different OS and different instruction sets of compiled-to program requirement
And a different libc. You not just have to cross compile like for example from x86_64 desktop linux for AArch64 desktop linux, you have to link against Bionic Libc.
For this you can use the NDK from android. For a makefile, you could for example use:
CC=aarch64-linux-android30-clang make target (You have to change linked and ar tool and so on)
Make program in Linux x86-64 and run on Windows on x86-64 machine. Question: What I will need
Use for example mingw. For debian-like, I use this packages:
mingw-w64-x86-64-dev, gcc-mingw-w64, gcc-mingw-w64-x86-64-posix, gcc-mingw-w64-x86-64-posix, gcc-mingw-w64-x86-64-win32-runtime, gcc-mingw-w64-x86-64-win32 (Some may be redundant)