- linux-artifact-name = hello-linux.out
- win-artifact-name = hello-windows.exe
- linux-compiler = g++
- # Embed c and c++ libraries (see https://stackoverflow.com/a/6405064)
- win-compiler = i686-w64-mingw32-g++-win32 -static-libstdc++ -static-libgcc
- $(linux-artifact-name): main.cpp
- $(linux-compiler) main.cpp -o $(linux-artifact-name)
- $(win-artifact-name): main.cpp
- $(win-compiler) main.cpp -o $(win-artifact-name)
- clean:
- rm $(linux-artifact-name) $(win-artifact-name)
|