aboutsummaryrefslogtreecommitdiffstats
path: root/roms/edk2/MdeModulePkg/Library/BrotliCustomDecompressLib/brotli/python/Makefile
diff options
context:
space:
mode:
authorAngelos Mouzakitis <a.mouzakitis@virtualopensystems.com>2023-10-10 14:33:42 +0000
committerAngelos Mouzakitis <a.mouzakitis@virtualopensystems.com>2023-10-10 14:33:42 +0000
commitaf1a266670d040d2f4083ff309d732d648afba2a (patch)
tree2fc46203448ddcc6f81546d379abfaeb323575e9 /roms/edk2/MdeModulePkg/Library/BrotliCustomDecompressLib/brotli/python/Makefile
parente02cda008591317b1625707ff8e115a4841aa889 (diff)
Add submodule dependency filesHEADmaster
Change-Id: Iaf8d18082d3991dec7c0ebbea540f092188eb4ec
Diffstat (limited to 'roms/edk2/MdeModulePkg/Library/BrotliCustomDecompressLib/brotli/python/Makefile')
-rw-r--r--roms/edk2/MdeModulePkg/Library/BrotliCustomDecompressLib/brotli/python/Makefile57
1 files changed, 57 insertions, 0 deletions
diff --git a/roms/edk2/MdeModulePkg/Library/BrotliCustomDecompressLib/brotli/python/Makefile b/roms/edk2/MdeModulePkg/Library/BrotliCustomDecompressLib/brotli/python/Makefile
new file mode 100644
index 000000000..d5d88f87f
--- /dev/null
+++ b/roms/edk2/MdeModulePkg/Library/BrotliCustomDecompressLib/brotli/python/Makefile
@@ -0,0 +1,57 @@
+# Copyright 2016 The Brotli Authors. All rights reserved.
+#
+# Distributed under MIT license.
+# See file LICENSE for detail or copy at https://opensource.org/licenses/MIT
+
+
+# Default (Build)
+.PHONY: all
+# Build
+.PHONY: build
+# Develop
+.PHONY: develop
+# Install
+.PHONY: install
+# Test
+.PHONY: test
+# Clean
+.PHONY: clean
+# Format
+.PHONY: fix
+
+
+PYTHON ?= python
+YAPF ?= yapf
+
+EXT_SUFFIX=$(shell $(PYTHON) -c 'import sysconfig; print(sysconfig.get_config_var("EXT_SUFFIX"))')
+EXT_SOURCES=$(shell find . -name '*.cc')
+EXTENSIONS=$(EXT_SOURCES:%.cc=%$(EXT_SUFFIX))
+
+
+all: build
+
+build: $(EXTENSIONS)
+
+$(EXTENSIONS): $(EXT_SOURCES)
+ @cd .. && $(PYTHON) setup.py build_ext --inplace
+
+develop:
+ @cd .. && $(PYTHON) setup.py develop
+
+install:
+ @cd .. && $(PYTHON) setup.py install
+
+test: build
+ @echo 'running tests'
+ @$(PYTHON) -m unittest discover -v -p '*_test.py'
+
+clean:
+ @cd .. && $(PYTHON) setup.py clean
+ @find .. -name '*.pyc' | xargs rm -v
+ @find .. -name '*.so' | xargs rm -v
+ @find .. -type d -name '__pycache__' | xargs rm -v -r
+ @find .. -type d -name '*.egg-info' | xargs rm -v -r
+
+fix:
+ @echo 'formatting code'
+ -@$(YAPF) --in-place --recursive --verify .