GNUmakefile 983 B

123456789101112131415161718192021222324252627282930313233
  1. ## @file
  2. # GNU/Linux makefile for Base Tools project build.
  3. #
  4. # Copyright (c) 2009 - 2017, Intel Corporation. All rights reserved.<BR>
  5. # This program and the accompanying materials
  6. # are licensed and made available under the terms and conditions of the BSD License
  7. # which accompanies this distribution. The full text of the license may be found at
  8. # http://opensource.org/licenses/bsd-license.php
  9. #
  10. # THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
  11. # WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
  12. #
  13. all: subdirs
  14. LANGUAGES = C Python
  15. SOURCE_SUBDIRS := $(patsubst %,Source/%,$(sort $(LANGUAGES)))
  16. SUBDIRS := $(SOURCE_SUBDIRS) Tests
  17. CLEAN_SUBDIRS := $(patsubst %,%-clean,$(sort $(SUBDIRS)))
  18. .PHONY: subdirs $(SUBDIRS)
  19. subdirs: $(SUBDIRS)
  20. $(SUBDIRS):
  21. $(MAKE) -C $@
  22. Tests: $(SOURCE_SUBDIRS)
  23. .PHONY: $(CLEAN_SUBDIRS)
  24. $(CLEAN_SUBDIRS):
  25. -$(MAKE) -C $(@:-clean=) clean
  26. clean: $(CLEAN_SUBDIRS)