Sat, 31 Dec 2011 14:04:40 +0100
Added makefiles
Makefile | file | annotate | diff | comparison | revisions | |
gcc.mk | file | annotate | diff | comparison | revisions | |
osx.mk | file | annotate | diff | comparison | revisions | |
suncc.mk | file | annotate | diff | comparison | revisions | |
test/Makefile | file | annotate | diff | comparison | revisions | |
test/main.c | file | annotate | diff | comparison | revisions | |
ucx/Makefile | file | annotate | diff | comparison | revisions | |
windows.mk | file | annotate | diff | comparison | revisions |
1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/Makefile Sat Dec 31 14:04:40 2011 +0100 1.3 @@ -0,0 +1,60 @@ 1.4 +# 1.5 +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. 1.6 +# 1.7 +# Copyright 2011 Olaf Wintermann. All rights reserved. 1.8 +# 1.9 +# Redistribution and use in source and binary forms, with or without 1.10 +# modification, are permitted provided that the following conditions are met: 1.11 +# 1.12 +# 1. Redistributions of source code must retain the above copyright 1.13 +# notice, this list of conditions and the following disclaimer. 1.14 +# 1.15 +# 2. Redistributions in binary form must reproduce the above copyright 1.16 +# notice, this list of conditions and the following disclaimer in the 1.17 +# documentation and/or other materials provided with the distribution. 1.18 +# 1.19 +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 1.20 +# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 1.21 +# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 1.22 +# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE 1.23 +# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 1.24 +# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 1.25 +# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 1.26 +# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 1.27 +# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 1.28 +# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 1.29 +# POSSIBILITY OF SUCH DAMAGE. 1.30 +# 1.31 + 1.32 + 1.33 +# 1.34 +# available configurations: 1.35 +# gcc 1.36 +# suncc 1.37 +# windows 1.38 +# osx 1.39 +# 1.40 + 1.41 +#ifndef CONF 1.42 + CONF=gcc 1.43 +#endif 1.44 + 1.45 +include $(CONF).mk 1.46 + 1.47 +all: ucx test 1.48 + 1.49 +ucx: FORCE 1.50 + cd ucx; $(MAKE) CONF=$(CONF) all 1.51 + 1.52 +test: FORCE ucx 1.53 + cd test; $(MAKE) CONF=$(CONF) all 1.54 + 1.55 +run: FORCE test 1.56 + ./test/test$(APP_EXT) 1.57 + 1.58 +clean: FORCE 1.59 + $(RM) $(RMFLAGS) ucx/*.$(OBJ_EXT) ucx/*.$(LIB_EXT) 1.60 + $(RM) $(RMFLAGS) test/*.$(OBJ_EXT) test/test$(APP_EXT) 1.61 + 1.62 +FORCE: 1.63 +
2.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 2.2 +++ b/gcc.mk Sat Dec 31 14:04:40 2011 +0100 2.3 @@ -0,0 +1,42 @@ 2.4 +# 2.5 +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. 2.6 +# 2.7 +# Copyright 2011 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 +CC = gcc 2.33 +LD = gcc 2.34 +AR = ar 2.35 +RM = rm 2.36 + 2.37 +CFLAGS = -std=gnu99 2.38 +LDFLAGS = 2.39 +ARFLAGS = -r 2.40 +RMFLAGS = -f 2.41 + 2.42 +OBJ_EXT = o 2.43 +LIB_EXT = a 2.44 +APP_EXT = 2.45 +
3.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 3.2 +++ b/osx.mk Sat Dec 31 14:04:40 2011 +0100 3.3 @@ -0,0 +1,42 @@ 3.4 +# 3.5 +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. 3.6 +# 3.7 +# Copyright 2011 Olaf Wintermann. All rights reserved. 3.8 +# 3.9 +# Redistribution and use in source and binary forms, with or without 3.10 +# modification, are permitted provided that the following conditions are met: 3.11 +# 3.12 +# 1. Redistributions of source code must retain the above copyright 3.13 +# notice, this list of conditions and the following disclaimer. 3.14 +# 3.15 +# 2. Redistributions in binary form must reproduce the above copyright 3.16 +# notice, this list of conditions and the following disclaimer in the 3.17 +# documentation and/or other materials provided with the distribution. 3.18 +# 3.19 +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 3.20 +# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 3.21 +# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 3.22 +# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE 3.23 +# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 3.24 +# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 3.25 +# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 3.26 +# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 3.27 +# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 3.28 +# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 3.29 +# POSSIBILITY OF SUCH DAMAGE. 3.30 +# 3.31 + 3.32 +CC = gcc 3.33 +LD = gcc 3.34 +AR = ar 3.35 +RM = rm 3.36 + 3.37 +CFLAGS = -std=gnu99 3.38 +LDFLAGS = 3.39 +ARFLAGS = -r 3.40 +RMFLAGS = -f 3.41 + 3.42 +OBJ_EXT = o 3.43 +LIB_EXT = a 3.44 +APP_EXT = 3.45 +
4.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 4.2 +++ b/suncc.mk Sat Dec 31 14:04:40 2011 +0100 4.3 @@ -0,0 +1,42 @@ 4.4 +# 4.5 +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. 4.6 +# 4.7 +# Copyright 2011 Olaf Wintermann. All rights reserved. 4.8 +# 4.9 +# Redistribution and use in source and binary forms, with or without 4.10 +# modification, are permitted provided that the following conditions are met: 4.11 +# 4.12 +# 1. Redistributions of source code must retain the above copyright 4.13 +# notice, this list of conditions and the following disclaimer. 4.14 +# 4.15 +# 2. Redistributions in binary form must reproduce the above copyright 4.16 +# notice, this list of conditions and the following disclaimer in the 4.17 +# documentation and/or other materials provided with the distribution. 4.18 +# 4.19 +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 4.20 +# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 4.21 +# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 4.22 +# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE 4.23 +# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 4.24 +# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 4.25 +# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 4.26 +# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 4.27 +# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 4.28 +# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 4.29 +# POSSIBILITY OF SUCH DAMAGE. 4.30 +# 4.31 + 4.32 +CC = cc 4.33 +LD = cc 4.34 +AR = ar 4.35 +RM = rm 4.36 + 4.37 +CFLAGS = 4.38 +LDFLAGS = 4.39 +ARFLAGS = -r 4.40 +RMFLAGS = -f 4.41 + 4.42 +OBJ_EXT = o 4.43 +LIB_EXT = a 4.44 +APP_EXT = 4.45 +
5.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 5.2 +++ b/test/Makefile Sat Dec 31 14:04:40 2011 +0100 5.3 @@ -0,0 +1,42 @@ 5.4 +# 5.5 +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. 5.6 +# 5.7 +# Copyright 2011 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 +include ../$(CONF).mk 5.33 + 5.34 +SRC = main.c 5.35 + 5.36 +OBJ = $(SRC:%.c=%.$(OBJ_EXT)) 5.37 + 5.38 +all: test1 5.39 + 5.40 +test1: $(OBJ) 5.41 + $(LD) $(LDFLAGS) -o test$(APP_EXT) $(OBJ) ../ucx/libucx.a 5.42 + 5.43 +%.$(OBJ_EXT): %.c 5.44 + $(CC) $(CFLAGS) -I../ -c $< 5.45 +
6.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 6.2 +++ b/test/main.c Sat Dec 31 14:04:40 2011 +0100 6.3 @@ -0,0 +1,37 @@ 6.4 +/* 6.5 + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. 6.6 + * 6.7 + * Copyright 2011 Olaf Wintermann. All rights reserved. 6.8 + * 6.9 + * Redistribution and use in source and binary forms, with or without 6.10 + * modification, are permitted provided that the following conditions are met: 6.11 + * 6.12 + * 1. Redistributions of source code must retain the above copyright 6.13 + * notice, this list of conditions and the following disclaimer. 6.14 + * 6.15 + * 2. Redistributions in binary form must reproduce the above copyright 6.16 + * notice, this list of conditions and the following disclaimer in the 6.17 + * documentation and/or other materials provided with the distribution. 6.18 + * 6.19 + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 6.20 + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 6.21 + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 6.22 + * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE 6.23 + * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 6.24 + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 6.25 + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 6.26 + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 6.27 + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 6.28 + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 6.29 + * POSSIBILITY OF SUCH DAMAGE. 6.30 + */ 6.31 + 6.32 +#include <stdio.h> 6.33 +#include <stdlib.h> 6.34 + 6.35 +int main(int argc, char **argv) { 6.36 + printf("Hello World!\n"); 6.37 + 6.38 + return EXIT_SUCCESS; 6.39 +} 6.40 +
7.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 7.2 +++ b/ucx/Makefile Sat Dec 31 14:04:40 2011 +0100 7.3 @@ -0,0 +1,43 @@ 7.4 +# 7.5 +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. 7.6 +# 7.7 +# Copyright 2011 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 +include ../$(CONF).mk 7.33 + 7.34 +# list of source files 7.35 +SRC = 7.36 + 7.37 +OBJ = $(SRC:%.c=%.$(OBJ_EXT)) 7.38 + 7.39 +all: libucx 7.40 + 7.41 +libucx: $(OBJ) 7.42 + $(AR) $(ARFLAGS) libucx.$(LIB_EXT) $(OBJ) 7.43 + 7.44 +%.$(OBJ_EXT): %.c 7.45 + $(CC) $(CFLAGS) -c $< 7.46 +
8.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 8.2 +++ b/windows.mk Sat Dec 31 14:04:40 2011 +0100 8.3 @@ -0,0 +1,42 @@ 8.4 +# 8.5 +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. 8.6 +# 8.7 +# Copyright 2011 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 = gcc 8.33 +LD = gcc 8.34 +AR = ar 8.35 +RM = rm 8.36 + 8.37 +CFLAGS = -std=gnu99 8.38 +LDFLAGS = 8.39 +ARFLAGS = -r 8.40 +RMFLAGS = -f 8.41 + 8.42 +OBJ_EXT = obj 8.43 +LIB_EXT = lib 8.44 +APP_EXT = .exe 8.45 +