to c++ - How do I make a simple makefile for gcc on Linux?
For example this simple Makefile should be sufficient:
CC=gcc CFLAGS=-Wall all: program program: program.o program.o: program.c program.h headers.h clean: rm -f program program.o run: program ./program
Note there must be
<tab> on the next line after clean and run, not spaces.
UPDATE Comments below applied
I have three files:
I need to compile this on Linux using gcc compiler. I'm not sure how to do this. Netbeans created one for me, but it's empty.