Search code examples
cmakefile

Whats the simplest MAKEFILE I could have the works for a single C file?


I have a file called "main.c". Whats the simplest Makefile I can have to compile this file into an executable that I can run like ./blah?


Solution

  • all:
         gcc -o blah main.c
    

    You don't need makefile here, simple shell script is OK.