hufrea / byedpi

Bypass DPI
MIT License
1.64k stars 108 forks source link

Improve Makefile #46

Closed dartvader316 closed 2 months ago

dartvader316 commented 2 months ago

Improves Makefile:

  1. Checking if CC is empty does not work because it defaults to "cc", which is linked to gcc on most systems anyway. So do not set it at all. https://www.gnu.org/software/make/manual/html_node/Implicit-Variables.html
  2. Splits objects compiling which allows parallel building.
  3. Recompile only changed files.
  4. Clean only potentially compiled object files, not all (*.o).

Tested with both GNU make and BSD make on Linux. Windows build tested with cross comping from Linux: CC=x86_64-w64-mingw32-gcc make windows