Wed, 27 Dec 2023 14:54:04 +0100
change default make target from 'compile test-compile' to 'check'
universe@753 | 1 | # Copyright 2023 Mike Becker. All rights reserved. |
universe@753 | 2 | # |
universe@753 | 3 | # Redistribution and use in source and binary forms, with or without |
universe@753 | 4 | # modification, are permitted provided that the following conditions are met: |
universe@753 | 5 | # |
universe@753 | 6 | # 1. Redistributions of source code must retain the above copyright |
universe@753 | 7 | # notice, this list of conditions and the following disclaimer. |
universe@753 | 8 | # |
universe@753 | 9 | # 2. Redistributions in binary form must reproduce the above copyright |
universe@753 | 10 | # notice, this list of conditions and the following disclaimer in the |
universe@753 | 11 | # documentation and/or other materials provided with the distribution. |
universe@753 | 12 | # |
universe@753 | 13 | # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" |
universe@753 | 14 | # AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE |
universe@753 | 15 | # IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE |
universe@753 | 16 | # DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE |
universe@753 | 17 | # FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL |
universe@753 | 18 | # DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR |
universe@753 | 19 | # SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER |
universe@753 | 20 | # CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, |
universe@753 | 21 | # OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
universe@753 | 22 | # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
universe@753 | 23 | |
universe@753 | 24 | include config.mk |
universe@753 | 25 | |
universe@769 | 26 | all: check |
universe@753 | 27 | |
universe@753 | 28 | install: |
universe@754 | 29 | @cd src && $(MAKE) install |
universe@753 | 30 | |
universe@753 | 31 | dist: FORCE |
universe@754 | 32 | $(MKDIR) $(dist_dir)/libucx |
universe@753 | 33 | $(COPYALL) CHANGELOG configure COPYING Doxyfile Makefile README \ |
universe@754 | 34 | uaplogo.png docs make src tests $(dist_dir)/libucx/ |
universe@754 | 35 | @cd $(dist_dir) && tar -czf libucx-src-$(VERSION).tar.gz -Hustar libucx |
universe@754 | 36 | @echo "[ Dist created: $(dist_dir)/libucx-src-$(VERSION).tar.gz ]" |
universe@753 | 37 | |
universe@753 | 38 | clean: |
universe@754 | 39 | $(RMDIR) $(build_dir) |
universe@753 | 40 | |
universe@753 | 41 | dist-clean: |
universe@754 | 42 | $(RMDIR) $(dist_dir) |
universe@754 | 43 | $(RMDIR) $(build_dir) |
universe@753 | 44 | |
universe@754 | 45 | compile: $(build_dir) static shared |
universe@753 | 46 | |
universe@754 | 47 | $(build_dir): |
universe@753 | 48 | $(MKDIR) $@ |
universe@753 | 49 | |
universe@753 | 50 | shared: FORCE |
universe@753 | 51 | @cd src && $(MAKE) OBJ_EXT=.shared.o \ |
universe@753 | 52 | CFLAGS="$(CFLAGS) $(SHLIB_CFLAGS)" \ |
universe@753 | 53 | LDFLAGS="$(LDFLAGS) $(SHLIB_LDFLAGS)" \ |
universe@753 | 54 | shared |
universe@753 | 55 | |
universe@753 | 56 | static: FORCE |
universe@753 | 57 | @cd src && $(MAKE) static |
universe@753 | 58 | |
universe@769 | 59 | check: compile test-compile FORCE |
universe@766 | 60 | $(build_dir)/tests/ucxtest |
universe@753 | 61 | |
universe@753 | 62 | test-compile: |
universe@766 | 63 | cd tests && $(MAKE) |
universe@753 | 64 | |
universe@753 | 65 | docs: FORCE |
universe@753 | 66 | @(test "$(WITH_DOCS_API)" = "yes" && cd docs && $(MAKE) all-api) \ |
universe@753 | 67 | || echo "[ Generation of API Docs disabled - skipped ]" |
universe@753 | 68 | @(test "$(WITH_DOCS_HTML)" = "yes" && cd docs && $(MAKE) all-html) \ |
universe@753 | 69 | || echo "[ Generation of HTML Docs disabled - skipped ]" |
universe@753 | 70 | |
universe@755 | 71 | update-rules: |
universe@755 | 72 | make/update-rules.sh src |
universe@766 | 73 | CFLAGS='$(CFLAGS) -I../src' make/update-rules.sh tests '$$(TEST_DIR)' |
universe@755 | 74 | |
universe@753 | 75 | FORCE: |