Wed, 18 Oct 2017 12:03:44 +0200
removes custom make files and adds autoconf support
--- a/.hgignore Tue Oct 17 16:15:41 2017 +0200 +++ b/.hgignore Wed Oct 18 12:03:44 2017 +0200 @@ -1,8 +1,23 @@ syntax:regexp -^nbproject/.*$ -^build/.*$ -core$ +^nbproject/ +^build/ +/core$ DS_Store$ -^docs/api/.*$ -^.c?project$ -^.settings/.*$ +^docs/api/ +\.o$ +\.lo$ +\.la$ +^autom4te\.cache/ +^build-aux/ +^m4/ +^aclocal.m4$ +^config\. +^configure$ +^libtool$ +Makefile$ +Makefile\.in$ +/\.deps/ +/\.libs/ +^stamp-h +^test/ucxtest +/test-suite.log$
--- a/Makefile Tue Oct 17 16:15:41 2017 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,95 +0,0 @@ -# -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. -# -# Copyright 2017 Olaf Wintermann. All rights reserved. -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions are met: -# -# 1. Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# -# 2. Redistributions in binary form must reproduce the above copyright -# notice, this list of conditions and the following disclaimer in the -# documentation and/or other materials provided with the distribution. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" -# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE -# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR -# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF -# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS -# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN -# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) -# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -# POSSIBILITY OF SUCH DAMAGE. -# - - -# -# available configurations: -# clang -# gcc -# mingw -# osx -# suncc -# - -CONF=gcc -PREFIX=/usr/local - -include $(CONF).mk -include cppcheck.mk - -all: ucx test - -ucx: FORCE - cd src; $(MAKE) CONF=$(CONF) - -ucx-debug: FORCE - cd src; $(MAKE) CONF=$(CONF) debug - -test: ucx FORCE - cd test; $(MAKE) CONF=$(CONF) - -test-debug: ucx-debug FORCE - cd test; $(MAKE) CONF=$(CONF) debug - -run: test - ./build/release/test/ucxtest$(APP_EXT) - -run-debug: test-debug - ./build/debug/test/ucxtest$(APP_EXT) - -debug: ucx-debug test-debug - -install: ucx $(DESTDIR)$(PREFIX)/lib $(DESTDIR)$(PREFIX)/include/ucx - cp ./build/release/libucx$(LIB_EXT) $(DESTDIR)$(PREFIX)/lib && \ - cp ./build/release/libucx$(SO_EXT) $(DESTDIR)$(PREFIX)/lib && \ - cp ./src/ucx/*.h $(DESTDIR)$(PREFIX)/include/ucx - -uninstall: - $(RM) $(RMFLAGS) $(DESTDIR)$(PREFIX)/include/ucx &&\ - $(RM) $(RMFLAGS) $(DESTDIR)$(PREFIX)/lib/libucx$(LIB_EXT) &&\ - $(RM) $(RMFLAGS) $(DESTDIR)$(PREFIX)/lib/libucx$(SO_EXT) - -$(DESTDIR)$(PREFIX)/lib: - mkdir -p $@ - -$(DESTDIR)$(PREFIX)/include/ucx: - mkdir -p $@ - -clean: FORCE - $(RM) $(RMFLAGS) build - -build: - mkdir -p build - -cppcheck: FORCE build - truncate -s0 $(CPPCHECK_LOG) - cd ucx; $(MAKE) CONF=$(CONF) cppcheck - @echo "Static code analysis complete. See $(CPPCHECK_LOG) for the results." - -FORCE: -
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Makefile.am Wed Oct 18 12:03:44 2017 +0200 @@ -0,0 +1,4 @@ +SUBDIRS = src test +ACLOCAL_AMFLAGS = -I m4 + +nobase_include_HEADERS = src/ucx/*.h
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/autogen.sh Wed Oct 18 12:03:44 2017 +0200 @@ -0,0 +1,3 @@ +#!/bin/sh +autoreconf --install +
--- a/clang.mk Tue Oct 17 16:15:41 2017 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,46 +0,0 @@ -# -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. -# -# Copyright 2017 Olaf Wintermann. All rights reserved. -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions are met: -# -# 1. Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# -# 2. Redistributions in binary form must reproduce the above copyright -# notice, this list of conditions and the following disclaimer in the -# documentation and/or other materials provided with the distribution. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" -# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE -# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR -# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF -# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS -# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN -# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) -# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -# POSSIBILITY OF SUCH DAMAGE. -# - -CC = clang -LD = clang -AR = ar -RM = rm -MKDIR = mkdir - -CFLAGS = -fPIC -O2 -fstrict-aliasing -CFLAGS_D = -fPIC -g -fstrict-aliasing -Wall -pedantic -LDFLAGS = -lm -SOLDFLAGS = -lm -shared -ARFLAGS = -r -RMFLAGS = -f -R -MKDIRFLAGS = -p - -OBJ_EXT = .o -SO_EXT = .so -LIB_EXT = .a -APP_EXT =
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/configure.ac Wed Oct 18 12:03:44 2017 +0200 @@ -0,0 +1,12 @@ +AC_INIT([ucx], [0.13], [olaf.wintermann@gmail.com]) +AC_CONFIG_AUX_DIR([build-aux]) +AC_CONFIG_MACRO_DIR([m4]) +AM_INIT_AUTOMAKE([foreign -Wall -Werror]) +m4_ifdef([AM_PROG_AR], [AM_PROG_AR]) +LT_INIT +AC_PROG_CC +AC_PROG_CC_STDC +AC_CONFIG_HEADERS([config.h]) +AC_CONFIG_FILES([Makefile src/Makefile test/Makefile]) +AC_OUTPUT +
--- a/cppcheck.mk Tue Oct 17 16:15:41 2017 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,33 +0,0 @@ -# -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. -# -# Copyright 2017 Olaf Wintermann. All rights reserved. -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions are met: -# -# 1. Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# -# 2. Redistributions in binary form must reproduce the above copyright -# notice, this list of conditions and the following disclaimer in the -# documentation and/or other materials provided with the distribution. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" -# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE -# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR -# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF -# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS -# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN -# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) -# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -# POSSIBILITY OF SUCH DAMAGE. -# - -CPPCHECK=cppcheck -CPPCHECK_CONFIG=--max-configs=32 -CPPCHECK_FLAGS=--enable=warning,performance,portability -CPPCHECK_LOG=build/cppcheck.log -
--- a/g++.mk Tue Oct 17 16:15:41 2017 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,46 +0,0 @@ -# -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. -# -# Copyright 2017 Olaf Wintermann. All rights reserved. -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions are met: -# -# 1. Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# -# 2. Redistributions in binary form must reproduce the above copyright -# notice, this list of conditions and the following disclaimer in the -# documentation and/or other materials provided with the distribution. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" -# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE -# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR -# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF -# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS -# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN -# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) -# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -# POSSIBILITY OF SUCH DAMAGE. -# - -CC = g++ -LD = g++ -AR = ar -RM = rm -MKDIR = mkdir - -CFLAGS = -O2 -fstrict-aliasing -fPIC -CFLAGS_D = -g -fstrict-aliasing -Wall -Wno-variadic-macros -pedantic -fPIC -LDFLAGS = -SOLDFLAGS = -shared -ARFLAGS = -r -RMFLAGS = -f -R -MKDIRFLAGS = -p - -OBJ_EXT = .o -SO_EXT = .so -LIB_EXT = .a -APP_EXT =
--- a/gcc.mk Tue Oct 17 16:15:41 2017 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,46 +0,0 @@ -# -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. -# -# Copyright 2017 Olaf Wintermann. All rights reserved. -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions are met: -# -# 1. Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# -# 2. Redistributions in binary form must reproduce the above copyright -# notice, this list of conditions and the following disclaimer in the -# documentation and/or other materials provided with the distribution. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" -# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE -# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR -# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF -# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS -# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN -# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) -# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -# POSSIBILITY OF SUCH DAMAGE. -# - -CC = gcc -LD = gcc -AR = ar -RM = rm -MKDIR = mkdir - -CFLAGS = -std=gnu99 -O2 -fstrict-aliasing -fPIC -CFLAGS_D = -std=gnu99 -g -fstrict-aliasing -Wall -pedantic -fPIC -LDFLAGS = -SOLDFLAGS = -shared -ARFLAGS = -r -RMFLAGS = -f -R -MKDIRFLAGS = -p - -OBJ_EXT = .o -SO_EXT = .so -LIB_EXT = .a -APP_EXT =
--- a/mingw.mk Tue Oct 17 16:15:41 2017 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,46 +0,0 @@ -# -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. -# -# Copyright 2017 Olaf Wintermann. All rights reserved. -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions are met: -# -# 1. Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# -# 2. Redistributions in binary form must reproduce the above copyright -# notice, this list of conditions and the following disclaimer in the -# documentation and/or other materials provided with the distribution. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" -# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE -# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR -# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF -# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS -# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN -# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) -# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -# POSSIBILITY OF SUCH DAMAGE. -# - -CC = gcc -LD = gcc -AR = ar -RM = rm -MKDIR = mkdir - -CFLAGS = -std=gnu99 -O2 -fstrict-aliasing -CFLAGS_D = -std=gnu99 -g -fstrict-aliasing -Wall -pedantic -LDFLAGS = -SOLDFLAGS = -shared -ARFLAGS = -r -RMFLAGS = -f -R -MKDIRFLAGS = -p - -OBJ_EXT = .o -SO_EXT = .dll -LIB_EXT = .a -APP_EXT =
--- a/osx.mk Tue Oct 17 16:15:41 2017 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,46 +0,0 @@ -# -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. -# -# Copyright 2017 Olaf Wintermann. All rights reserved. -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions are met: -# -# 1. Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# -# 2. Redistributions in binary form must reproduce the above copyright -# notice, this list of conditions and the following disclaimer in the -# documentation and/or other materials provided with the distribution. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" -# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE -# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR -# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF -# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS -# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN -# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) -# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -# POSSIBILITY OF SUCH DAMAGE. -# - -CC = cc -LD = cc -AR = ar -RM = rm -MKDIR = mkdir - -CFLAGS = -fPIC -O2 -fstrict-aliasing -CFLAGS_D = -fPIC -g -fstrict-aliasing -Wall -pedantic -LDFLAGS = -SOLDFLAGS = -shared -ARFLAGS = -r -RMFLAGS = -f -R -MKDIRFLAGS = -p - -OBJ_EXT = .o -SO_EXT = .dylib -LIB_EXT = .a -APP_EXT =
--- a/src/Makefile Tue Oct 17 16:15:41 2017 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,79 +0,0 @@ -# -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. -# -# Copyright 2017 Olaf Wintermann. All rights reserved. -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions are met: -# -# 1. Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# -# 2. Redistributions in binary form must reproduce the above copyright -# notice, this list of conditions and the following disclaimer in the -# documentation and/or other materials provided with the distribution. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" -# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE -# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR -# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF -# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS -# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN -# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) -# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -# POSSIBILITY OF SUCH DAMAGE. -# - -include ../$(CONF).mk -include ../cppcheck.mk - -# list of source files -SRC = utils.c -SRC += list.c -SRC += map.c -SRC += avl.c -SRC += properties.c -SRC += mempool.c -SRC += string.c -SRC += test.c -SRC += allocator.c -SRC += logging.c -SRC += buffer.c -SRC += stack.c - -OBJ = $(SRC:%.c=../build/release/ucx/%$(OBJ_EXT)) -OBJ_D = $(SRC:%.c=../build/debug/ucx/%$(OBJ_EXT)) - -all: ../build/release/ucx \ - ../build/release/libucx$(LIB_EXT) ../build/release/libucx$(SO_EXT) -debug: ../build/debug/ucx \ - ../build/debug/libucx$(LIB_EXT) ../build/debug/libucx$(SO_EXT) - -../build/release/libucx$(LIB_EXT): $(OBJ) - $(AR) $(ARFLAGS) ../build/release/libucx$(LIB_EXT) $(OBJ) - -../build/release/libucx$(SO_EXT): $(OBJ) - $(LD) $(SOLDFLAGS) -o ../build/release/libucx$(SO_EXT) $(OBJ) - -../build/release/ucx/%$(OBJ_EXT): %.c - $(CC) $(CFLAGS) -I. -o $@ -c $< - -../build/release/ucx: - $(MKDIR) $(MKDIRFLAGS) ../build/release/ucx - -../build/debug/libucx$(LIB_EXT): $(OBJ_D) - $(AR) $(ARFLAGS) ../build/debug/libucx$(LIB_EXT) $(OBJ_D) - -../build/debug/libucx$(SO_EXT): $(OBJ_D) - $(LD) $(SOLDFLAGS) -o ../build/debug/libucx$(SO_EXT) $(OBJ_D) - -../build/debug/ucx/%$(OBJ_EXT): %.c - $(CC) $(CFLAGS_D) -I. -o $@ -c $< - -../build/debug/ucx: - $(MKDIR) $(MKDIRFLAGS) ../build/debug/ucx - -cppcheck: $(SRC) - $(CPPCHECK) $(CPPCHECK_CONFIG) $(CPPCHECK_FLAGS) $+ 2>> ../$(CPPCHECK_LOG)
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/Makefile.am Wed Oct 18 12:03:44 2017 +0200 @@ -0,0 +1,30 @@ +lib_LTLIBRARIES = libucx.la +libucx_la_SOURCES = utils.c +libucx_la_SOURCES += list.c +libucx_la_SOURCES += map.c +libucx_la_SOURCES += avl.c +libucx_la_SOURCES += properties.c +libucx_la_SOURCES += mempool.c +libucx_la_SOURCES += string.c +libucx_la_SOURCES += test.c +libucx_la_SOURCES += allocator.c +libucx_la_SOURCES += logging.c +libucx_la_SOURCES += buffer.c +libucx_la_SOURCES += stack.c + +ucxdir = $(includedir)/ucx +ucx_HEADERS = ucx/allocator.h +ucx_HEADERS += ucx/avl.h +ucx_HEADERS += ucx/buffer.h +ucx_HEADERS += ucx/list.h +ucx_HEADERS += ucx/logging.h +ucx_HEADERS += ucx/map.h +ucx_HEADERS += ucx/mempool.h +ucx_HEADERS += ucx/properties.h +ucx_HEADERS += ucx/stack.h +ucx_HEADERS += ucx/string.h +ucx_HEADERS += ucx/test.h +ucx_HEADERS += ucx/ucx.h +ucx_HEADERS += ucx/utils.h + +
--- a/suncc.mk Tue Oct 17 16:15:41 2017 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,46 +0,0 @@ -# -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. -# -# Copyright 2017 Olaf Wintermann. All rights reserved. -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions are met: -# -# 1. Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# -# 2. Redistributions in binary form must reproduce the above copyright -# notice, this list of conditions and the following disclaimer in the -# documentation and/or other materials provided with the distribution. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" -# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE -# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR -# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF -# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS -# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN -# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) -# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -# POSSIBILITY OF SUCH DAMAGE. -# - -CC = cc -LD = cc -AR = ar -RM = rm -MKDIR = mkdir - -CFLAGS = -Kpic -O -CFLAGS_D = -Kpic -g -LDFLAGS = -lm -SOLDFLAGS = -G -lm -ARFLAGS = -r -RMFLAGS = -f -R -MKDIRFLAGS = -p - -OBJ_EXT = .o -SO_EXT = .so -LIB_EXT = .a -APP_EXT =
--- a/test/Makefile Tue Oct 17 16:15:41 2017 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,72 +0,0 @@ -# -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. -# -# Copyright 2017 Olaf Wintermann. All rights reserved. -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions are met: -# -# 1. Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# -# 2. Redistributions in binary form must reproduce the above copyright -# notice, this list of conditions and the following disclaimer in the -# documentation and/or other materials provided with the distribution. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" -# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE -# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR -# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF -# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS -# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN -# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) -# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -# POSSIBILITY OF SUCH DAMAGE. -# - -include ../$(CONF).mk - -SRC = main.c -SRC += allocator_tests.c -SRC += list_tests.c -SRC += avl_tests.c -SRC += mpool_tests.c -SRC += stack_tests.c -SRC += map_tests.c -SRC += prop_tests.c -SRC += string_tests.c -SRC += logging_tests.c -SRC += buffer_tests.c -SRC += utils_tests.c - -OBJ = $(SRC:%.c=../build/release/test/%$(OBJ_EXT)) -OBJ_D = $(SRC:%.c=../build/debug/test/%$(OBJ_EXT)) - -all: ../build/release/test ../build/release/test/ucxtest$(APP_EXT) -debug: ../build/debug/test ../build/debug/test/ucxtest$(APP_EXT) - -../build/release/test/ucxtest$(APP_EXT): FORCE $(OBJ) - $(LD) $(LDFLAGS) -o ../build/release/test/ucxtest$(APP_EXT) \ - $(OBJ) ../build/release/libucx$(LIB_EXT) - -../build/release/test/%$(OBJ_EXT): %.c - $(CC) $(CFLAGS) -I../src/ -o $@ -c $< - -../build/release/test: - $(MKDIR) $(MKDIRFLAGS) ../build/release/test - -../build/debug/test/ucxtest$(APP_EXT): FORCE $(OBJ_D) - $(LD) $(LDFLAGS) -o ../build/debug/test/ucxtest$(APP_EXT) \ - $(OBJ_D) ../build/debug/libucx$(LIB_EXT) - -../build/debug/test/%$(OBJ_EXT): %.c - $(CC) $(CFLAGS_D) -I../src/ -o $@ -c $< - -../build/debug/test: - $(MKDIR) $(MKDIRFLAGS) ../build/debug/test - -# force rebuild of test binary (library might have been changed) -FORCE: -
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/test/Makefile.am Wed Oct 18 12:03:44 2017 +0200 @@ -0,0 +1,16 @@ +TESTS = ucxtest +check_PROGRAMS = ucxtest +ucxtest_SOURCES = main.c +ucxtest_SOURCES += allocator_tests.c +ucxtest_SOURCES += list_tests.c +ucxtest_SOURCES += avl_tests.c +ucxtest_SOURCES += mpool_tests.c +ucxtest_SOURCES += stack_tests.c +ucxtest_SOURCES += map_tests.c +ucxtest_SOURCES += prop_tests.c +ucxtest_SOURCES += string_tests.c +ucxtest_SOURCES += logging_tests.c +ucxtest_SOURCES += buffer_tests.c +ucxtest_SOURCES += utils_tests.c +ucxtest_LDADD = ../src/libucx.la +
--- a/test/main.c Tue Oct 17 16:15:41 2017 +0200 +++ b/test/main.c Wed Oct 18 12:03:44 2017 +0200 @@ -232,9 +232,12 @@ ucx_test_run(suite, stdout); fflush(stdout); + + int exit_code = suite->failure > 0 ? EXIT_FAILURE: EXIT_SUCCESS; + ucx_test_suite_free(suite); - return EXIT_SUCCESS; + return exit_code; } else { ucx_test_suite_free(suite); return EXIT_FAILURE;