View Code? Open in Web Editor
NEW
This project aims to create a crystal clear tutorial on a cryptic looking topic.
Home Page: https://clemedon.github.io/Makefile_tutor/
License: Creative Commons Attribution Share Alike 4.0 International
makefile_tutor's People
Contributors
makefile_tutor's Issues
Hello,
I would like to suggest this approach:
https://www.gnu.org/software/make/manual/html_node/Multi_002dLine.html
Instead of...:
SRCS := \
main.c \
arom/coco.c \
base/milk.c \
base/water.c
...I usually do this:
define SRCS :=
main.c
arom/coco.c
base/milk.c
base/water.c
endef
Using define
is less error prone and looks clearer ofc.
And eventually an automated approach, which will take care of any *.c files:
SRCS := $(wildcard $(SRC_DIR)/*.c)