mirror of
https://github.com/iandinwoodie/cpp-design-patterns-for-humans.git
synced 2025-12-16 20:17:08 +03:00
Added top-level makefile for ease of building and cleaning.
This commit is contained in:
9
Makefile
Normal file
9
Makefile
Normal file
@@ -0,0 +1,9 @@
|
||||
all: examples
|
||||
|
||||
examples:
|
||||
$(MAKE) -C $@
|
||||
|
||||
clean:
|
||||
$(MAKE) -C examples $@
|
||||
|
||||
.PHONY: all examples clean
|
||||
16
examples/Makefile
Normal file
16
examples/Makefile
Normal file
@@ -0,0 +1,16 @@
|
||||
dirs= creational
|
||||
cleandirs= $(dirs:%=clean-%)
|
||||
|
||||
all: $(dirs)
|
||||
|
||||
$(dirs):
|
||||
$(MAKE) -C $@
|
||||
|
||||
clean: $(cleandirs)
|
||||
|
||||
$(cleandirs):
|
||||
$(MAKE) -C $(@:clean-%=%) clean
|
||||
|
||||
.PHONY: subdirs $(dirs)
|
||||
.PHONY: subdirs $(cleandirs)
|
||||
.PHONY: all clean
|
||||
@@ -9,3 +9,5 @@ $(targets): %: %.cpp
|
||||
|
||||
clean:
|
||||
$(RM) $(targets)
|
||||
|
||||
.PHONY: all clean
|
||||
|
||||
Reference in New Issue
Block a user