My Notes for Makefile

TC

2018/10/23

Categories: programming Tags: trivial

Although make is part of the gnu toolset, its use is not restricted to compile a c++ program. make can be used to do various kinds of work.

Here is my notes on makefile for my future self. I find it of great help to keep these notes handy. For example, I often come back for this one

Macro

A = a b c
$(A)

Rules

%.o: $(DEPS)
	$(CC) -c -o [email protected] $< $(CFLAGS)

My notes:

Resources

gnu make manual

A Simple Makefile Tutorial

An interesting SO question of makefile use case

comments powered by Disqus