You should give darling a spin.
Darling is:
Darling is a runtime environment for OS X applications.
It's like WINE for Mac OS X. Although it is still relatively a small
project, you can already compile applications using Xcode using darling.
Darling [~]$ hdiutil attach Xcode_7.2.dmg
/Volumes/Xcode_7.2
Darling [~]$ cp -r /Volumes/Xcode_7.2/Xcode.app /Applications
Darling [~]$ export SDKROOT=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk
Darling [~]$ echo 'void main() { puts("Hello world"); }' > helloworld.c
Darling [~]$ /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang helloworld.c -o helloworld
Darling [~]$ ./helloworld
Hello world
I'm not sure a more complicated program will compile correctly and will work on Mac, but it's worth a try.
Alternatively, you can run Mac OS X on a Virtualbox inside Linux, and then transfer the compiled files to the destination machine.
tcpdump
andlibpcap
come preinstalled on macOS. – Microvolt