Wed, 18 Oct 2017 12:03:44 +0200
removes custom make files and adds autoconf support
1.1 --- a/.hgignore Tue Oct 17 16:15:41 2017 +0200 1.2 +++ b/.hgignore Wed Oct 18 12:03:44 2017 +0200 1.3 @@ -1,8 +1,23 @@ 1.4 syntax:regexp 1.5 -^nbproject/.*$ 1.6 -^build/.*$ 1.7 -core$ 1.8 +^nbproject/ 1.9 +^build/ 1.10 +/core$ 1.11 DS_Store$ 1.12 -^docs/api/.*$ 1.13 -^.c?project$ 1.14 -^.settings/.*$ 1.15 +^docs/api/ 1.16 +\.o$ 1.17 +\.lo$ 1.18 +\.la$ 1.19 +^autom4te\.cache/ 1.20 +^build-aux/ 1.21 +^m4/ 1.22 +^aclocal.m4$ 1.23 +^config\. 1.24 +^configure$ 1.25 +^libtool$ 1.26 +Makefile$ 1.27 +Makefile\.in$ 1.28 +/\.deps/ 1.29 +/\.libs/ 1.30 +^stamp-h 1.31 +^test/ucxtest 1.32 +/test-suite.log$
2.1 --- a/Makefile Tue Oct 17 16:15:41 2017 +0200 2.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 2.3 @@ -1,95 +0,0 @@ 2.4 -# 2.5 -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. 2.6 -# 2.7 -# Copyright 2017 Olaf Wintermann. All rights reserved. 2.8 -# 2.9 -# Redistribution and use in source and binary forms, with or without 2.10 -# modification, are permitted provided that the following conditions are met: 2.11 -# 2.12 -# 1. Redistributions of source code must retain the above copyright 2.13 -# notice, this list of conditions and the following disclaimer. 2.14 -# 2.15 -# 2. Redistributions in binary form must reproduce the above copyright 2.16 -# notice, this list of conditions and the following disclaimer in the 2.17 -# documentation and/or other materials provided with the distribution. 2.18 -# 2.19 -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 2.20 -# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 2.21 -# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 2.22 -# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE 2.23 -# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 2.24 -# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 2.25 -# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 2.26 -# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 2.27 -# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 2.28 -# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 2.29 -# POSSIBILITY OF SUCH DAMAGE. 2.30 -# 2.31 - 2.32 - 2.33 -# 2.34 -# available configurations: 2.35 -# clang 2.36 -# gcc 2.37 -# mingw 2.38 -# osx 2.39 -# suncc 2.40 -# 2.41 - 2.42 -CONF=gcc 2.43 -PREFIX=/usr/local 2.44 - 2.45 -include $(CONF).mk 2.46 -include cppcheck.mk 2.47 - 2.48 -all: ucx test 2.49 - 2.50 -ucx: FORCE 2.51 - cd src; $(MAKE) CONF=$(CONF) 2.52 - 2.53 -ucx-debug: FORCE 2.54 - cd src; $(MAKE) CONF=$(CONF) debug 2.55 - 2.56 -test: ucx FORCE 2.57 - cd test; $(MAKE) CONF=$(CONF) 2.58 - 2.59 -test-debug: ucx-debug FORCE 2.60 - cd test; $(MAKE) CONF=$(CONF) debug 2.61 - 2.62 -run: test 2.63 - ./build/release/test/ucxtest$(APP_EXT) 2.64 - 2.65 -run-debug: test-debug 2.66 - ./build/debug/test/ucxtest$(APP_EXT) 2.67 - 2.68 -debug: ucx-debug test-debug 2.69 - 2.70 -install: ucx $(DESTDIR)$(PREFIX)/lib $(DESTDIR)$(PREFIX)/include/ucx 2.71 - cp ./build/release/libucx$(LIB_EXT) $(DESTDIR)$(PREFIX)/lib && \ 2.72 - cp ./build/release/libucx$(SO_EXT) $(DESTDIR)$(PREFIX)/lib && \ 2.73 - cp ./src/ucx/*.h $(DESTDIR)$(PREFIX)/include/ucx 2.74 - 2.75 -uninstall: 2.76 - $(RM) $(RMFLAGS) $(DESTDIR)$(PREFIX)/include/ucx &&\ 2.77 - $(RM) $(RMFLAGS) $(DESTDIR)$(PREFIX)/lib/libucx$(LIB_EXT) &&\ 2.78 - $(RM) $(RMFLAGS) $(DESTDIR)$(PREFIX)/lib/libucx$(SO_EXT) 2.79 - 2.80 -$(DESTDIR)$(PREFIX)/lib: 2.81 - mkdir -p $@ 2.82 - 2.83 -$(DESTDIR)$(PREFIX)/include/ucx: 2.84 - mkdir -p $@ 2.85 - 2.86 -clean: FORCE 2.87 - $(RM) $(RMFLAGS) build 2.88 - 2.89 -build: 2.90 - mkdir -p build 2.91 - 2.92 -cppcheck: FORCE build 2.93 - truncate -s0 $(CPPCHECK_LOG) 2.94 - cd ucx; $(MAKE) CONF=$(CONF) cppcheck 2.95 - @echo "Static code analysis complete. See $(CPPCHECK_LOG) for the results." 2.96 - 2.97 -FORCE: 2.98 -
3.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 3.2 +++ b/Makefile.am Wed Oct 18 12:03:44 2017 +0200 3.3 @@ -0,0 +1,4 @@ 3.4 +SUBDIRS = src test 3.5 +ACLOCAL_AMFLAGS = -I m4 3.6 + 3.7 +nobase_include_HEADERS = src/ucx/*.h
4.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 4.2 +++ b/autogen.sh Wed Oct 18 12:03:44 2017 +0200 4.3 @@ -0,0 +1,3 @@ 4.4 +#!/bin/sh 4.5 +autoreconf --install 4.6 +
5.1 --- a/clang.mk Tue Oct 17 16:15:41 2017 +0200 5.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 5.3 @@ -1,46 +0,0 @@ 5.4 -# 5.5 -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. 5.6 -# 5.7 -# Copyright 2017 Olaf Wintermann. All rights reserved. 5.8 -# 5.9 -# Redistribution and use in source and binary forms, with or without 5.10 -# modification, are permitted provided that the following conditions are met: 5.11 -# 5.12 -# 1. Redistributions of source code must retain the above copyright 5.13 -# notice, this list of conditions and the following disclaimer. 5.14 -# 5.15 -# 2. Redistributions in binary form must reproduce the above copyright 5.16 -# notice, this list of conditions and the following disclaimer in the 5.17 -# documentation and/or other materials provided with the distribution. 5.18 -# 5.19 -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 5.20 -# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 5.21 -# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 5.22 -# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE 5.23 -# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 5.24 -# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 5.25 -# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 5.26 -# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 5.27 -# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 5.28 -# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 5.29 -# POSSIBILITY OF SUCH DAMAGE. 5.30 -# 5.31 - 5.32 -CC = clang 5.33 -LD = clang 5.34 -AR = ar 5.35 -RM = rm 5.36 -MKDIR = mkdir 5.37 - 5.38 -CFLAGS = -fPIC -O2 -fstrict-aliasing 5.39 -CFLAGS_D = -fPIC -g -fstrict-aliasing -Wall -pedantic 5.40 -LDFLAGS = -lm 5.41 -SOLDFLAGS = -lm -shared 5.42 -ARFLAGS = -r 5.43 -RMFLAGS = -f -R 5.44 -MKDIRFLAGS = -p 5.45 - 5.46 -OBJ_EXT = .o 5.47 -SO_EXT = .so 5.48 -LIB_EXT = .a 5.49 -APP_EXT =
6.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 6.2 +++ b/configure.ac Wed Oct 18 12:03:44 2017 +0200 6.3 @@ -0,0 +1,12 @@ 6.4 +AC_INIT([ucx], [0.13], [olaf.wintermann@gmail.com]) 6.5 +AC_CONFIG_AUX_DIR([build-aux]) 6.6 +AC_CONFIG_MACRO_DIR([m4]) 6.7 +AM_INIT_AUTOMAKE([foreign -Wall -Werror]) 6.8 +m4_ifdef([AM_PROG_AR], [AM_PROG_AR]) 6.9 +LT_INIT 6.10 +AC_PROG_CC 6.11 +AC_PROG_CC_STDC 6.12 +AC_CONFIG_HEADERS([config.h]) 6.13 +AC_CONFIG_FILES([Makefile src/Makefile test/Makefile]) 6.14 +AC_OUTPUT 6.15 +
7.1 --- a/cppcheck.mk Tue Oct 17 16:15:41 2017 +0200 7.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 7.3 @@ -1,33 +0,0 @@ 7.4 -# 7.5 -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. 7.6 -# 7.7 -# Copyright 2017 Olaf Wintermann. All rights reserved. 7.8 -# 7.9 -# Redistribution and use in source and binary forms, with or without 7.10 -# modification, are permitted provided that the following conditions are met: 7.11 -# 7.12 -# 1. Redistributions of source code must retain the above copyright 7.13 -# notice, this list of conditions and the following disclaimer. 7.14 -# 7.15 -# 2. Redistributions in binary form must reproduce the above copyright 7.16 -# notice, this list of conditions and the following disclaimer in the 7.17 -# documentation and/or other materials provided with the distribution. 7.18 -# 7.19 -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 7.20 -# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 7.21 -# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 7.22 -# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE 7.23 -# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 7.24 -# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 7.25 -# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 7.26 -# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 7.27 -# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 7.28 -# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 7.29 -# POSSIBILITY OF SUCH DAMAGE. 7.30 -# 7.31 - 7.32 -CPPCHECK=cppcheck 7.33 -CPPCHECK_CONFIG=--max-configs=32 7.34 -CPPCHECK_FLAGS=--enable=warning,performance,portability 7.35 -CPPCHECK_LOG=build/cppcheck.log 7.36 -
8.1 --- a/g++.mk Tue Oct 17 16:15:41 2017 +0200 8.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 8.3 @@ -1,46 +0,0 @@ 8.4 -# 8.5 -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. 8.6 -# 8.7 -# Copyright 2017 Olaf Wintermann. All rights reserved. 8.8 -# 8.9 -# Redistribution and use in source and binary forms, with or without 8.10 -# modification, are permitted provided that the following conditions are met: 8.11 -# 8.12 -# 1. Redistributions of source code must retain the above copyright 8.13 -# notice, this list of conditions and the following disclaimer. 8.14 -# 8.15 -# 2. Redistributions in binary form must reproduce the above copyright 8.16 -# notice, this list of conditions and the following disclaimer in the 8.17 -# documentation and/or other materials provided with the distribution. 8.18 -# 8.19 -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 8.20 -# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 8.21 -# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 8.22 -# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE 8.23 -# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 8.24 -# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 8.25 -# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 8.26 -# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 8.27 -# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 8.28 -# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 8.29 -# POSSIBILITY OF SUCH DAMAGE. 8.30 -# 8.31 - 8.32 -CC = g++ 8.33 -LD = g++ 8.34 -AR = ar 8.35 -RM = rm 8.36 -MKDIR = mkdir 8.37 - 8.38 -CFLAGS = -O2 -fstrict-aliasing -fPIC 8.39 -CFLAGS_D = -g -fstrict-aliasing -Wall -Wno-variadic-macros -pedantic -fPIC 8.40 -LDFLAGS = 8.41 -SOLDFLAGS = -shared 8.42 -ARFLAGS = -r 8.43 -RMFLAGS = -f -R 8.44 -MKDIRFLAGS = -p 8.45 - 8.46 -OBJ_EXT = .o 8.47 -SO_EXT = .so 8.48 -LIB_EXT = .a 8.49 -APP_EXT =
9.1 --- a/gcc.mk Tue Oct 17 16:15:41 2017 +0200 9.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 9.3 @@ -1,46 +0,0 @@ 9.4 -# 9.5 -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. 9.6 -# 9.7 -# Copyright 2017 Olaf Wintermann. All rights reserved. 9.8 -# 9.9 -# Redistribution and use in source and binary forms, with or without 9.10 -# modification, are permitted provided that the following conditions are met: 9.11 -# 9.12 -# 1. Redistributions of source code must retain the above copyright 9.13 -# notice, this list of conditions and the following disclaimer. 9.14 -# 9.15 -# 2. Redistributions in binary form must reproduce the above copyright 9.16 -# notice, this list of conditions and the following disclaimer in the 9.17 -# documentation and/or other materials provided with the distribution. 9.18 -# 9.19 -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 9.20 -# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 9.21 -# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 9.22 -# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE 9.23 -# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 9.24 -# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 9.25 -# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 9.26 -# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 9.27 -# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 9.28 -# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 9.29 -# POSSIBILITY OF SUCH DAMAGE. 9.30 -# 9.31 - 9.32 -CC = gcc 9.33 -LD = gcc 9.34 -AR = ar 9.35 -RM = rm 9.36 -MKDIR = mkdir 9.37 - 9.38 -CFLAGS = -std=gnu99 -O2 -fstrict-aliasing -fPIC 9.39 -CFLAGS_D = -std=gnu99 -g -fstrict-aliasing -Wall -pedantic -fPIC 9.40 -LDFLAGS = 9.41 -SOLDFLAGS = -shared 9.42 -ARFLAGS = -r 9.43 -RMFLAGS = -f -R 9.44 -MKDIRFLAGS = -p 9.45 - 9.46 -OBJ_EXT = .o 9.47 -SO_EXT = .so 9.48 -LIB_EXT = .a 9.49 -APP_EXT =
10.1 --- a/mingw.mk Tue Oct 17 16:15:41 2017 +0200 10.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 10.3 @@ -1,46 +0,0 @@ 10.4 -# 10.5 -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. 10.6 -# 10.7 -# Copyright 2017 Olaf Wintermann. All rights reserved. 10.8 -# 10.9 -# Redistribution and use in source and binary forms, with or without 10.10 -# modification, are permitted provided that the following conditions are met: 10.11 -# 10.12 -# 1. Redistributions of source code must retain the above copyright 10.13 -# notice, this list of conditions and the following disclaimer. 10.14 -# 10.15 -# 2. Redistributions in binary form must reproduce the above copyright 10.16 -# notice, this list of conditions and the following disclaimer in the 10.17 -# documentation and/or other materials provided with the distribution. 10.18 -# 10.19 -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 10.20 -# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 10.21 -# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 10.22 -# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE 10.23 -# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 10.24 -# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 10.25 -# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 10.26 -# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 10.27 -# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 10.28 -# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 10.29 -# POSSIBILITY OF SUCH DAMAGE. 10.30 -# 10.31 - 10.32 -CC = gcc 10.33 -LD = gcc 10.34 -AR = ar 10.35 -RM = rm 10.36 -MKDIR = mkdir 10.37 - 10.38 -CFLAGS = -std=gnu99 -O2 -fstrict-aliasing 10.39 -CFLAGS_D = -std=gnu99 -g -fstrict-aliasing -Wall -pedantic 10.40 -LDFLAGS = 10.41 -SOLDFLAGS = -shared 10.42 -ARFLAGS = -r 10.43 -RMFLAGS = -f -R 10.44 -MKDIRFLAGS = -p 10.45 - 10.46 -OBJ_EXT = .o 10.47 -SO_EXT = .dll 10.48 -LIB_EXT = .a 10.49 -APP_EXT =
11.1 --- a/osx.mk Tue Oct 17 16:15:41 2017 +0200 11.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 11.3 @@ -1,46 +0,0 @@ 11.4 -# 11.5 -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. 11.6 -# 11.7 -# Copyright 2017 Olaf Wintermann. All rights reserved. 11.8 -# 11.9 -# Redistribution and use in source and binary forms, with or without 11.10 -# modification, are permitted provided that the following conditions are met: 11.11 -# 11.12 -# 1. Redistributions of source code must retain the above copyright 11.13 -# notice, this list of conditions and the following disclaimer. 11.14 -# 11.15 -# 2. Redistributions in binary form must reproduce the above copyright 11.16 -# notice, this list of conditions and the following disclaimer in the 11.17 -# documentation and/or other materials provided with the distribution. 11.18 -# 11.19 -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 11.20 -# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 11.21 -# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 11.22 -# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE 11.23 -# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 11.24 -# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 11.25 -# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 11.26 -# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 11.27 -# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 11.28 -# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 11.29 -# POSSIBILITY OF SUCH DAMAGE. 11.30 -# 11.31 - 11.32 -CC = cc 11.33 -LD = cc 11.34 -AR = ar 11.35 -RM = rm 11.36 -MKDIR = mkdir 11.37 - 11.38 -CFLAGS = -fPIC -O2 -fstrict-aliasing 11.39 -CFLAGS_D = -fPIC -g -fstrict-aliasing -Wall -pedantic 11.40 -LDFLAGS = 11.41 -SOLDFLAGS = -shared 11.42 -ARFLAGS = -r 11.43 -RMFLAGS = -f -R 11.44 -MKDIRFLAGS = -p 11.45 - 11.46 -OBJ_EXT = .o 11.47 -SO_EXT = .dylib 11.48 -LIB_EXT = .a 11.49 -APP_EXT =
12.1 --- a/src/Makefile Tue Oct 17 16:15:41 2017 +0200 12.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 12.3 @@ -1,79 +0,0 @@ 12.4 -# 12.5 -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. 12.6 -# 12.7 -# Copyright 2017 Olaf Wintermann. All rights reserved. 12.8 -# 12.9 -# Redistribution and use in source and binary forms, with or without 12.10 -# modification, are permitted provided that the following conditions are met: 12.11 -# 12.12 -# 1. Redistributions of source code must retain the above copyright 12.13 -# notice, this list of conditions and the following disclaimer. 12.14 -# 12.15 -# 2. Redistributions in binary form must reproduce the above copyright 12.16 -# notice, this list of conditions and the following disclaimer in the 12.17 -# documentation and/or other materials provided with the distribution. 12.18 -# 12.19 -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 12.20 -# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 12.21 -# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 12.22 -# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE 12.23 -# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 12.24 -# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 12.25 -# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 12.26 -# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 12.27 -# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 12.28 -# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 12.29 -# POSSIBILITY OF SUCH DAMAGE. 12.30 -# 12.31 - 12.32 -include ../$(CONF).mk 12.33 -include ../cppcheck.mk 12.34 - 12.35 -# list of source files 12.36 -SRC = utils.c 12.37 -SRC += list.c 12.38 -SRC += map.c 12.39 -SRC += avl.c 12.40 -SRC += properties.c 12.41 -SRC += mempool.c 12.42 -SRC += string.c 12.43 -SRC += test.c 12.44 -SRC += allocator.c 12.45 -SRC += logging.c 12.46 -SRC += buffer.c 12.47 -SRC += stack.c 12.48 - 12.49 -OBJ = $(SRC:%.c=../build/release/ucx/%$(OBJ_EXT)) 12.50 -OBJ_D = $(SRC:%.c=../build/debug/ucx/%$(OBJ_EXT)) 12.51 - 12.52 -all: ../build/release/ucx \ 12.53 - ../build/release/libucx$(LIB_EXT) ../build/release/libucx$(SO_EXT) 12.54 -debug: ../build/debug/ucx \ 12.55 - ../build/debug/libucx$(LIB_EXT) ../build/debug/libucx$(SO_EXT) 12.56 - 12.57 -../build/release/libucx$(LIB_EXT): $(OBJ) 12.58 - $(AR) $(ARFLAGS) ../build/release/libucx$(LIB_EXT) $(OBJ) 12.59 - 12.60 -../build/release/libucx$(SO_EXT): $(OBJ) 12.61 - $(LD) $(SOLDFLAGS) -o ../build/release/libucx$(SO_EXT) $(OBJ) 12.62 - 12.63 -../build/release/ucx/%$(OBJ_EXT): %.c 12.64 - $(CC) $(CFLAGS) -I. -o $@ -c $< 12.65 - 12.66 -../build/release/ucx: 12.67 - $(MKDIR) $(MKDIRFLAGS) ../build/release/ucx 12.68 - 12.69 -../build/debug/libucx$(LIB_EXT): $(OBJ_D) 12.70 - $(AR) $(ARFLAGS) ../build/debug/libucx$(LIB_EXT) $(OBJ_D) 12.71 - 12.72 -../build/debug/libucx$(SO_EXT): $(OBJ_D) 12.73 - $(LD) $(SOLDFLAGS) -o ../build/debug/libucx$(SO_EXT) $(OBJ_D) 12.74 - 12.75 -../build/debug/ucx/%$(OBJ_EXT): %.c 12.76 - $(CC) $(CFLAGS_D) -I. -o $@ -c $< 12.77 - 12.78 -../build/debug/ucx: 12.79 - $(MKDIR) $(MKDIRFLAGS) ../build/debug/ucx 12.80 - 12.81 -cppcheck: $(SRC) 12.82 - $(CPPCHECK) $(CPPCHECK_CONFIG) $(CPPCHECK_FLAGS) $+ 2>> ../$(CPPCHECK_LOG)
13.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 13.2 +++ b/src/Makefile.am Wed Oct 18 12:03:44 2017 +0200 13.3 @@ -0,0 +1,30 @@ 13.4 +lib_LTLIBRARIES = libucx.la 13.5 +libucx_la_SOURCES = utils.c 13.6 +libucx_la_SOURCES += list.c 13.7 +libucx_la_SOURCES += map.c 13.8 +libucx_la_SOURCES += avl.c 13.9 +libucx_la_SOURCES += properties.c 13.10 +libucx_la_SOURCES += mempool.c 13.11 +libucx_la_SOURCES += string.c 13.12 +libucx_la_SOURCES += test.c 13.13 +libucx_la_SOURCES += allocator.c 13.14 +libucx_la_SOURCES += logging.c 13.15 +libucx_la_SOURCES += buffer.c 13.16 +libucx_la_SOURCES += stack.c 13.17 + 13.18 +ucxdir = $(includedir)/ucx 13.19 +ucx_HEADERS = ucx/allocator.h 13.20 +ucx_HEADERS += ucx/avl.h 13.21 +ucx_HEADERS += ucx/buffer.h 13.22 +ucx_HEADERS += ucx/list.h 13.23 +ucx_HEADERS += ucx/logging.h 13.24 +ucx_HEADERS += ucx/map.h 13.25 +ucx_HEADERS += ucx/mempool.h 13.26 +ucx_HEADERS += ucx/properties.h 13.27 +ucx_HEADERS += ucx/stack.h 13.28 +ucx_HEADERS += ucx/string.h 13.29 +ucx_HEADERS += ucx/test.h 13.30 +ucx_HEADERS += ucx/ucx.h 13.31 +ucx_HEADERS += ucx/utils.h 13.32 + 13.33 +
14.1 --- a/suncc.mk Tue Oct 17 16:15:41 2017 +0200 14.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 14.3 @@ -1,46 +0,0 @@ 14.4 -# 14.5 -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. 14.6 -# 14.7 -# Copyright 2017 Olaf Wintermann. All rights reserved. 14.8 -# 14.9 -# Redistribution and use in source and binary forms, with or without 14.10 -# modification, are permitted provided that the following conditions are met: 14.11 -# 14.12 -# 1. Redistributions of source code must retain the above copyright 14.13 -# notice, this list of conditions and the following disclaimer. 14.14 -# 14.15 -# 2. Redistributions in binary form must reproduce the above copyright 14.16 -# notice, this list of conditions and the following disclaimer in the 14.17 -# documentation and/or other materials provided with the distribution. 14.18 -# 14.19 -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 14.20 -# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 14.21 -# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 14.22 -# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE 14.23 -# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 14.24 -# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 14.25 -# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 14.26 -# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 14.27 -# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 14.28 -# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 14.29 -# POSSIBILITY OF SUCH DAMAGE. 14.30 -# 14.31 - 14.32 -CC = cc 14.33 -LD = cc 14.34 -AR = ar 14.35 -RM = rm 14.36 -MKDIR = mkdir 14.37 - 14.38 -CFLAGS = -Kpic -O 14.39 -CFLAGS_D = -Kpic -g 14.40 -LDFLAGS = -lm 14.41 -SOLDFLAGS = -G -lm 14.42 -ARFLAGS = -r 14.43 -RMFLAGS = -f -R 14.44 -MKDIRFLAGS = -p 14.45 - 14.46 -OBJ_EXT = .o 14.47 -SO_EXT = .so 14.48 -LIB_EXT = .a 14.49 -APP_EXT =
15.1 --- a/test/Makefile Tue Oct 17 16:15:41 2017 +0200 15.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 15.3 @@ -1,72 +0,0 @@ 15.4 -# 15.5 -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. 15.6 -# 15.7 -# Copyright 2017 Olaf Wintermann. All rights reserved. 15.8 -# 15.9 -# Redistribution and use in source and binary forms, with or without 15.10 -# modification, are permitted provided that the following conditions are met: 15.11 -# 15.12 -# 1. Redistributions of source code must retain the above copyright 15.13 -# notice, this list of conditions and the following disclaimer. 15.14 -# 15.15 -# 2. Redistributions in binary form must reproduce the above copyright 15.16 -# notice, this list of conditions and the following disclaimer in the 15.17 -# documentation and/or other materials provided with the distribution. 15.18 -# 15.19 -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 15.20 -# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 15.21 -# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 15.22 -# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE 15.23 -# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 15.24 -# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 15.25 -# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 15.26 -# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 15.27 -# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 15.28 -# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 15.29 -# POSSIBILITY OF SUCH DAMAGE. 15.30 -# 15.31 - 15.32 -include ../$(CONF).mk 15.33 - 15.34 -SRC = main.c 15.35 -SRC += allocator_tests.c 15.36 -SRC += list_tests.c 15.37 -SRC += avl_tests.c 15.38 -SRC += mpool_tests.c 15.39 -SRC += stack_tests.c 15.40 -SRC += map_tests.c 15.41 -SRC += prop_tests.c 15.42 -SRC += string_tests.c 15.43 -SRC += logging_tests.c 15.44 -SRC += buffer_tests.c 15.45 -SRC += utils_tests.c 15.46 - 15.47 -OBJ = $(SRC:%.c=../build/release/test/%$(OBJ_EXT)) 15.48 -OBJ_D = $(SRC:%.c=../build/debug/test/%$(OBJ_EXT)) 15.49 - 15.50 -all: ../build/release/test ../build/release/test/ucxtest$(APP_EXT) 15.51 -debug: ../build/debug/test ../build/debug/test/ucxtest$(APP_EXT) 15.52 - 15.53 -../build/release/test/ucxtest$(APP_EXT): FORCE $(OBJ) 15.54 - $(LD) $(LDFLAGS) -o ../build/release/test/ucxtest$(APP_EXT) \ 15.55 - $(OBJ) ../build/release/libucx$(LIB_EXT) 15.56 - 15.57 -../build/release/test/%$(OBJ_EXT): %.c 15.58 - $(CC) $(CFLAGS) -I../src/ -o $@ -c $< 15.59 - 15.60 -../build/release/test: 15.61 - $(MKDIR) $(MKDIRFLAGS) ../build/release/test 15.62 - 15.63 -../build/debug/test/ucxtest$(APP_EXT): FORCE $(OBJ_D) 15.64 - $(LD) $(LDFLAGS) -o ../build/debug/test/ucxtest$(APP_EXT) \ 15.65 - $(OBJ_D) ../build/debug/libucx$(LIB_EXT) 15.66 - 15.67 -../build/debug/test/%$(OBJ_EXT): %.c 15.68 - $(CC) $(CFLAGS_D) -I../src/ -o $@ -c $< 15.69 - 15.70 -../build/debug/test: 15.71 - $(MKDIR) $(MKDIRFLAGS) ../build/debug/test 15.72 - 15.73 -# force rebuild of test binary (library might have been changed) 15.74 -FORCE: 15.75 -
16.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 16.2 +++ b/test/Makefile.am Wed Oct 18 12:03:44 2017 +0200 16.3 @@ -0,0 +1,16 @@ 16.4 +TESTS = ucxtest 16.5 +check_PROGRAMS = ucxtest 16.6 +ucxtest_SOURCES = main.c 16.7 +ucxtest_SOURCES += allocator_tests.c 16.8 +ucxtest_SOURCES += list_tests.c 16.9 +ucxtest_SOURCES += avl_tests.c 16.10 +ucxtest_SOURCES += mpool_tests.c 16.11 +ucxtest_SOURCES += stack_tests.c 16.12 +ucxtest_SOURCES += map_tests.c 16.13 +ucxtest_SOURCES += prop_tests.c 16.14 +ucxtest_SOURCES += string_tests.c 16.15 +ucxtest_SOURCES += logging_tests.c 16.16 +ucxtest_SOURCES += buffer_tests.c 16.17 +ucxtest_SOURCES += utils_tests.c 16.18 +ucxtest_LDADD = ../src/libucx.la 16.19 +
17.1 --- a/test/main.c Tue Oct 17 16:15:41 2017 +0200 17.2 +++ b/test/main.c Wed Oct 18 12:03:44 2017 +0200 17.3 @@ -232,9 +232,12 @@ 17.4 17.5 ucx_test_run(suite, stdout); 17.6 fflush(stdout); 17.7 + 17.8 + int exit_code = suite->failure > 0 ? EXIT_FAILURE: EXIT_SUCCESS; 17.9 + 17.10 ucx_test_suite_free(suite); 17.11 17.12 - return EXIT_SUCCESS; 17.13 + return exit_code; 17.14 } else { 17.15 ucx_test_suite_free(suite); 17.16 return EXIT_FAILURE;