| 1 |
|
| 2 |
|
| 3 |
|
| 4 |
|
| 5 |
|
| 6 |
|
| 7 |
|
| 8 |
|
| 9 |
|
| 10 |
|
| 11 |
|
| 12 |
|
| 13 |
include make/Defs.mk |
| 14 |
|
| 15 |
all: lib |
| 16 |
|
| 17 |
lib: |
| 18 |
${MAKE} -f make/Cpp.mk -j8 |
| 19 |
|
| 20 |
|
| 21 |
|
| 22 |
|
| 23 |
python: lib |
| 24 |
$(MAKE) -f make/Python.mk |
| 25 |
|
| 26 |
echo-python-build-directory: |
| 27 |
@echo $(PYTHON_BUILD_DIR) |
| 28 |
|
| 29 |
csharp: lib |
| 30 |
$(MAKE) -f make/CSharp.mk |
| 31 |
|
| 32 |
before-xbuild: csharp |
| 33 |
-mkdir -p bin/Debug |
| 34 |
-mkdir -p bin/Release |
| 35 |
-cp $(BUILD_ROOT)/CSharp/libConsensusCore.so bin/Debug/ |
| 36 |
-cp $(BUILD_ROOT)/CSharp/libConsensusCore.so bin/Release/ |
| 37 |
|
| 38 |
|
| 39 |
|
| 40 |
|
| 41 |
clean-python: |
| 42 |
-rm -rf $(PYTHON_BUILD_DIR) |
| 43 |
-rm -rf ConsensusCore.egg-info |
| 44 |
-rm -rf dist |
| 45 |
|
| 46 |
clean-csharp: |
| 47 |
-rm -rf $(CSHARP_BUILD_DIR) |
| 48 |
-rm -rf bin obj |
| 49 |
|
| 50 |
clean-cxx: |
| 51 |
-rm -rf $(BUILD_ROOT)/C++ |
| 52 |
|
| 53 |
clean: clean-cxx clean-python clean-csharp |
| 54 |
-rm -rf $(BUILD_ROOT) |
| 55 |
|
| 56 |
|
| 57 |
|
| 58 |
|
| 59 |
test-python: |
| 60 |
@make -f make/Python.mk test-python |
| 61 |
|
| 62 |
test-csharp: |
| 63 |
@make -f make/CSharp.mk test-csharp |
| 64 |
|
| 65 |
test: lib |
| 66 |
@make -f make/Tests.mk |
| 67 |
|
| 68 |
check: test |
| 69 |
tests: test |
| 70 |
|
| 71 |
|
| 72 |
|
| 73 |
|
| 74 |
|
| 75 |
|
| 76 |
lint: |
| 77 |
-find src -name "*.[ch]pp" | xargs ./tools/cpplint.py --verbose=0 --counting=toplevel |
| 78 |
|
| 79 |
pre-commit-hook: |
| 80 |
|
| 81 |
git diff --cached --name-only --diff-filter=ACM | \ |
| 82 |
grep -e '.*.[ch]pp$$' | xargs tools/cpplint.py --verbose=3 |
| 83 |
|
| 84 |
|
| 85 |
|
| 86 |
|
| 87 |
|
| 88 |
pip-uninstall: $(shell which pip > /dev/null) |
| 89 |
@pip freeze|grep 'ConsensusCore=='>/dev/null \ |
| 90 |
&& pip uninstall -y ConsensusCore \ |
| 91 |
|| true |
| 92 |
|
| 93 |
pip-install: $(shell which pip > /dev/null) |
| 94 |
@pip install --no-index \ |
| 95 |
--install-option="--swig=$(SWIG)" \ |
| 96 |
--install-option="--boost=$(BOOST)" \ |
| 97 |
./ |
| 98 |
|
| 99 |
.PHONY: all lib clean-cxx clean test tests check python clean-python \ |
| 100 |
csharp clean-csharp echo-python-build-directory \ |
| 101 |
test-python test-csharp pip-uninstall pip-install \ |
| 102 |
lint pre-commit-hook |