From 7a455a4bda7089f85f81f4b713fbc2de928c95bb Mon Sep 17 00:00:00 2001 From: Jonathan Moallem Date: Sat, 9 Jan 2021 23:43:39 +1100 Subject: [PATCH] Blocked out all target subsection of makefile explanation doc --- docs/MakefileExplanation.md | 38 +++++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) diff --git a/docs/MakefileExplanation.md b/docs/MakefileExplanation.md index bb0ae6f..37308ec 100644 --- a/docs/MakefileExplanation.md +++ b/docs/MakefileExplanation.md @@ -145,3 +145,41 @@ Once all of these targets have been fulfilled, `setup` ends and your project sho ### all This subsection is still being written + +```Makefile +all: $(target) execute clean +``` + +```Makefile +$(target): $(objects) + $(CXX) $(objects) -o $(target) $(linkFlags) +``` + +```Makefile +$(buildDir)/%.o: src/%.cpp Makefile + $(MKDIR) $(call platformpth, $(@D)) + $(CXX) -MMD -MP -c $(compileFlags) $< -o $@ +``` + +```Makefile +-include $(depends) +``` + +```Makefile +$(target): $(objects) + $(CXX) $(objects) -o $(target) $(linkFlags) +``` + +```Makefile +all: $(target) execute clean +``` + +```Makefile +execute: + $(target) $(ARGS) +``` + +```Makefile +clean: + $(RM) $(call platformpth, $(buildDir)/*) +```