universe@791: # Copyright 2023 Mike Becker. All rights reserved. universe@791: # universe@791: # Redistribution and use in source and binary forms, with or without universe@791: # modification, are permitted provided that the following conditions are met: universe@791: # universe@791: # 1. Redistributions of source code must retain the above copyright universe@791: # notice, this list of conditions and the following disclaimer. universe@791: # universe@791: # 2. Redistributions in binary form must reproduce the above copyright universe@791: # notice, this list of conditions and the following disclaimer in the universe@791: # documentation and/or other materials provided with the distribution. universe@791: # universe@791: # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" universe@791: # AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE universe@791: # IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE universe@791: # DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE universe@791: # FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL universe@791: # DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR universe@791: # SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER universe@791: # CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, universe@791: # OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE universe@791: # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. universe@791: universe@791: include config.mk universe@791: universe@791: dist: FORCE universe@791: $(MKDIR) $(dist_dir)/libucx universe@791: $(COPYALL) CHANGELOG configure COPYING Doxyfile Makefile README \ universe@791: uaplogo.png docs make src tests $(dist_dir)/libucx/ universe@791: @cd $(dist_dir) && tar -czf libucx-src-$(VERSION).tar.gz -Hustar libucx universe@791: @echo "[ Dist created: $(dist_dir)/libucx-src-$(VERSION).tar.gz ]" universe@791: universe@791: clean: FORCE universe@791: $(RMDIR) $(build_dir) universe@791: universe@791: dist-clean: FORCE universe@791: $(RMDIR) $(dist_dir) universe@791: $(RMDIR) $(build_dir) universe@791: universe@791: compile: static shared universe@791: universe@791: $(build_dir): universe@791: $(MKDIR) $@ universe@791: universe@791: shared: $(build_dir) FORCE universe@791: @cd src && $(MAKE) OBJ_EXT=.shared.o \ universe@791: CFLAGS="$(CFLAGS) $(SHLIB_CFLAGS)" \ universe@791: LDFLAGS="$(LDFLAGS) $(SHLIB_LDFLAGS)" \ universe@791: shared universe@791: universe@791: static: $(build_dir) FORCE universe@791: @cd src && $(MAKE) static universe@791: universe@791: check: test-compile FORCE universe@791: $(RMFILE) $(build_dir)/*.gcda universe@791: $(RMFILE) $(build_dir)/tests/*.gcda universe@791: $(build_dir)/tests/ucxtest universe@791: universe@791: test-compile: static FORCE universe@791: cd tests && $(MAKE) universe@791: universe@791: docs: FORCE universe@791: @(test "$(WITH_DOCS_API)" = "yes" && cd docs && $(MAKE) all-api) \ universe@791: || echo "[ Generation of API Docs disabled - skipped ]" universe@791: @(test "$(WITH_DOCS_HTML)" = "yes" && cd docs && $(MAKE) all-html) \ universe@791: || echo "[ Generation of HTML Docs disabled - skipped ]" universe@791: universe@791: update-rules: FORCE universe@791: make/update-rules.sh src universe@791: CFLAGS='$(CFLAGS) -I../src' make/update-rules.sh tests '$$(TEST_DIR)' universe@791: universe@791: FORCE: