make/project.xml

Sun, 30 Nov 2025 15:45:35 +0100

author
Mike Becker <universe@uap-core.de>
date
Sun, 30 Nov 2025 15:45:35 +0100
changeset 1533
6d65b1e97136
parent 1528
6a687a7caed8
permissions
-rw-r--r--

include stdalign.h when not using C23 or newer

<?xml version="1.0" encoding="UTF-8"?>
<project version="0.4" xmlns="http://unixwork.de/uwproj">
    <config>
        <prefix/>
        <exec-prefix/>
        <libdir/>
        <includedir/>
        <var name="VERSION">3.2.0</var>
        <var name="LIBVERSION">6.0.0</var>
        <var name="LIBVERSION_MAJOR">6</var>
        <var name="root_dir" exec="true">pwd</var>
        <var name="build_dir">${root_dir}/build</var>
        <var name="docs_dir">${root_dir}/build/docs</var>
        <var name="dist_dir">${root_dir}/dist</var>
        <var name="MKDIR">/bin/mkdir -p</var>
        <var name="RMFILE">/bin/rm -f</var>
        <var name="RMDIR">/bin/rm -f -R</var>
        <var name="COPYFILE">/bin/cp -f</var>
        <var name="COPYALL">/bin/cp -f -R</var>
        <var name="SYMLINK">/bin/ln -s</var>
    </config>
    <config platform="freebsd">
        <var name="pkgconfigdir" option-help="location of the *.pc files">
            ${exec_prefix}/libdata/pkgconfig
        </var>
    </config>
    <config not="freebsd">
        <var name="pkgconfigdir" option-help="location of the *.pc files">
            ${libdir}/pkgconfig
        </var>
    </config>
    <config>
        <var name="DOXYGEN" exec="true" option-help="path of the Doxygen executable">
            command -v doxygen || echo '/bin/false'
        </var>
    </config>

    <dependency platform="macos">
        <lang>c</lang>
        <make>
            AR=ar
            ARFLAGS=r
            STLIB_EXT=.a
            SHLIB_EXT=.dylib

            SHLIB_LDFLAGS=-dynamiclib -current_version \$(LIBVERSION) -compatibility_version \$(LIBVERSION)
            INSTALL_LIB=\$(root_dir)/make/install-lib-macos.sh
        </make>
    </dependency>

    <dependency platform="unix" not="macos">
        <lang>c</lang>
        <make>
            AR=ar
            ARFLAGS=cr
            STLIB_EXT=.a
            SHLIB_EXT=.so
            INSTALL_LIB=\$(root_dir)/make/install-lib.sh
        </make>
    </dependency>

    <dependency toolchain="gnuc" not="macos">
        <make>
            SHLIB_LDFLAGS += -Wl,-soname,libucx\$(SHLIB_EXT).\$(LIBVERSION_MAJOR)
        </make>
    </dependency>

    <dependency toolchain="suncc">
        <make>
            SHLIB_LDFLAGS += -h libucx\$(SHLIB_EXT).\$(LIBVERSION_MAJOR)
        </make>
    </dependency>

    <dependency platform="solaris">
        <ldflags>-lm</ldflags>
    </dependency>

    <dependency name="cxx">
        <lang>cpp</lang>
    </dependency>

    <dependency name="doxygen">
        <test>test -n "$DOXYGEN"</test>
    </dependency>

    <dependency name="coverage" toolchain="gcc">
        <cflags>\${COVERAGE_CFLAGS}</cflags>
        <ldflags>\${COVERAGE_LDFLAGS}</ldflags>
        <test>command -v gcovr</test>
    </dependency>

    <dependency name="asan" toolchain="gnuc">
        <cflags>-fsanitize=address</cflags>
        <ldflags>-fsanitize=address</ldflags>
    </dependency>

    <dependency name="no_coverage">
        <test>test -z "$FEATURE_COVERAGE"</test>
    </dependency>

    <dependency name="memrchr">
        <test>$TOOLCHAIN_CC $CFLAGS -o /dev/null make/test_memrchr.c</test>
        <cflags>-DWITH_MEMRCHR</cflags>
    </dependency>

    <dependency name="memrchr">
        <test>$TOOLCHAIN_CC $CFLAGS -o /dev/null -D_GNU_SOURCE make/test_memrchr.c</test>
        <cflags>-DWITH_MEMRCHR -DMEMRCHR_NEED_GNU</cflags>
    </dependency>

    <target>
        <feature name="api-docs">
            <dependencies>doxygen</dependencies>
            <desc>run Doxygen during build</desc>
            <make>
                # Documentation
                WITH_API_DOCS=yes
            </make>
        </feature>
        <feature name="coverage">
            <desc>test coverage with gcov</desc>
            <dependencies>coverage</dependencies>
        </feature>
        <feature name="asan">
            <desc>address sanitizer</desc>
            <dependencies>asan</dependencies>
        </feature>
        <feature name="memrchr" default="true">
            <dependencies>memrchr</dependencies>
        </feature>
        <feature name="cxx-tests" default="true">
            <dependencies>cxx</dependencies>
            <desc>the check-cxx makefile target</desc>
            <make>
                # Enable the check-cxx target
                WITH_CXX_TEST=yes
            </make>
        </feature>
        <feature name="szmul-builtin" default="true">
            <dependencies>no_coverage</dependencies>
            <desc>use custom implementation, instead</desc>
            <disabled>
                <define name="CX_NO_SZMUL_BUILTIN"/>
            </disabled>
        </feature>
    </target>
</project>

mercurial