Blocked out all target subsection of makefile explanation doc

This commit is contained in:
Jonathan Moallem 2021-01-09 23:43:39 +11:00 committed by GitHub
parent 8525e5ae7d
commit 7a455a4bda
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -145,3 +145,41 @@ Once all of these targets have been fulfilled, `setup` ends and your project sho
### all ### all
This subsection is still being written 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)/*)
```