If I want to make a commandline tool using makefile for, say this C program:
# include<stdio.h>
int main()
{
printf("Hello World!");
return 0;
}
I have no previous experience with makefile or linux shell commands whatsoever. Just starting out. Can anyone tell me how to go about it?
You don’t really need a makefile for a single source file like this – just compile it like this:
If you really want a makefile though then you can do something like this:
then from the command line you could say:
or even just