TOC | Prev | Next

Makefile

A makefile is used by the make program to know what to build.

Nobody wants to type gcc -Wall hello.c -o hello over and over.

Makefile-hello

CC=gcc
CFLAGS=-Wall -pedantic

hello: hello.c
	$(CC) $(CFLAGS) hello.c -o hello
TOC | Prev | Next