diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..72357f7 --- /dev/null +++ b/Makefile @@ -0,0 +1,9 @@ +all: examples + +examples: + $(MAKE) -C $@ + +clean: + $(MAKE) -C examples $@ + +.PHONY: all examples clean diff --git a/examples/Makefile b/examples/Makefile new file mode 100644 index 0000000..c93c0b3 --- /dev/null +++ b/examples/Makefile @@ -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 diff --git a/examples/creational/Makefile b/examples/creational/Makefile index df88196..e553d6a 100644 --- a/examples/creational/Makefile +++ b/examples/creational/Makefile @@ -9,3 +9,5 @@ $(targets): %: %.cpp clean: $(RM) $(targets) + +.PHONY: all clean