1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1.2 +++ b/c++/domain-socket-bridge/.dep.inc Fri Nov 18 21:41:23 2016 +0100
1.3 @@ -0,0 +1,5 @@
1.4 +# This code depends on make tool being used
1.5 +DEPFILES=$(wildcard $(addsuffix .d, ${OBJECTFILES} ${TESTOBJECTFILES}))
1.6 +ifneq (${DEPFILES},)
1.7 +include ${DEPFILES}
1.8 +endif
2.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
2.2 +++ b/c++/domain-socket-bridge/Makefile Fri Nov 18 21:41:23 2016 +0100
2.3 @@ -0,0 +1,128 @@
2.4 +#
2.5 +# There exist several targets which are by default empty and which can be
2.6 +# used for execution of your targets. These targets are usually executed
2.7 +# before and after some main targets. They are:
2.8 +#
2.9 +# .build-pre: called before 'build' target
2.10 +# .build-post: called after 'build' target
2.11 +# .clean-pre: called before 'clean' target
2.12 +# .clean-post: called after 'clean' target
2.13 +# .clobber-pre: called before 'clobber' target
2.14 +# .clobber-post: called after 'clobber' target
2.15 +# .all-pre: called before 'all' target
2.16 +# .all-post: called after 'all' target
2.17 +# .help-pre: called before 'help' target
2.18 +# .help-post: called after 'help' target
2.19 +#
2.20 +# Targets beginning with '.' are not intended to be called on their own.
2.21 +#
2.22 +# Main targets can be executed directly, and they are:
2.23 +#
2.24 +# build build a specific configuration
2.25 +# clean remove built files from a configuration
2.26 +# clobber remove all built files
2.27 +# all build all configurations
2.28 +# help print help mesage
2.29 +#
2.30 +# Targets .build-impl, .clean-impl, .clobber-impl, .all-impl, and
2.31 +# .help-impl are implemented in nbproject/makefile-impl.mk.
2.32 +#
2.33 +# Available make variables:
2.34 +#
2.35 +# CND_BASEDIR base directory for relative paths
2.36 +# CND_DISTDIR default top distribution directory (build artifacts)
2.37 +# CND_BUILDDIR default top build directory (object files, ...)
2.38 +# CONF name of current configuration
2.39 +# CND_PLATFORM_${CONF} platform name (current configuration)
2.40 +# CND_ARTIFACT_DIR_${CONF} directory of build artifact (current configuration)
2.41 +# CND_ARTIFACT_NAME_${CONF} name of build artifact (current configuration)
2.42 +# CND_ARTIFACT_PATH_${CONF} path to build artifact (current configuration)
2.43 +# CND_PACKAGE_DIR_${CONF} directory of package (current configuration)
2.44 +# CND_PACKAGE_NAME_${CONF} name of package (current configuration)
2.45 +# CND_PACKAGE_PATH_${CONF} path to package (current configuration)
2.46 +#
2.47 +# NOCDDL
2.48 +
2.49 +
2.50 +# Environment
2.51 +MKDIR=mkdir
2.52 +CP=cp
2.53 +CCADMIN=CCadmin
2.54 +
2.55 +
2.56 +# build
2.57 +build: .build-post
2.58 +
2.59 +.build-pre:
2.60 +# Add your pre 'build' code here...
2.61 +
2.62 +.build-post: .build-impl
2.63 +# Add your post 'build' code here...
2.64 +
2.65 +
2.66 +# clean
2.67 +clean: .clean-post
2.68 +
2.69 +.clean-pre:
2.70 +# Add your pre 'clean' code here...
2.71 +
2.72 +.clean-post: .clean-impl
2.73 +# Add your post 'clean' code here...
2.74 +
2.75 +
2.76 +# clobber
2.77 +clobber: .clobber-post
2.78 +
2.79 +.clobber-pre:
2.80 +# Add your pre 'clobber' code here...
2.81 +
2.82 +.clobber-post: .clobber-impl
2.83 +# Add your post 'clobber' code here...
2.84 +
2.85 +
2.86 +# all
2.87 +all: .all-post
2.88 +
2.89 +.all-pre:
2.90 +# Add your pre 'all' code here...
2.91 +
2.92 +.all-post: .all-impl
2.93 +# Add your post 'all' code here...
2.94 +
2.95 +
2.96 +# build tests
2.97 +build-tests: .build-tests-post
2.98 +
2.99 +.build-tests-pre:
2.100 +# Add your pre 'build-tests' code here...
2.101 +
2.102 +.build-tests-post: .build-tests-impl
2.103 +# Add your post 'build-tests' code here...
2.104 +
2.105 +
2.106 +# run tests
2.107 +test: .test-post
2.108 +
2.109 +.test-pre: build-tests
2.110 +# Add your pre 'test' code here...
2.111 +
2.112 +.test-post: .test-impl
2.113 +# Add your post 'test' code here...
2.114 +
2.115 +
2.116 +# help
2.117 +help: .help-post
2.118 +
2.119 +.help-pre:
2.120 +# Add your pre 'help' code here...
2.121 +
2.122 +.help-post: .help-impl
2.123 +# Add your post 'help' code here...
2.124 +
2.125 +
2.126 +
2.127 +# include project implementation makefile
2.128 +include nbproject/Makefile-impl.mk
2.129 +
2.130 +# include project make variables
2.131 +include nbproject/Makefile-variables.mk
3.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
3.2 +++ b/c++/domain-socket-bridge/domain-socket-bridge.c Fri Nov 18 21:41:23 2016 +0100
3.3 @@ -0,0 +1,113 @@
3.4 +#include <string.h>
3.5 +#include <errno.h>
3.6 +#include <stdio.h>
3.7 +#include <signal.h>
3.8 +
3.9 +#include <event2/bufferevent.h>
3.10 +#include <event2/buffer.h>
3.11 +#include <event2/listener.h>
3.12 +#include <event2/util.h>
3.13 +#include <event2/event.h>
3.14 +
3.15 +static const char MESSAGE[] = "Hello, World!\n";
3.16 +
3.17 +static const int PORT = 9995;
3.18 +
3.19 +static void listener_cb(struct evconnlistener *, evutil_socket_t,
3.20 + struct sockaddr *, int socklen, void *);
3.21 +static void conn_write_cb(struct bufferevent *, void *);
3.22 +static void conn_event_cb(struct bufferevent *, short, void *);
3.23 +static void signal_cb(evutil_socket_t, short, void *);
3.24 +
3.25 +int main(int argc, char **argv) {
3.26 + struct event_base *base;
3.27 + struct evconnlistener *listener;
3.28 + struct event *signal_event;
3.29 +
3.30 + struct sockaddr_in sin;
3.31 +
3.32 + base = event_base_new();
3.33 + if (!base) {
3.34 + fprintf(stderr, "Could not initialize libevent!\n");
3.35 + return 1;
3.36 + }
3.37 +
3.38 + memset(&sin, 0, sizeof (sin));
3.39 + sin.sin_family = AF_INET;
3.40 + sin.sin_port = htons(PORT);
3.41 +
3.42 + listener = evconnlistener_new_bind(base, listener_cb, (void *) base,
3.43 + LEV_OPT_REUSEABLE | LEV_OPT_CLOSE_ON_FREE, -1,
3.44 + (struct sockaddr*) &sin,
3.45 + sizeof (sin));
3.46 +
3.47 + if (!listener) {
3.48 + fprintf(stderr, "Could not create a listener!\n");
3.49 + return 1;
3.50 + }
3.51 +
3.52 + signal_event = evsignal_new(base, SIGINT, signal_cb, (void *) base);
3.53 +
3.54 + if (!signal_event || event_add(signal_event, NULL) < 0) {
3.55 + fprintf(stderr, "Could not create/add a signal event!\n");
3.56 + return 1;
3.57 + }
3.58 +
3.59 + event_base_dispatch(base);
3.60 +
3.61 + evconnlistener_free(listener);
3.62 + event_free(signal_event);
3.63 + event_base_free(base);
3.64 +
3.65 + printf("done\n");
3.66 + return 0;
3.67 +}
3.68 +
3.69 +static void listener_cb(struct evconnlistener *listener, evutil_socket_t fd, struct sockaddr *sa, int socklen, void *user_data) {
3.70 + struct event_base *base = (event_base *) user_data;
3.71 + struct bufferevent *bev;
3.72 +
3.73 + bev = bufferevent_socket_new(base, fd, BEV_OPT_CLOSE_ON_FREE); // zavírá spojení
3.74 + //bev = bufferevent_socket_new(base, fd, 0); // nezavírá spojení
3.75 + if (!bev) {
3.76 + fprintf(stderr, "Error constructing bufferevent!");
3.77 + event_base_loopbreak(base);
3.78 + return;
3.79 + }
3.80 + bufferevent_setcb(bev, NULL, conn_write_cb, conn_event_cb, NULL);
3.81 + bufferevent_enable(bev, EV_WRITE);
3.82 + bufferevent_disable(bev, EV_READ);
3.83 +
3.84 + printf("někdo se k nám připojil! / %p\n", bev);
3.85 +
3.86 + bufferevent_write(bev, MESSAGE, strlen(MESSAGE));
3.87 +}
3.88 +
3.89 +static void conn_write_cb(struct bufferevent *bev, void *user_data) {
3.90 + struct evbuffer *output = bufferevent_get_output(bev);
3.91 + if (evbuffer_get_length(output) == 0) {
3.92 + printf("flushed answer / %p\n", bev);
3.93 + bufferevent_free(bev);
3.94 + }
3.95 +}
3.96 +
3.97 +static void conn_event_cb(struct bufferevent *bev, short events, void *user_data) {
3.98 + if (events & BEV_EVENT_EOF) {
3.99 + printf("Connection closed.\n");
3.100 + } else if (events & BEV_EVENT_ERROR) {
3.101 + printf("Got an error on the connection: %s\n",
3.102 + strerror(errno)); /*XXX win32*/
3.103 + }
3.104 +
3.105 + // None of the other events can happen here, since we haven't enabled timeouts
3.106 + bufferevent_free(bev);
3.107 +}
3.108 +
3.109 +static void signal_cb(evutil_socket_t sig, short events, void *user_data) {
3.110 + struct event_base *base = (event_base *) user_data;
3.111 + struct timeval delay = {2, 123};
3.112 +
3.113 + printf("Zachycen SIGINT (Ctrl+C); ukončuji program během %ld sekund a %ld mikrosekund.\n", delay.tv_sec, delay.tv_usec);
3.114 +
3.115 + event_base_loopexit(base, &delay);
3.116 +}
4.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
4.2 +++ b/c++/domain-socket-bridge/nbproject/Makefile-Debug.mk Fri Nov 18 21:41:23 2016 +0100
4.3 @@ -0,0 +1,84 @@
4.4 +#
4.5 +# Generated Makefile - do not edit!
4.6 +#
4.7 +# Edit the Makefile in the project folder instead (../Makefile). Each target
4.8 +# has a -pre and a -post target defined where you can add customized code.
4.9 +#
4.10 +# This makefile implements configuration specific macros and targets.
4.11 +
4.12 +
4.13 +# Environment
4.14 +MKDIR=mkdir
4.15 +CP=cp
4.16 +GREP=grep
4.17 +NM=nm
4.18 +CCADMIN=CCadmin
4.19 +RANLIB=ranlib
4.20 +CC=gcc
4.21 +CCC=g++
4.22 +CXX=g++
4.23 +FC=gfortran
4.24 +AS=as
4.25 +
4.26 +# Macros
4.27 +CND_PLATFORM=GNU-Linux
4.28 +CND_DLIB_EXT=so
4.29 +CND_CONF=Debug
4.30 +CND_DISTDIR=dist
4.31 +CND_BUILDDIR=build
4.32 +
4.33 +# Include project Makefile
4.34 +include Makefile
4.35 +
4.36 +# Object Directory
4.37 +OBJECTDIR=${CND_BUILDDIR}/${CND_CONF}/${CND_PLATFORM}
4.38 +
4.39 +# Object Files
4.40 +OBJECTFILES= \
4.41 + ${OBJECTDIR}/domain-socket-bridge.o
4.42 +
4.43 +
4.44 +# C Compiler Flags
4.45 +CFLAGS=
4.46 +
4.47 +# CC Compiler Flags
4.48 +CCFLAGS=
4.49 +CXXFLAGS=
4.50 +
4.51 +# Fortran Compiler Flags
4.52 +FFLAGS=
4.53 +
4.54 +# Assembler Flags
4.55 +ASFLAGS=
4.56 +
4.57 +# Link Libraries and Options
4.58 +LDLIBSOPTIONS=`pkg-config --libs libevent`
4.59 +
4.60 +# Build Targets
4.61 +.build-conf: ${BUILD_SUBPROJECTS}
4.62 + "${MAKE}" -f nbproject/Makefile-${CND_CONF}.mk ${CND_DISTDIR}/${CND_CONF}/${CND_PLATFORM}/domain-socket-bridge
4.63 +
4.64 +${CND_DISTDIR}/${CND_CONF}/${CND_PLATFORM}/domain-socket-bridge: ${OBJECTFILES}
4.65 + ${MKDIR} -p ${CND_DISTDIR}/${CND_CONF}/${CND_PLATFORM}
4.66 + ${LINK.cc} -o ${CND_DISTDIR}/${CND_CONF}/${CND_PLATFORM}/domain-socket-bridge ${OBJECTFILES} ${LDLIBSOPTIONS}
4.67 +
4.68 +${OBJECTDIR}/domain-socket-bridge.o: domain-socket-bridge.c
4.69 + ${MKDIR} -p ${OBJECTDIR}
4.70 + ${RM} "$@.d"
4.71 + $(COMPILE.cc) -g `pkg-config --cflags libevent` -std=c++11 -MMD -MP -MF "$@.d" -o ${OBJECTDIR}/domain-socket-bridge.o domain-socket-bridge.c
4.72 +
4.73 +# Subprojects
4.74 +.build-subprojects:
4.75 +
4.76 +# Clean Targets
4.77 +.clean-conf: ${CLEAN_SUBPROJECTS}
4.78 + ${RM} -r ${CND_BUILDDIR}/${CND_CONF}
4.79 + ${RM} ${CND_DISTDIR}/${CND_CONF}/${CND_PLATFORM}/domain-socket-bridge
4.80 +
4.81 +# Subprojects
4.82 +.clean-subprojects:
4.83 +
4.84 +# Enable dependency checking
4.85 +.dep.inc: .depcheck-impl
4.86 +
4.87 +include .dep.inc
5.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
5.2 +++ b/c++/domain-socket-bridge/nbproject/Makefile-Release.mk Fri Nov 18 21:41:23 2016 +0100
5.3 @@ -0,0 +1,84 @@
5.4 +#
5.5 +# Generated Makefile - do not edit!
5.6 +#
5.7 +# Edit the Makefile in the project folder instead (../Makefile). Each target
5.8 +# has a -pre and a -post target defined where you can add customized code.
5.9 +#
5.10 +# This makefile implements configuration specific macros and targets.
5.11 +
5.12 +
5.13 +# Environment
5.14 +MKDIR=mkdir
5.15 +CP=cp
5.16 +GREP=grep
5.17 +NM=nm
5.18 +CCADMIN=CCadmin
5.19 +RANLIB=ranlib
5.20 +CC=gcc
5.21 +CCC=g++
5.22 +CXX=g++
5.23 +FC=gfortran
5.24 +AS=as
5.25 +
5.26 +# Macros
5.27 +CND_PLATFORM=GNU-Linux
5.28 +CND_DLIB_EXT=so
5.29 +CND_CONF=Release
5.30 +CND_DISTDIR=dist
5.31 +CND_BUILDDIR=build
5.32 +
5.33 +# Include project Makefile
5.34 +include Makefile
5.35 +
5.36 +# Object Directory
5.37 +OBJECTDIR=${CND_BUILDDIR}/${CND_CONF}/${CND_PLATFORM}
5.38 +
5.39 +# Object Files
5.40 +OBJECTFILES= \
5.41 + ${OBJECTDIR}/domain-socket-bridge.o
5.42 +
5.43 +
5.44 +# C Compiler Flags
5.45 +CFLAGS=
5.46 +
5.47 +# CC Compiler Flags
5.48 +CCFLAGS=
5.49 +CXXFLAGS=
5.50 +
5.51 +# Fortran Compiler Flags
5.52 +FFLAGS=
5.53 +
5.54 +# Assembler Flags
5.55 +ASFLAGS=
5.56 +
5.57 +# Link Libraries and Options
5.58 +LDLIBSOPTIONS=`pkg-config --libs libevent`
5.59 +
5.60 +# Build Targets
5.61 +.build-conf: ${BUILD_SUBPROJECTS}
5.62 + "${MAKE}" -f nbproject/Makefile-${CND_CONF}.mk ${CND_DISTDIR}/${CND_CONF}/${CND_PLATFORM}/domain-socket-bridge
5.63 +
5.64 +${CND_DISTDIR}/${CND_CONF}/${CND_PLATFORM}/domain-socket-bridge: ${OBJECTFILES}
5.65 + ${MKDIR} -p ${CND_DISTDIR}/${CND_CONF}/${CND_PLATFORM}
5.66 + ${LINK.cc} -o ${CND_DISTDIR}/${CND_CONF}/${CND_PLATFORM}/domain-socket-bridge ${OBJECTFILES} ${LDLIBSOPTIONS}
5.67 +
5.68 +${OBJECTDIR}/domain-socket-bridge.o: domain-socket-bridge.c
5.69 + ${MKDIR} -p ${OBJECTDIR}
5.70 + ${RM} "$@.d"
5.71 + $(COMPILE.cc) -O2 `pkg-config --cflags libevent` -std=c++11 -MMD -MP -MF "$@.d" -o ${OBJECTDIR}/domain-socket-bridge.o domain-socket-bridge.c
5.72 +
5.73 +# Subprojects
5.74 +.build-subprojects:
5.75 +
5.76 +# Clean Targets
5.77 +.clean-conf: ${CLEAN_SUBPROJECTS}
5.78 + ${RM} -r ${CND_BUILDDIR}/${CND_CONF}
5.79 + ${RM} ${CND_DISTDIR}/${CND_CONF}/${CND_PLATFORM}/domain-socket-bridge
5.80 +
5.81 +# Subprojects
5.82 +.clean-subprojects:
5.83 +
5.84 +# Enable dependency checking
5.85 +.dep.inc: .depcheck-impl
5.86 +
5.87 +include .dep.inc
6.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
6.2 +++ b/c++/domain-socket-bridge/nbproject/Makefile-impl.mk Fri Nov 18 21:41:23 2016 +0100
6.3 @@ -0,0 +1,133 @@
6.4 +#
6.5 +# Generated Makefile - do not edit!
6.6 +#
6.7 +# Edit the Makefile in the project folder instead (../Makefile). Each target
6.8 +# has a pre- and a post- target defined where you can add customization code.
6.9 +#
6.10 +# This makefile implements macros and targets common to all configurations.
6.11 +#
6.12 +# NOCDDL
6.13 +
6.14 +
6.15 +# Building and Cleaning subprojects are done by default, but can be controlled with the SUB
6.16 +# macro. If SUB=no, subprojects will not be built or cleaned. The following macro
6.17 +# statements set BUILD_SUB-CONF and CLEAN_SUB-CONF to .build-reqprojects-conf
6.18 +# and .clean-reqprojects-conf unless SUB has the value 'no'
6.19 +SUB_no=NO
6.20 +SUBPROJECTS=${SUB_${SUB}}
6.21 +BUILD_SUBPROJECTS_=.build-subprojects
6.22 +BUILD_SUBPROJECTS_NO=
6.23 +BUILD_SUBPROJECTS=${BUILD_SUBPROJECTS_${SUBPROJECTS}}
6.24 +CLEAN_SUBPROJECTS_=.clean-subprojects
6.25 +CLEAN_SUBPROJECTS_NO=
6.26 +CLEAN_SUBPROJECTS=${CLEAN_SUBPROJECTS_${SUBPROJECTS}}
6.27 +
6.28 +
6.29 +# Project Name
6.30 +PROJECTNAME=domain-socket-bridge
6.31 +
6.32 +# Active Configuration
6.33 +DEFAULTCONF=Debug
6.34 +CONF=${DEFAULTCONF}
6.35 +
6.36 +# All Configurations
6.37 +ALLCONFS=Debug Release
6.38 +
6.39 +
6.40 +# build
6.41 +.build-impl: .build-pre .validate-impl .depcheck-impl
6.42 + @#echo "=> Running $@... Configuration=$(CONF)"
6.43 + "${MAKE}" -f nbproject/Makefile-${CONF}.mk QMAKE=${QMAKE} SUBPROJECTS=${SUBPROJECTS} .build-conf
6.44 +
6.45 +
6.46 +# clean
6.47 +.clean-impl: .clean-pre .validate-impl .depcheck-impl
6.48 + @#echo "=> Running $@... Configuration=$(CONF)"
6.49 + "${MAKE}" -f nbproject/Makefile-${CONF}.mk QMAKE=${QMAKE} SUBPROJECTS=${SUBPROJECTS} .clean-conf
6.50 +
6.51 +
6.52 +# clobber
6.53 +.clobber-impl: .clobber-pre .depcheck-impl
6.54 + @#echo "=> Running $@..."
6.55 + for CONF in ${ALLCONFS}; \
6.56 + do \
6.57 + "${MAKE}" -f nbproject/Makefile-$${CONF}.mk QMAKE=${QMAKE} SUBPROJECTS=${SUBPROJECTS} .clean-conf; \
6.58 + done
6.59 +
6.60 +# all
6.61 +.all-impl: .all-pre .depcheck-impl
6.62 + @#echo "=> Running $@..."
6.63 + for CONF in ${ALLCONFS}; \
6.64 + do \
6.65 + "${MAKE}" -f nbproject/Makefile-$${CONF}.mk QMAKE=${QMAKE} SUBPROJECTS=${SUBPROJECTS} .build-conf; \
6.66 + done
6.67 +
6.68 +# build tests
6.69 +.build-tests-impl: .build-impl .build-tests-pre
6.70 + @#echo "=> Running $@... Configuration=$(CONF)"
6.71 + "${MAKE}" -f nbproject/Makefile-${CONF}.mk SUBPROJECTS=${SUBPROJECTS} .build-tests-conf
6.72 +
6.73 +# run tests
6.74 +.test-impl: .build-tests-impl .test-pre
6.75 + @#echo "=> Running $@... Configuration=$(CONF)"
6.76 + "${MAKE}" -f nbproject/Makefile-${CONF}.mk SUBPROJECTS=${SUBPROJECTS} .test-conf
6.77 +
6.78 +# dependency checking support
6.79 +.depcheck-impl:
6.80 + @echo "# This code depends on make tool being used" >.dep.inc
6.81 + @if [ -n "${MAKE_VERSION}" ]; then \
6.82 + echo "DEPFILES=\$$(wildcard \$$(addsuffix .d, \$${OBJECTFILES} \$${TESTOBJECTFILES}))" >>.dep.inc; \
6.83 + echo "ifneq (\$${DEPFILES},)" >>.dep.inc; \
6.84 + echo "include \$${DEPFILES}" >>.dep.inc; \
6.85 + echo "endif" >>.dep.inc; \
6.86 + else \
6.87 + echo ".KEEP_STATE:" >>.dep.inc; \
6.88 + echo ".KEEP_STATE_FILE:.make.state.\$${CONF}" >>.dep.inc; \
6.89 + fi
6.90 +
6.91 +# configuration validation
6.92 +.validate-impl:
6.93 + @if [ ! -f nbproject/Makefile-${CONF}.mk ]; \
6.94 + then \
6.95 + echo ""; \
6.96 + echo "Error: can not find the makefile for configuration '${CONF}' in project ${PROJECTNAME}"; \
6.97 + echo "See 'make help' for details."; \
6.98 + echo "Current directory: " `pwd`; \
6.99 + echo ""; \
6.100 + fi
6.101 + @if [ ! -f nbproject/Makefile-${CONF}.mk ]; \
6.102 + then \
6.103 + exit 1; \
6.104 + fi
6.105 +
6.106 +
6.107 +# help
6.108 +.help-impl: .help-pre
6.109 + @echo "This makefile supports the following configurations:"
6.110 + @echo " ${ALLCONFS}"
6.111 + @echo ""
6.112 + @echo "and the following targets:"
6.113 + @echo " build (default target)"
6.114 + @echo " clean"
6.115 + @echo " clobber"
6.116 + @echo " all"
6.117 + @echo " help"
6.118 + @echo ""
6.119 + @echo "Makefile Usage:"
6.120 + @echo " make [CONF=<CONFIGURATION>] [SUB=no] build"
6.121 + @echo " make [CONF=<CONFIGURATION>] [SUB=no] clean"
6.122 + @echo " make [SUB=no] clobber"
6.123 + @echo " make [SUB=no] all"
6.124 + @echo " make help"
6.125 + @echo ""
6.126 + @echo "Target 'build' will build a specific configuration and, unless 'SUB=no',"
6.127 + @echo " also build subprojects."
6.128 + @echo "Target 'clean' will clean a specific configuration and, unless 'SUB=no',"
6.129 + @echo " also clean subprojects."
6.130 + @echo "Target 'clobber' will remove all built files from all configurations and,"
6.131 + @echo " unless 'SUB=no', also from subprojects."
6.132 + @echo "Target 'all' will will build all configurations and, unless 'SUB=no',"
6.133 + @echo " also build subprojects."
6.134 + @echo "Target 'help' prints this message."
6.135 + @echo ""
6.136 +
7.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
7.2 +++ b/c++/domain-socket-bridge/nbproject/Makefile-variables.mk Fri Nov 18 21:41:23 2016 +0100
7.3 @@ -0,0 +1,35 @@
7.4 +#
7.5 +# Generated - do not edit!
7.6 +#
7.7 +# NOCDDL
7.8 +#
7.9 +CND_BASEDIR=`pwd`
7.10 +CND_BUILDDIR=build
7.11 +CND_DISTDIR=dist
7.12 +# Debug configuration
7.13 +CND_PLATFORM_Debug=GNU-Linux
7.14 +CND_ARTIFACT_DIR_Debug=dist/Debug/GNU-Linux
7.15 +CND_ARTIFACT_NAME_Debug=domain-socket-bridge
7.16 +CND_ARTIFACT_PATH_Debug=dist/Debug/GNU-Linux/domain-socket-bridge
7.17 +CND_PACKAGE_DIR_Debug=dist/Debug/GNU-Linux/package
7.18 +CND_PACKAGE_NAME_Debug=domain-socket-bridge.tar
7.19 +CND_PACKAGE_PATH_Debug=dist/Debug/GNU-Linux/package/domain-socket-bridge.tar
7.20 +# Release configuration
7.21 +CND_PLATFORM_Release=GNU-Linux
7.22 +CND_ARTIFACT_DIR_Release=dist/Release/GNU-Linux
7.23 +CND_ARTIFACT_NAME_Release=domain-socket-bridge
7.24 +CND_ARTIFACT_PATH_Release=dist/Release/GNU-Linux/domain-socket-bridge
7.25 +CND_PACKAGE_DIR_Release=dist/Release/GNU-Linux/package
7.26 +CND_PACKAGE_NAME_Release=domain-socket-bridge.tar
7.27 +CND_PACKAGE_PATH_Release=dist/Release/GNU-Linux/package/domain-socket-bridge.tar
7.28 +#
7.29 +# include compiler specific variables
7.30 +#
7.31 +# dmake command
7.32 +ROOT:sh = test -f nbproject/private/Makefile-variables.mk || \
7.33 + (mkdir -p nbproject/private && touch nbproject/private/Makefile-variables.mk)
7.34 +#
7.35 +# gmake command
7.36 +.PHONY: $(shell test -f nbproject/private/Makefile-variables.mk || (mkdir -p nbproject/private && touch nbproject/private/Makefile-variables.mk))
7.37 +#
7.38 +include nbproject/private/Makefile-variables.mk
8.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
8.2 +++ b/c++/domain-socket-bridge/nbproject/Package-Debug.bash Fri Nov 18 21:41:23 2016 +0100
8.3 @@ -0,0 +1,76 @@
8.4 +#!/bin/bash -x
8.5 +
8.6 +#
8.7 +# Generated - do not edit!
8.8 +#
8.9 +
8.10 +# Macros
8.11 +TOP=`pwd`
8.12 +CND_PLATFORM=GNU-Linux
8.13 +CND_CONF=Debug
8.14 +CND_DISTDIR=dist
8.15 +CND_BUILDDIR=build
8.16 +CND_DLIB_EXT=so
8.17 +NBTMPDIR=${CND_BUILDDIR}/${CND_CONF}/${CND_PLATFORM}/tmp-packaging
8.18 +TMPDIRNAME=tmp-packaging
8.19 +OUTPUT_PATH=${CND_DISTDIR}/${CND_CONF}/${CND_PLATFORM}/domain-socket-bridge
8.20 +OUTPUT_BASENAME=domain-socket-bridge
8.21 +PACKAGE_TOP_DIR=domain-socket-bridge/
8.22 +
8.23 +# Functions
8.24 +function checkReturnCode
8.25 +{
8.26 + rc=$?
8.27 + if [ $rc != 0 ]
8.28 + then
8.29 + exit $rc
8.30 + fi
8.31 +}
8.32 +function makeDirectory
8.33 +# $1 directory path
8.34 +# $2 permission (optional)
8.35 +{
8.36 + mkdir -p "$1"
8.37 + checkReturnCode
8.38 + if [ "$2" != "" ]
8.39 + then
8.40 + chmod $2 "$1"
8.41 + checkReturnCode
8.42 + fi
8.43 +}
8.44 +function copyFileToTmpDir
8.45 +# $1 from-file path
8.46 +# $2 to-file path
8.47 +# $3 permission
8.48 +{
8.49 + cp "$1" "$2"
8.50 + checkReturnCode
8.51 + if [ "$3" != "" ]
8.52 + then
8.53 + chmod $3 "$2"
8.54 + checkReturnCode
8.55 + fi
8.56 +}
8.57 +
8.58 +# Setup
8.59 +cd "${TOP}"
8.60 +mkdir -p ${CND_DISTDIR}/${CND_CONF}/${CND_PLATFORM}/package
8.61 +rm -rf ${NBTMPDIR}
8.62 +mkdir -p ${NBTMPDIR}
8.63 +
8.64 +# Copy files and create directories and links
8.65 +cd "${TOP}"
8.66 +makeDirectory "${NBTMPDIR}/domain-socket-bridge/bin"
8.67 +copyFileToTmpDir "${OUTPUT_PATH}" "${NBTMPDIR}/${PACKAGE_TOP_DIR}bin/${OUTPUT_BASENAME}" 0755
8.68 +
8.69 +
8.70 +# Generate tar file
8.71 +cd "${TOP}"
8.72 +rm -f ${CND_DISTDIR}/${CND_CONF}/${CND_PLATFORM}/package/domain-socket-bridge.tar
8.73 +cd ${NBTMPDIR}
8.74 +tar -vcf ../../../../${CND_DISTDIR}/${CND_CONF}/${CND_PLATFORM}/package/domain-socket-bridge.tar *
8.75 +checkReturnCode
8.76 +
8.77 +# Cleanup
8.78 +cd "${TOP}"
8.79 +rm -rf ${NBTMPDIR}
9.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
9.2 +++ b/c++/domain-socket-bridge/nbproject/Package-Release.bash Fri Nov 18 21:41:23 2016 +0100
9.3 @@ -0,0 +1,76 @@
9.4 +#!/bin/bash -x
9.5 +
9.6 +#
9.7 +# Generated - do not edit!
9.8 +#
9.9 +
9.10 +# Macros
9.11 +TOP=`pwd`
9.12 +CND_PLATFORM=GNU-Linux
9.13 +CND_CONF=Release
9.14 +CND_DISTDIR=dist
9.15 +CND_BUILDDIR=build
9.16 +CND_DLIB_EXT=so
9.17 +NBTMPDIR=${CND_BUILDDIR}/${CND_CONF}/${CND_PLATFORM}/tmp-packaging
9.18 +TMPDIRNAME=tmp-packaging
9.19 +OUTPUT_PATH=${CND_DISTDIR}/${CND_CONF}/${CND_PLATFORM}/domain-socket-bridge
9.20 +OUTPUT_BASENAME=domain-socket-bridge
9.21 +PACKAGE_TOP_DIR=domain-socket-bridge/
9.22 +
9.23 +# Functions
9.24 +function checkReturnCode
9.25 +{
9.26 + rc=$?
9.27 + if [ $rc != 0 ]
9.28 + then
9.29 + exit $rc
9.30 + fi
9.31 +}
9.32 +function makeDirectory
9.33 +# $1 directory path
9.34 +# $2 permission (optional)
9.35 +{
9.36 + mkdir -p "$1"
9.37 + checkReturnCode
9.38 + if [ "$2" != "" ]
9.39 + then
9.40 + chmod $2 "$1"
9.41 + checkReturnCode
9.42 + fi
9.43 +}
9.44 +function copyFileToTmpDir
9.45 +# $1 from-file path
9.46 +# $2 to-file path
9.47 +# $3 permission
9.48 +{
9.49 + cp "$1" "$2"
9.50 + checkReturnCode
9.51 + if [ "$3" != "" ]
9.52 + then
9.53 + chmod $3 "$2"
9.54 + checkReturnCode
9.55 + fi
9.56 +}
9.57 +
9.58 +# Setup
9.59 +cd "${TOP}"
9.60 +mkdir -p ${CND_DISTDIR}/${CND_CONF}/${CND_PLATFORM}/package
9.61 +rm -rf ${NBTMPDIR}
9.62 +mkdir -p ${NBTMPDIR}
9.63 +
9.64 +# Copy files and create directories and links
9.65 +cd "${TOP}"
9.66 +makeDirectory "${NBTMPDIR}/domain-socket-bridge/bin"
9.67 +copyFileToTmpDir "${OUTPUT_PATH}" "${NBTMPDIR}/${PACKAGE_TOP_DIR}bin/${OUTPUT_BASENAME}" 0755
9.68 +
9.69 +
9.70 +# Generate tar file
9.71 +cd "${TOP}"
9.72 +rm -f ${CND_DISTDIR}/${CND_CONF}/${CND_PLATFORM}/package/domain-socket-bridge.tar
9.73 +cd ${NBTMPDIR}
9.74 +tar -vcf ../../../../${CND_DISTDIR}/${CND_CONF}/${CND_PLATFORM}/package/domain-socket-bridge.tar *
9.75 +checkReturnCode
9.76 +
9.77 +# Cleanup
9.78 +cd "${TOP}"
9.79 +rm -rf ${NBTMPDIR}
10.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
10.2 +++ b/c++/domain-socket-bridge/nbproject/configurations.xml Fri Nov 18 21:41:23 2016 +0100
10.3 @@ -0,0 +1,80 @@
10.4 +<?xml version="1.0" encoding="UTF-8"?>
10.5 +<configurationDescriptor version="97">
10.6 + <logicalFolder name="root" displayName="root" projectFiles="true" kind="ROOT">
10.7 + <logicalFolder name="HeaderFiles"
10.8 + displayName="Header Files"
10.9 + projectFiles="true">
10.10 + </logicalFolder>
10.11 + <logicalFolder name="ResourceFiles"
10.12 + displayName="Resource Files"
10.13 + projectFiles="true">
10.14 + </logicalFolder>
10.15 + <logicalFolder name="SourceFiles"
10.16 + displayName="Source Files"
10.17 + projectFiles="true">
10.18 + <itemPath>domain-socket-bridge.c</itemPath>
10.19 + </logicalFolder>
10.20 + <logicalFolder name="TestFiles"
10.21 + displayName="Test Files"
10.22 + projectFiles="false"
10.23 + kind="TEST_LOGICAL_FOLDER">
10.24 + </logicalFolder>
10.25 + <logicalFolder name="ExternalFiles"
10.26 + displayName="Important Files"
10.27 + projectFiles="false"
10.28 + kind="IMPORTANT_FILES_FOLDER">
10.29 + <itemPath>Makefile</itemPath>
10.30 + </logicalFolder>
10.31 + </logicalFolder>
10.32 + <projectmakefile>Makefile</projectmakefile>
10.33 + <confs>
10.34 + <conf name="Debug" type="1">
10.35 + <toolsSet>
10.36 + <compilerSet>default</compilerSet>
10.37 + <dependencyChecking>true</dependencyChecking>
10.38 + <rebuildPropChanged>false</rebuildPropChanged>
10.39 + </toolsSet>
10.40 + <compileType>
10.41 + <ccTool>
10.42 + <standard>8</standard>
10.43 + </ccTool>
10.44 + <linkerTool>
10.45 + <linkerLibItems>
10.46 + <linkerOptionItem>`pkg-config --libs libevent`</linkerOptionItem>
10.47 + </linkerLibItems>
10.48 + </linkerTool>
10.49 + </compileType>
10.50 + <item path="domain-socket-bridge.c" ex="false" tool="1" flavor2="0">
10.51 + </item>
10.52 + </conf>
10.53 + <conf name="Release" type="1">
10.54 + <toolsSet>
10.55 + <compilerSet>default</compilerSet>
10.56 + <dependencyChecking>true</dependencyChecking>
10.57 + <rebuildPropChanged>false</rebuildPropChanged>
10.58 + </toolsSet>
10.59 + <compileType>
10.60 + <cTool>
10.61 + <developmentMode>5</developmentMode>
10.62 + </cTool>
10.63 + <ccTool>
10.64 + <developmentMode>5</developmentMode>
10.65 + <standard>8</standard>
10.66 + </ccTool>
10.67 + <fortranCompilerTool>
10.68 + <developmentMode>5</developmentMode>
10.69 + </fortranCompilerTool>
10.70 + <asmTool>
10.71 + <developmentMode>5</developmentMode>
10.72 + </asmTool>
10.73 + <linkerTool>
10.74 + <linkerLibItems>
10.75 + <linkerOptionItem>`pkg-config --libs libevent`</linkerOptionItem>
10.76 + </linkerLibItems>
10.77 + </linkerTool>
10.78 + </compileType>
10.79 + <item path="domain-socket-bridge.c" ex="false" tool="1" flavor2="0">
10.80 + </item>
10.81 + </conf>
10.82 + </confs>
10.83 +</configurationDescriptor>
11.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
11.2 +++ b/c++/domain-socket-bridge/nbproject/project.xml Fri Nov 18 21:41:23 2016 +0100
11.3 @@ -0,0 +1,28 @@
11.4 +<?xml version="1.0" encoding="UTF-8"?>
11.5 +<project xmlns="http://www.netbeans.org/ns/project/1">
11.6 + <type>org.netbeans.modules.cnd.makeproject</type>
11.7 + <configuration>
11.8 + <data xmlns="http://www.netbeans.org/ns/make-project/1">
11.9 + <name>domain-socket-bridge</name>
11.10 + <c-extensions>c</c-extensions>
11.11 + <cpp-extensions/>
11.12 + <header-extensions/>
11.13 + <sourceEncoding>UTF-8</sourceEncoding>
11.14 + <make-dep-projects/>
11.15 + <sourceRootList/>
11.16 + <confList>
11.17 + <confElem>
11.18 + <name>Debug</name>
11.19 + <type>1</type>
11.20 + </confElem>
11.21 + <confElem>
11.22 + <name>Release</name>
11.23 + <type>1</type>
11.24 + </confElem>
11.25 + </confList>
11.26 + <formatting>
11.27 + <project-formatting-style>false</project-formatting-style>
11.28 + </formatting>
11.29 + </data>
11.30 + </configuration>
11.31 +</project>