summaryrefslogtreecommitdiff
path: root/BaseTools/GNUmakefile
diff options
context:
space:
mode:
Diffstat (limited to 'BaseTools/GNUmakefile')
-rw-r--r--BaseTools/GNUmakefile23
1 files changed, 23 insertions, 0 deletions
diff --git a/BaseTools/GNUmakefile b/BaseTools/GNUmakefile
new file mode 100644
index 0000000000..aa140439e2
--- /dev/null
+++ b/BaseTools/GNUmakefile
@@ -0,0 +1,23 @@
+
+all: subdirs
+
+LANGUAGES = C Python
+
+SOURCE_SUBDIRS := $(patsubst %,Source/%,$(sort $(LANGUAGES)))
+SUBDIRS := $(SOURCE_SUBDIRS) Tests
+CLEAN_SUBDIRS := $(patsubst %,%-clean,$(sort $(SUBDIRS)))
+
+.PHONY: subdirs $(SUBDIRS)
+subdirs: $(SUBDIRS)
+$(SUBDIRS):
+ $(MAKE) -C $@
+
+.PHONY: $(CLEAN_SUBDIRS)
+$(CLEAN_SUBDIRS):
+ -$(MAKE) -C $(@:-clean=) clean
+
+clean: $(CLEAN_SUBDIRS)
+
+test:
+ @$(MAKE) -C Tests
+