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