1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1.2 +++ b/c++/jvm-jni-starter/.dep.inc Sat Jan 20 21:44:45 2018 +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++/jvm-jni-starter/Makefile Sat Jan 20 21:44:45 2018 +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++/jvm-jni-starter/jvm-jni-starter.cpp Sat Jan 20 21:44:45 2018 +0100
3.3 @@ -0,0 +1,106 @@
3.4 +#include <cstdlib>
3.5 +#include <wchar.h>
3.6 +#include <locale.h>
3.7 +#include <string>
3.8 +
3.9 +#include <jni.h>
3.10 +
3.11 +using namespace std;
3.12 +
3.13 +/**
3.14 + * Spouští JVM z C++, volá statickou metodu ze standardní knihovny (System.currentTimeMillis()) a main() metodu programu SQL-DK
3.15 + *
3.16 + * @param argc
3.17 + * @param argv
3.18 + * @return
3.19 + */
3.20 +int main(int argc, char** argv) {
3.21 +
3.22 + setlocale(LC_ALL, "");
3.23 +
3.24 + JavaVM *jvm;
3.25 + JNIEnv *env;
3.26 +
3.27 + JavaVMOption options[1];
3.28 + char * home = getenv("HOME");
3.29 +
3.30 + string classPath;
3.31 + classPath.append("-Djava.class.path=");
3.32 + classPath.append(home);
3.33 + classPath.append("/projekty/SQL-DK/sql-dk/java/sql-dk/dist/sql-dk.jar");
3.34 + classPath.append(":");
3.35 + classPath.append(home);
3.36 + classPath.append("/projekty/SQL-DK/sql-dk/java/jdbc-loopback-driver/dist/jdbc-loopback-driver.jar");
3.37 +
3.38 + wprintf(L"classPath: %s\n", classPath.c_str());
3.39 +
3.40 + options[0].optionString = new char[classPath.length() + 1];
3.41 + copy(classPath.begin(), classPath.end(), options[0].optionString);
3.42 +
3.43 + JavaVMInitArgs vm_args;
3.44 + vm_args.version = JNI_VERSION_1_8;
3.45 + vm_args.nOptions = 1;
3.46 + vm_args.options = options;
3.47 + vm_args.ignoreUnrecognized = false;
3.48 +
3.49 + JNI_CreateJavaVM(&jvm, (void**) &env, &vm_args);
3.50 +
3.51 + string className = "java/lang/System";
3.52 +
3.53 + jclass cls = env->FindClass(className.c_str());
3.54 + if (cls) {
3.55 + string methodName = "currentTimeMillis";
3.56 + jmethodID mid = env->GetStaticMethodID(cls, methodName.c_str(), "()J");
3.57 +
3.58 + if (mid) {
3.59 + jlong time = env->CallStaticLongMethod(cls, mid);
3.60 + wprintf(L"Aktuální čas Javy: %d\n", time);
3.61 +
3.62 + } else {
3.63 + wprintf(L"Metoda nebyla nalezena: %s\n", methodName.c_str());
3.64 + }
3.65 + } else {
3.66 + wprintf(L"Třída nebyla nalezena: %s\n", className.c_str());
3.67 + }
3.68 +
3.69 + delete cls; // TODO: jak čistit?
3.70 +
3.71 + className = "info/globalcode/sql/dk/CLIStarter";
3.72 + cls = env->FindClass(className.c_str());
3.73 + if (cls) {
3.74 + string methodName = "main";
3.75 + jmethodID mid = env->GetStaticMethodID(cls, methodName.c_str(), "([Ljava/lang/String;)V");
3.76 +
3.77 + if (mid) {
3.78 + //jstring arg = env->NewStringUTF("--list-databases");
3.79 + //jarray args = env->NewObjectArray(1, env->FindClass("java/lang/String"), arg);
3.80 +
3.81 + jobjectArray args = env->NewObjectArray(9, env->FindClass("java/lang/String"), NULL);
3.82 + env->SetObjectArrayElement(args, 0, env->NewStringUTF("--db"));
3.83 + env->SetObjectArrayElement(args, 1, env->NewStringUTF("loopback"));
3.84 + env->SetObjectArrayElement(args, 2, env->NewStringUTF("--sql-in")); // vyžaduje (libovolná) data na standardním vstupu
3.85 + env->SetObjectArrayElement(args, 3, env->NewStringUTF("--data"));
3.86 + env->SetObjectArrayElement(args, 4, env->NewStringUTF("2"));
3.87 + env->SetObjectArrayElement(args, 5, env->NewStringUTF("a"));
3.88 + env->SetObjectArrayElement(args, 6, env->NewStringUTF("b"));
3.89 + env->SetObjectArrayElement(args, 7, env->NewStringUTF("c"));
3.90 + env->SetObjectArrayElement(args, 8, env->NewStringUTF("d"));
3.91 +
3.92 +
3.93 + for (int i = 0; i < 10; i++) {
3.94 + env->CallStaticVoidMethod(cls, mid, args);
3.95 + // FIXME: nefuguje – JVM ukončí proces → vlákna/procesy
3.96 + }
3.97 +
3.98 +
3.99 + } else {
3.100 + wprintf(L"Metoda nebyla nalezena: %s\n", methodName.c_str());
3.101 + }
3.102 + } else {
3.103 + wprintf(L"Třída nebyla nalezena: %s\n", className.c_str());
3.104 + }
3.105 +
3.106 + jvm->DestroyJavaVM();
3.107 + return 0;
3.108 +}
3.109 +
4.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
4.2 +++ b/c++/jvm-jni-starter/nbproject/Makefile-Debug.mk Sat Jan 20 21:44:45 2018 +0100
4.3 @@ -0,0 +1,87 @@
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}/jvm-jni-starter.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=-L/usr/lib/jvm/java-8-openjdk-amd64/jre/lib/amd64/server /usr/lib/jvm/java-8-openjdk-amd64/jre/lib/amd64/server/libjvm.so
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}/jvm-jni-starter
4.63 +
4.64 +${CND_DISTDIR}/${CND_CONF}/${CND_PLATFORM}/jvm-jni-starter: /usr/lib/jvm/java-8-openjdk-amd64/jre/lib/amd64/server/libjvm.so
4.65 +
4.66 +${CND_DISTDIR}/${CND_CONF}/${CND_PLATFORM}/jvm-jni-starter: ${OBJECTFILES}
4.67 + ${MKDIR} -p ${CND_DISTDIR}/${CND_CONF}/${CND_PLATFORM}
4.68 + ${LINK.cc} -o ${CND_DISTDIR}/${CND_CONF}/${CND_PLATFORM}/jvm-jni-starter ${OBJECTFILES} ${LDLIBSOPTIONS}
4.69 +
4.70 +${OBJECTDIR}/jvm-jni-starter.o: jvm-jni-starter.cpp
4.71 + ${MKDIR} -p ${OBJECTDIR}
4.72 + ${RM} "$@.d"
4.73 + $(COMPILE.cc) -g -I/usr/lib/jvm/java-8-openjdk-amd64/include -I/usr/lib/jvm/java-8-openjdk-amd64/include/linux -std=c++14 -MMD -MP -MF "$@.d" -o ${OBJECTDIR}/jvm-jni-starter.o jvm-jni-starter.cpp
4.74 +
4.75 +# Subprojects
4.76 +.build-subprojects:
4.77 +
4.78 +# Clean Targets
4.79 +.clean-conf: ${CLEAN_SUBPROJECTS}
4.80 + ${RM} -r ${CND_BUILDDIR}/${CND_CONF}
4.81 + ${RM} -r ${CND_DISTDIR}/${CND_CONF}/${CND_PLATFORM}/libjvm.so
4.82 + ${RM} ${CND_DISTDIR}/${CND_CONF}/${CND_PLATFORM}/jvm-jni-starter
4.83 +
4.84 +# Subprojects
4.85 +.clean-subprojects:
4.86 +
4.87 +# Enable dependency checking
4.88 +.dep.inc: .depcheck-impl
4.89 +
4.90 +include .dep.inc
5.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
5.2 +++ b/c++/jvm-jni-starter/nbproject/Makefile-Release.mk Sat Jan 20 21:44:45 2018 +0100
5.3 @@ -0,0 +1,83 @@
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}/jvm-jni-starter.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=
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}/jvm-jni-starter
5.63 +
5.64 +${CND_DISTDIR}/${CND_CONF}/${CND_PLATFORM}/jvm-jni-starter: ${OBJECTFILES}
5.65 + ${MKDIR} -p ${CND_DISTDIR}/${CND_CONF}/${CND_PLATFORM}
5.66 + ${LINK.cc} -o ${CND_DISTDIR}/${CND_CONF}/${CND_PLATFORM}/jvm-jni-starter ${OBJECTFILES} ${LDLIBSOPTIONS}
5.67 +
5.68 +${OBJECTDIR}/jvm-jni-starter.o: jvm-jni-starter.cpp
5.69 + ${MKDIR} -p ${OBJECTDIR}
5.70 + ${RM} "$@.d"
5.71 + $(COMPILE.cc) -O2 -std=c++14 -MMD -MP -MF "$@.d" -o ${OBJECTDIR}/jvm-jni-starter.o jvm-jni-starter.cpp
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 +
5.80 +# Subprojects
5.81 +.clean-subprojects:
5.82 +
5.83 +# Enable dependency checking
5.84 +.dep.inc: .depcheck-impl
5.85 +
5.86 +include .dep.inc
6.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
6.2 +++ b/c++/jvm-jni-starter/nbproject/Makefile-impl.mk Sat Jan 20 21:44:45 2018 +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=jvm-jni-starter
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++/jvm-jni-starter/nbproject/Makefile-variables.mk Sat Jan 20 21:44:45 2018 +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=jvm-jni-starter
7.16 +CND_ARTIFACT_PATH_Debug=dist/Debug/GNU-Linux/jvm-jni-starter
7.17 +CND_PACKAGE_DIR_Debug=dist/Debug/GNU-Linux/package
7.18 +CND_PACKAGE_NAME_Debug=jvm-jni-starter.tar
7.19 +CND_PACKAGE_PATH_Debug=dist/Debug/GNU-Linux/package/jvm-jni-starter.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=jvm-jni-starter
7.24 +CND_ARTIFACT_PATH_Release=dist/Release/GNU-Linux/jvm-jni-starter
7.25 +CND_PACKAGE_DIR_Release=dist/Release/GNU-Linux/package
7.26 +CND_PACKAGE_NAME_Release=jvm-jni-starter.tar
7.27 +CND_PACKAGE_PATH_Release=dist/Release/GNU-Linux/package/jvm-jni-starter.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++/jvm-jni-starter/nbproject/Package-Debug.bash Sat Jan 20 21:44:45 2018 +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}/jvm-jni-starter
8.20 +OUTPUT_BASENAME=jvm-jni-starter
8.21 +PACKAGE_TOP_DIR=jvm-jni-starter/
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}/jvm-jni-starter/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/jvm-jni-starter.tar
8.73 +cd ${NBTMPDIR}
8.74 +tar -vcf ../../../../${CND_DISTDIR}/${CND_CONF}/${CND_PLATFORM}/package/jvm-jni-starter.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++/jvm-jni-starter/nbproject/Package-Release.bash Sat Jan 20 21:44:45 2018 +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}/jvm-jni-starter
9.20 +OUTPUT_BASENAME=jvm-jni-starter
9.21 +PACKAGE_TOP_DIR=jvm-jni-starter/
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}/jvm-jni-starter/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/jvm-jni-starter.tar
9.73 +cd ${NBTMPDIR}
9.74 +tar -vcf ../../../../${CND_DISTDIR}/${CND_CONF}/${CND_PLATFORM}/package/jvm-jni-starter.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++/jvm-jni-starter/nbproject/configurations.xml Sat Jan 20 21:44:45 2018 +0100
10.3 @@ -0,0 +1,82 @@
10.4 +<?xml version="1.0" encoding="UTF-8"?>
10.5 +<configurationDescriptor version="100">
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>jvm-jni-starter.cpp</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>11</standard>
10.43 + <incDir>
10.44 + <pElem>/usr/lib/jvm/java-8-openjdk-amd64/include</pElem>
10.45 + <pElem>/usr/lib/jvm/java-8-openjdk-amd64/include/linux</pElem>
10.46 + </incDir>
10.47 + </ccTool>
10.48 + <linkerTool>
10.49 + <linkerAddLib>
10.50 + <pElem>/usr/lib/jvm/java-8-openjdk-amd64/jre/lib/amd64/server</pElem>
10.51 + </linkerAddLib>
10.52 + <linkerLibItems>
10.53 + <linkerLibFileItem>/usr/lib/jvm/java-8-openjdk-amd64/jre/lib/amd64/server/libjvm.so</linkerLibFileItem>
10.54 + </linkerLibItems>
10.55 + </linkerTool>
10.56 + </compileType>
10.57 + <item path="jvm-jni-starter.cpp" ex="false" tool="1" flavor2="0">
10.58 + </item>
10.59 + </conf>
10.60 + <conf name="Release" type="1">
10.61 + <toolsSet>
10.62 + <compilerSet>default</compilerSet>
10.63 + <dependencyChecking>true</dependencyChecking>
10.64 + <rebuildPropChanged>false</rebuildPropChanged>
10.65 + </toolsSet>
10.66 + <compileType>
10.67 + <cTool>
10.68 + <developmentMode>5</developmentMode>
10.69 + </cTool>
10.70 + <ccTool>
10.71 + <developmentMode>5</developmentMode>
10.72 + <standard>11</standard>
10.73 + </ccTool>
10.74 + <fortranCompilerTool>
10.75 + <developmentMode>5</developmentMode>
10.76 + </fortranCompilerTool>
10.77 + <asmTool>
10.78 + <developmentMode>5</developmentMode>
10.79 + </asmTool>
10.80 + </compileType>
10.81 + <item path="jvm-jni-starter.cpp" ex="false" tool="1" flavor2="0">
10.82 + </item>
10.83 + </conf>
10.84 + </confs>
10.85 +</configurationDescriptor>
11.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
11.2 +++ b/c++/jvm-jni-starter/nbproject/project.xml Sat Jan 20 21:44:45 2018 +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>jvm-jni-starter</name>
11.10 + <c-extensions/>
11.11 + <cpp-extensions>cpp</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>