major source structure and module name changes
This commit is contained in:
34
jwrapper/jnsscs/Makefile.am
Normal file
34
jwrapper/jnsscs/Makefile.am
Normal file
@@ -0,0 +1,34 @@
|
||||
#######################################################################
|
||||
#
|
||||
# Copyright (C) 2006 Novell, Inc.
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or
|
||||
# modify it under the terms of the GNU General Public
|
||||
# License as published by the Free Software Foundation; either
|
||||
# version 2 of the License, or (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
# General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public
|
||||
# License along with this program; if not, write to the Free
|
||||
# Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
#
|
||||
#
|
||||
#######################################################################
|
||||
|
||||
SUBDIRS = $(TARGET_OS)
|
||||
|
||||
DIST_SUBDIRS = linux
|
||||
|
||||
EXTRA_DIST = *.c jnsscs*
|
||||
|
||||
.PHONY: package package-clean package-install package-uninstall
|
||||
package package-clean package-install package-uninstall:
|
||||
$(MAKE) -C $(TARGET_OS) $@
|
||||
|
||||
maintainer-clean-local:
|
||||
rm -f Makefile.in
|
||||
|
||||
253
jwrapper/jnsscs/jmicasa.c
Normal file
253
jwrapper/jnsscs/jmicasa.c
Normal file
@@ -0,0 +1,253 @@
|
||||
/***********************************************************************
|
||||
*
|
||||
* Copyright (C) 2005-2006 Novell, Inc. All Rights Reserved.
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; version 2.1
|
||||
* of the License.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Library Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, Novell, Inc.
|
||||
*
|
||||
* To contact Novell about this file by physical or electronic mail,
|
||||
* you may find current contact information at www.novell.com.
|
||||
*
|
||||
***********************************************************************/
|
||||
|
||||
#include "com_novell_casa_MiCasa.h"
|
||||
|
||||
#include <jni.h>
|
||||
#include <micasa.h>
|
||||
#include <sscs_utf8.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
|
||||
JNIEXPORT jint JNICALL
|
||||
Java_com_novell_casa_MiCasa_jmiCASASetCredential
|
||||
(JNIEnv *env, jobject notused,
|
||||
jint ssFlags,
|
||||
jstring jsAppSecretID,
|
||||
jstring jsSharedSecretID,
|
||||
jint jUsernameType,
|
||||
jstring jsUsername,
|
||||
jstring jsPassword
|
||||
)
|
||||
{
|
||||
int rcode = 0;
|
||||
SSCS_SECRET_ID_T appSecretId = {0};
|
||||
SSCS_SECRET_ID_T sharedSecretId = {0};
|
||||
SSCS_BASIC_CREDENTIAL credential = {0};
|
||||
|
||||
const char* utf_string;
|
||||
jboolean isCopy;
|
||||
utf_string = (*env)->GetStringUTFChars(env, jsAppSecretID, &isCopy);
|
||||
|
||||
sscs_Utf8Strcpy((char*)appSecretId.id, utf_string);
|
||||
appSecretId.len = sscs_Utf8Strlen(utf_string) + 1;
|
||||
|
||||
if (isCopy == JNI_TRUE)
|
||||
(*env)->ReleaseStringUTFChars(env,jsAppSecretID, utf_string);
|
||||
|
||||
// handle sharedsecretid
|
||||
if (jsSharedSecretID)
|
||||
{
|
||||
utf_string = (*env)->GetStringUTFChars(env, jsSharedSecretID, &isCopy);
|
||||
sscs_Utf8Strcpy((char*)sharedSecretId.id, utf_string);
|
||||
sharedSecretId.len = sscs_Utf8Strlen(utf_string)+1;
|
||||
|
||||
if (isCopy == JNI_TRUE)
|
||||
(*env)->ReleaseStringUTFChars(env, jsSharedSecretID, utf_string);
|
||||
}
|
||||
|
||||
// setup credential
|
||||
utf_string = (*env)->GetStringUTFChars(env, jsUsername, &isCopy);
|
||||
sscs_Utf8Strcpy((char*)credential.username, utf_string);
|
||||
credential.unLen = sscs_Utf8Strlen(utf_string)+1;
|
||||
credential.unFlags = jUsernameType;
|
||||
if (isCopy == JNI_TRUE)
|
||||
(*env)->ReleaseStringUTFChars(env, jsUsername, utf_string);
|
||||
|
||||
// password
|
||||
utf_string = (*env)->GetStringUTFChars(env, jsPassword, &isCopy);
|
||||
sscs_Utf8Strcpy((char*)credential.password, utf_string);
|
||||
credential.pwordLen = sscs_Utf8Strlen(utf_string)+1;
|
||||
if (isCopy == JNI_TRUE)
|
||||
(*env)->ReleaseStringUTFChars(env, jsPassword, utf_string);
|
||||
|
||||
|
||||
// make the call
|
||||
if (jsSharedSecretID)
|
||||
rcode = miCASASetCredential(
|
||||
ssFlags,
|
||||
&appSecretId,
|
||||
&sharedSecretId,
|
||||
jUsernameType,
|
||||
&credential,
|
||||
NULL
|
||||
);
|
||||
else
|
||||
rcode = miCASASetCredential(
|
||||
ssFlags,
|
||||
&appSecretId,
|
||||
NULL,
|
||||
jUsernameType,
|
||||
&credential,
|
||||
NULL
|
||||
);
|
||||
|
||||
return rcode;
|
||||
}
|
||||
|
||||
/*
|
||||
* Class: com_novell_casa_micasa_SecretStore
|
||||
* Method: jmiCASAGetCredential
|
||||
* Signature: (I[B[BILcom/novell/casa/micasa/Secret;)I
|
||||
*/
|
||||
JNIEXPORT jint JNICALL
|
||||
Java_com_novell_casa_MiCasa_jmiCASAGetCredential
|
||||
(JNIEnv *env, jobject unused,
|
||||
jint ssFlags,
|
||||
jstring jsAppSecretID,
|
||||
jstring jsSharedSecretID,
|
||||
jint jUsernameType,
|
||||
jobject jcred)
|
||||
{
|
||||
int rcode = 0;
|
||||
SSCS_SECRET_ID_T appSecretId = {0};
|
||||
SSCS_SECRET_ID_T sharedSecretId = {0};
|
||||
SSCS_BASIC_CREDENTIAL credential = {0};
|
||||
|
||||
const char* utf_string;
|
||||
jboolean isCopy;
|
||||
int unType = jUsernameType;
|
||||
|
||||
utf_string = (*env)->GetStringUTFChars(env, jsAppSecretID, &isCopy);
|
||||
sscs_Utf8Strcpy((char*)appSecretId.id, utf_string);
|
||||
appSecretId.len = sscs_Utf8Strlen(utf_string) + 1;
|
||||
if (isCopy == JNI_TRUE)
|
||||
(*env)->ReleaseStringUTFChars(env, jsAppSecretID, utf_string);
|
||||
|
||||
// handle sharedsecretid
|
||||
if (jsSharedSecretID)
|
||||
{
|
||||
utf_string = (*env)->GetStringUTFChars(env, jsSharedSecretID, &isCopy);
|
||||
sscs_Utf8Strcpy((char*)sharedSecretId.id, utf_string);
|
||||
sharedSecretId.len = sscs_Utf8Strlen(utf_string)+1;
|
||||
|
||||
if (isCopy == JNI_TRUE)
|
||||
(*env)->ReleaseStringUTFChars(env, jsSharedSecretID, utf_string);
|
||||
}
|
||||
|
||||
// make the call
|
||||
if (jsSharedSecretID)
|
||||
rcode = miCASAGetCredential(
|
||||
ssFlags,
|
||||
&appSecretId,
|
||||
&sharedSecretId,
|
||||
&unType,
|
||||
&credential,
|
||||
NULL
|
||||
);
|
||||
else
|
||||
rcode = miCASAGetCredential(
|
||||
ssFlags,
|
||||
&appSecretId,
|
||||
NULL,
|
||||
&unType,
|
||||
&credential,
|
||||
NULL
|
||||
);
|
||||
|
||||
|
||||
if (rcode == 0)
|
||||
{
|
||||
// we have a credential
|
||||
jclass theclazz;
|
||||
jmethodID mid;
|
||||
|
||||
theclazz = (*env)->GetObjectClass(env, jcred);
|
||||
mid = (*env)->GetMethodID(env, theclazz, "setUsername", "(Ljava/lang/String;)V");
|
||||
if (mid != NULL)
|
||||
{
|
||||
//printf("The Username: %s\r\n", credential.username);
|
||||
jstring jusername = (*env)->NewStringUTF(env, (char *)credential.username);
|
||||
(*env)->CallObjectMethod(env, jcred, mid, jusername);
|
||||
}
|
||||
|
||||
mid = (*env)->GetMethodID(env, theclazz, "setPassword", "(Ljava/lang/String;)V");
|
||||
{
|
||||
jstring jpassword = (*env)->NewStringUTF(env, (char *)credential.password);
|
||||
(*env)->CallObjectMethod(env, jcred, mid, jpassword);
|
||||
}
|
||||
}
|
||||
return rcode;
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* Class: com_novell_casa_micasa_SecretStore
|
||||
* Method: jmiCASARemoveCredential
|
||||
* Signature: (I[B[B)I
|
||||
*/
|
||||
JNIEXPORT jint JNICALL
|
||||
Java_com_novell_casa_MiCasa_jmiCASARemoveCredential
|
||||
(JNIEnv *env, jobject unused,
|
||||
jint ssFlags,
|
||||
jstring jsAppSecretID,
|
||||
jstring jsSharedSecretID)
|
||||
{
|
||||
int rcode = 0;
|
||||
SSCS_SECRET_ID_T appSecretId = {0};
|
||||
SSCS_SECRET_ID_T sharedSecretId = {0};
|
||||
|
||||
const char* utf_string;
|
||||
jboolean isCopy;
|
||||
|
||||
utf_string = (*env)->GetStringUTFChars(env, jsAppSecretID, &isCopy);
|
||||
sscs_Utf8Strcpy((char*)appSecretId.id, utf_string);
|
||||
appSecretId.len = sscs_Utf8Strlen(utf_string) + 1;
|
||||
if (isCopy == JNI_TRUE)
|
||||
(*env)->ReleaseStringUTFChars(env, jsAppSecretID, utf_string);
|
||||
|
||||
// handle sharedsecretid
|
||||
if (jsSharedSecretID)
|
||||
{
|
||||
utf_string = (*env)->GetStringUTFChars(env, jsSharedSecretID, &isCopy);
|
||||
sscs_Utf8Strcpy((char*)sharedSecretId.id, utf_string);
|
||||
sharedSecretId.len = sscs_Utf8Strlen(utf_string)+1;
|
||||
|
||||
if (isCopy == JNI_TRUE)
|
||||
(*env)->ReleaseStringUTFChars(env, jsSharedSecretID, utf_string);
|
||||
}
|
||||
|
||||
// make the call
|
||||
if (jsSharedSecretID)
|
||||
rcode = miCASARemoveCredential(
|
||||
ssFlags,
|
||||
&appSecretId,
|
||||
&sharedSecretId,
|
||||
NULL);
|
||||
|
||||
else
|
||||
rcode = miCASARemoveCredential(
|
||||
ssFlags,
|
||||
&appSecretId,
|
||||
NULL,
|
||||
NULL);
|
||||
|
||||
return rcode;
|
||||
}
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
BIN
jwrapper/jnsscs/jnsscs.ncb
Normal file
BIN
jwrapper/jnsscs/jnsscs.ncb
Normal file
Binary file not shown.
21
jwrapper/jnsscs/jnsscs.sln
Normal file
21
jwrapper/jnsscs/jnsscs.sln
Normal file
@@ -0,0 +1,21 @@
|
||||
Microsoft Visual Studio Solution File, Format Version 8.00
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "jnsscs", "jnsscs.vcproj", "{3CA87960-868D-4F3B-BD21-30062A9F89AD}"
|
||||
ProjectSection(ProjectDependencies) = postProject
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfiguration) = preSolution
|
||||
Debug = Debug
|
||||
Release = Release
|
||||
EndGlobalSection
|
||||
GlobalSection(ProjectConfiguration) = postSolution
|
||||
{3CA87960-868D-4F3B-BD21-30062A9F89AD}.Debug.ActiveCfg = Debug|Win32
|
||||
{3CA87960-868D-4F3B-BD21-30062A9F89AD}.Debug.Build.0 = Debug|Win32
|
||||
{3CA87960-868D-4F3B-BD21-30062A9F89AD}.Release.ActiveCfg = Release|Win32
|
||||
{3CA87960-868D-4F3B-BD21-30062A9F89AD}.Release.Build.0 = Release|Win32
|
||||
EndGlobalSection
|
||||
GlobalSection(ExtensibilityGlobals) = postSolution
|
||||
EndGlobalSection
|
||||
GlobalSection(ExtensibilityAddIns) = postSolution
|
||||
EndGlobalSection
|
||||
EndGlobal
|
||||
BIN
jwrapper/jnsscs/jnsscs.suo
Normal file
BIN
jwrapper/jnsscs/jnsscs.suo
Normal file
Binary file not shown.
171
jwrapper/jnsscs/jnsscs.vcproj
Normal file
171
jwrapper/jnsscs/jnsscs.vcproj
Normal file
@@ -0,0 +1,171 @@
|
||||
<?xml version="1.0" encoding="Windows-1252"?>
|
||||
<VisualStudioProject
|
||||
ProjectType="Visual C++"
|
||||
Version="7.10"
|
||||
Name="jnsscs"
|
||||
RootNamespace="jnsscs"
|
||||
SccProjectName=""
|
||||
SccLocalPath="">
|
||||
<Platforms>
|
||||
<Platform
|
||||
Name="Win32"/>
|
||||
</Platforms>
|
||||
<Configurations>
|
||||
<Configuration
|
||||
Name="Release|Win32"
|
||||
OutputDirectory=".\Release"
|
||||
IntermediateDirectory=".\Release"
|
||||
ConfigurationType="2"
|
||||
UseOfMFC="0"
|
||||
ATLMinimizesCRunTimeLibraryUsage="FALSE"
|
||||
CharacterSet="2">
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="2"
|
||||
InlineFunctionExpansion="1"
|
||||
AdditionalIncludeDirectories="C:\j2sdk1.4.2_05\include\win32;D:\ccm\SSClient\SecretStoreClient_src\include;C:\j2sdk1.4.2_05\include;D:\ccm\SSClient\SecretStoreClient_src\c_jwrapper\classes"
|
||||
PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;JNSSCS_EXPORTS"
|
||||
StringPooling="TRUE"
|
||||
RuntimeLibrary="0"
|
||||
EnableFunctionLevelLinking="TRUE"
|
||||
UsePrecompiledHeader="2"
|
||||
PrecompiledHeaderFile=".\Release/jnsscs.pch"
|
||||
AssemblerListingLocation=".\Release/"
|
||||
ObjectFile=".\Release/"
|
||||
ProgramDataBaseFileName=".\Release/"
|
||||
WarningLevel="3"
|
||||
SuppressStartupBanner="TRUE"
|
||||
CompileAs="1"/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
AdditionalDependencies="micasa.lib"
|
||||
OutputFile=".\Release/jmicasa.dll"
|
||||
LinkIncremental="1"
|
||||
SuppressStartupBanner="TRUE"
|
||||
AdditionalLibraryDirectories="D:\ccm\SSClient\SecretStoreClient_src\lib\w32"
|
||||
ProgramDatabaseFile=".\Release/jnsscs.pdb"
|
||||
ImportLibrary=".\Release/jnsscs.lib"
|
||||
TargetMachine="1"/>
|
||||
<Tool
|
||||
Name="VCMIDLTool"
|
||||
PreprocessorDefinitions="NDEBUG"
|
||||
MkTypLibCompatible="TRUE"
|
||||
SuppressStartupBanner="TRUE"
|
||||
TargetEnvironment="1"
|
||||
TypeLibraryName=".\Release/jnsscs.tlb"
|
||||
HeaderFileName=""/>
|
||||
<Tool
|
||||
Name="VCPostBuildEventTool"/>
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"/>
|
||||
<Tool
|
||||
Name="VCPreLinkEventTool"/>
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"
|
||||
PreprocessorDefinitions="NDEBUG"
|
||||
Culture="1033"/>
|
||||
<Tool
|
||||
Name="VCWebServiceProxyGeneratorTool"/>
|
||||
<Tool
|
||||
Name="VCXMLDataGeneratorTool"/>
|
||||
<Tool
|
||||
Name="VCWebDeploymentTool"/>
|
||||
<Tool
|
||||
Name="VCManagedWrapperGeneratorTool"/>
|
||||
<Tool
|
||||
Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
|
||||
</Configuration>
|
||||
<Configuration
|
||||
Name="Debug|Win32"
|
||||
OutputDirectory=".\Debug"
|
||||
IntermediateDirectory=".\Debug"
|
||||
ConfigurationType="2"
|
||||
UseOfMFC="0"
|
||||
ATLMinimizesCRunTimeLibraryUsage="FALSE"
|
||||
CharacterSet="2">
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="0"
|
||||
AdditionalIncludeDirectories=""C:\Program Files\Java\jdk1.5.0_06\include\win32";"%JAVA_HOME%\include";../../include"
|
||||
PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_USRDLL;JNSSCS_EXPORTS"
|
||||
BasicRuntimeChecks="3"
|
||||
RuntimeLibrary="0"
|
||||
UsePrecompiledHeader="2"
|
||||
PrecompiledHeaderFile=".\Debug/jnsscs.pch"
|
||||
AssemblerListingLocation=".\Debug/"
|
||||
ObjectFile=".\Debug/"
|
||||
ProgramDataBaseFileName=".\Debug/"
|
||||
WarningLevel="3"
|
||||
SuppressStartupBanner="TRUE"
|
||||
DebugInformationFormat="4"
|
||||
CompileAs="1"/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
AdditionalDependencies="odbc32.lib odbccp32.lib micasa.lib"
|
||||
OutputFile=".\Debug/jmicasa.dll"
|
||||
LinkIncremental="1"
|
||||
SuppressStartupBanner="TRUE"
|
||||
AdditionalLibraryDirectories="..\..\lib\Release"
|
||||
GenerateDebugInformation="TRUE"
|
||||
ProgramDatabaseFile=".\Debug/jnsscs.pdb"
|
||||
ImportLibrary=".\Debug/jnsscs.lib"
|
||||
TargetMachine="1"/>
|
||||
<Tool
|
||||
Name="VCMIDLTool"
|
||||
PreprocessorDefinitions="_DEBUG"
|
||||
MkTypLibCompatible="TRUE"
|
||||
SuppressStartupBanner="TRUE"
|
||||
TargetEnvironment="1"
|
||||
TypeLibraryName=".\Debug/jnsscs.tlb"
|
||||
HeaderFileName=""/>
|
||||
<Tool
|
||||
Name="VCPostBuildEventTool"/>
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"/>
|
||||
<Tool
|
||||
Name="VCPreLinkEventTool"/>
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"
|
||||
PreprocessorDefinitions="_DEBUG"
|
||||
Culture="1033"/>
|
||||
<Tool
|
||||
Name="VCWebServiceProxyGeneratorTool"/>
|
||||
<Tool
|
||||
Name="VCXMLDataGeneratorTool"/>
|
||||
<Tool
|
||||
Name="VCWebDeploymentTool"/>
|
||||
<Tool
|
||||
Name="VCManagedWrapperGeneratorTool"/>
|
||||
<Tool
|
||||
Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
|
||||
</Configuration>
|
||||
</Configurations>
|
||||
<References>
|
||||
</References>
|
||||
<Files>
|
||||
<Filter
|
||||
Name="Source Files"
|
||||
Filter="cpp;c;cxx;rc;def;r;odl;idl;hpj;bat">
|
||||
<File
|
||||
RelativePath=".\jmicasa.c">
|
||||
</File>
|
||||
</Filter>
|
||||
<Filter
|
||||
Name="Header Files"
|
||||
Filter="h;hpp;hxx;hm;inl">
|
||||
<File
|
||||
RelativePath="..\classes\com_novell_casa_MiCasa.h">
|
||||
</File>
|
||||
</Filter>
|
||||
<Filter
|
||||
Name="Resource Files"
|
||||
Filter="ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe">
|
||||
</Filter>
|
||||
</Files>
|
||||
<Globals>
|
||||
</Globals>
|
||||
</VisualStudioProject>
|
||||
31
jwrapper/jnsscs/link.w32
Normal file
31
jwrapper/jnsscs/link.w32
Normal file
@@ -0,0 +1,31 @@
|
||||
LINK_DEF_BLD = \
|
||||
echo "$(addprefix $(OBJDIR),$(notdir $(OBJS)))" > $(LINKDEF);\
|
||||
echo "/LIBPATH:$(MSC)lib" >> $(LINKDEF);\
|
||||
echo "/LIBPATH:$(MSC)platformsdk/lib" >> $(LINKDEF);\
|
||||
echo "/LIBPATH:../../lib/w32" >> $(LINKDEF);\
|
||||
echo "kernel32.lib" >> $(LINKDEF);\
|
||||
echo "ole32.lib" >> $(LINKDEF);\
|
||||
echo "micasa.lib" >> $(LINKDEF);\
|
||||
echo "/DLL" >> $(LINKDEF);\
|
||||
echo "/OUT:$(BINDIR)$(basename $(notdir $@)).dll" >> $(LINKDEF);\
|
||||
echo "/MAP:$(BINDIR)$(basename $(notdir $@)).map" >> $(LINKDEF);\
|
||||
echo "/DEBUG" >> $(LINKDEF);\
|
||||
echo "/MACHINE:IX86" >> $(LINKDEF);\
|
||||
echo "/SUBSYSTEM:WINDOWS" >> $(LINKDEF);\
|
||||
echo "/INCREMENTAL:NO" >> $(LINKDEF);\
|
||||
echo "/VERSION:$(BLD_VER)" >> $(LINKDEF);\
|
||||
echo "/FIXED:NO" >> $(LINKDEF);\
|
||||
echo "/NODEFAULTLIB:uuid" >> $(LINKDEF);\
|
||||
echo "/NODEFAULTLIB:libc" >> $(LINKDEF);\
|
||||
echo "/NODEFAULTLIB:oldnames" >> $(LINKDEF);\
|
||||
echo "/NODEFAULTLIB:user32" >> $(LINKDEF);\
|
||||
echo "/NODEFAULTLIB:gdi32" >> $(LINKDEF);\
|
||||
echo "/NODEFAULTLIB:comdlg32" >> $(LINKDEF);\
|
||||
echo "/NODEFAULTLIB:winspool" >> $(LINKDEF);\
|
||||
echo "/NODEFAULTLIB:shell32" >> $(LINKDEF);\
|
||||
echo "/NODEFAULTLIB:comctl32" >> $(LINKDEF);\
|
||||
echo "/NODEFAULTLIB:olepro32" >> $(LINKDEF);\
|
||||
echo "/NODEFAULTLIB:user32" >> $(LINKDEF);\
|
||||
echo "/NODEFAULTLIB:wininet" >> $(LINKDEF);\
|
||||
echo "/OPT:REF" >> $(LINKDEF);
|
||||
|
||||
31
jwrapper/jnsscs/link_mdd.w32
Normal file
31
jwrapper/jnsscs/link_mdd.w32
Normal file
@@ -0,0 +1,31 @@
|
||||
LINK_DEF_BLD = \
|
||||
echo "$(addprefix $(OBJDIR),$(notdir $(OBJS)))" > $(LINKDEF);\
|
||||
echo "/LIBPATH:$(MSC)lib" >> $(LINKDEF);\
|
||||
echo "/LIBPATH:$(MSC)platformsdk/lib" >> $(LINKDEF);\
|
||||
echo "/LIBPATH:../../lib/w32" >> $(LINKDEF);\
|
||||
echo "kernel32.lib" >> $(LINKDEF);\
|
||||
echo "ole32.lib" >> $(LINKDEF);\
|
||||
echo "micasa.lib" >> $(LINKDEF);\
|
||||
echo "/DLL" >> $(LINKDEF);\
|
||||
echo "/OUT:$(BINDIR)$(basename $(notdir $@)).dll" >> $(LINKDEF);\
|
||||
echo "/MAP:$(BINDIR)$(basename $(notdir $@)).map" >> $(LINKDEF);\
|
||||
echo "/DEBUG" >> $(LINKDEF);\
|
||||
echo "/MACHINE:IX86" >> $(LINKDEF);\
|
||||
echo "/SUBSYSTEM:WINDOWS" >> $(LINKDEF);\
|
||||
echo "/INCREMENTAL:NO" >> $(LINKDEF);\
|
||||
echo "/VERSION:$(BLD_VER)" >> $(LINKDEF);\
|
||||
echo "/FIXED:NO" >> $(LINKDEF);\
|
||||
echo "/NODEFAULTLIB:oldnames" >> $(LINKDEF);\
|
||||
echo "/NODEFAULTLIB:libc" >> $(LINKDEF);\
|
||||
echo "/NODEFAULTLIB:uuid" >> $(LINKDEF);\
|
||||
echo "/NODEFAULTLIB:MSVCRT" >> $(LINKDEF);\
|
||||
echo "/NODEFAULTLIB:user32" >> $(LINKDEF);\
|
||||
echo "/NODEFAULTLIB:gdi32" >> $(LINKDEF);\
|
||||
echo "/NODEFAULTLIB:comdlg32" >> $(LINKDEF);\
|
||||
echo "/NODEFAULTLIB:winspool" >> $(LINKDEF);\
|
||||
echo "/NODEFAULTLIB:shell32" >> $(LINKDEF);\
|
||||
echo "/NODEFAULTLIB:comctl32" >> $(LINKDEF);\
|
||||
echo "/NODEFAULTLIB:olepro32" >> $(LINKDEF);\
|
||||
echo "/NODEFAULTLIB:oleaut32" >> $(LINKDEF);\
|
||||
echo "/NODEFAULTLIB:wininet" >> $(LINKDEF);\
|
||||
echo "/OPT:REF" >> $(LINKDEF);
|
||||
117
jwrapper/jnsscs/linux/Makefile.am
Normal file
117
jwrapper/jnsscs/linux/Makefile.am
Normal file
@@ -0,0 +1,117 @@
|
||||
#######################################################################
|
||||
#
|
||||
# Copyright (C) 2006 Novell, Inc.
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or
|
||||
# modify it under the terms of the GNU General Public
|
||||
# License as published by the Free Software Foundation; either
|
||||
# version 2 of the License, or (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
# General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public
|
||||
# License along with this program; if not, write to the Free
|
||||
# Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
#
|
||||
#
|
||||
#######################################################################
|
||||
|
||||
if DEBUG
|
||||
TARGET_CFG = Debug
|
||||
CFLAGS += -v -w
|
||||
else
|
||||
TARGET_CFG = Release
|
||||
endif
|
||||
|
||||
SUBDIRS =
|
||||
DIST_SUBDIRS =
|
||||
|
||||
EXTRA_DIST = *.exp
|
||||
|
||||
CASAROOT = ../../..
|
||||
|
||||
CASALIBDIR = $(CASAROOT)/$(LIB)
|
||||
|
||||
BUILD_VER = 1.1.1
|
||||
|
||||
# handle Mono secondary dependencies
|
||||
export MONO_PATH := $(MONO_PATH)
|
||||
|
||||
PLATFORMINDEPENDENTSOURCEDIR = ..
|
||||
PLATFORMDEPENDENTSOURCEDIR = .
|
||||
|
||||
MODULE_NAME = libjmicasa
|
||||
MODULE_EXT = so
|
||||
|
||||
CFILES = ../jmicasa.c
|
||||
|
||||
CSFILES_CSC :=
|
||||
INCLUDES = -I. -I.. -I$(CASAROOT)/include -I$(JAVA_HOME)/include -I$(JAVA_HOME)/include/linux \
|
||||
-I/opt/gnome/include/gnome-keyring-1
|
||||
RESOURCES =
|
||||
DEFINES =
|
||||
CFLAGS += $(INCLUDES) $(DEFINES)
|
||||
LIBS = -lpthread -ldl
|
||||
LDFLAGS = -Wl,-Bsymbolic -shared -Wl,--version-script=jmicasa_lux.exp \
|
||||
-L$(CASALIBDIR)/$(TARGET_CFG) -lmicasa -Wl,-soname -Wl,libjmicasa.so.1
|
||||
|
||||
OBJDIR = ./$(TARGET_CFG)/$(LIB)
|
||||
|
||||
OBJS = $(addprefix $(OBJDIR)/, $(CFILES:%.c=%.o))
|
||||
|
||||
CUR_DIR := $(shell pwd)
|
||||
|
||||
all: $(OBJDIR)/$(MODULE_NAME).$(MODULE_EXT).$(BUILD_VER)
|
||||
|
||||
#
|
||||
# Pattern based rules.
|
||||
#
|
||||
vpath %.c $(PLATFORMDEPENDENTSOURCEDIR) $(PLATFORMINDEPENDENTSOURCEDIR)
|
||||
vpath %.cpp $(PLATFORMDEPENDENTSOURCEDIR) $(PLATFORMINDEPENDENTSOURCEDIR)
|
||||
|
||||
$(OBJDIR)/%.o: %.c
|
||||
$(CC) -c $(CFLAGS) -o $@ $<
|
||||
|
||||
$(OBJDIR)/%.o: %.cpp
|
||||
$(CC) -c $(CFLAGS) -o $@ $<
|
||||
|
||||
#$(OBJDIR)/$(MODULE_NAME).$(MODULE_EXT): $(OBJDIR) $(OBJS)
|
||||
# @echo [======== Linking $@ ========]
|
||||
# $(LINK) -o $@ $(LDFLAGS) $(OBJS) $(LIBS)
|
||||
# cp -f $(OBJDIR)/$(MODULE_NAME).$(MODULE_EXT) $(CASALIBDIR)/$(TARGET_CFG)/$(MODULE_NAME).$(MODULE_EXT)
|
||||
|
||||
$(OBJDIR)/$(MODULE_NAME).$(MODULE_EXT).$(BUILD_VER): $(OBJDIR) $(OBJS)
|
||||
@echo [======== Linking $@ ========]
|
||||
cc -o $@ $(LDFLAGS) $(OBJS) $(LIBS)
|
||||
cp -f $(OBJDIR)/$(MODULE_NAME).$(MODULE_EXT).$(BUILD_VER) $(CASALIBDIR)/$(TARGET_CFG)/$(MODULE_NAME).$(MODULE_EXT).$(BUILD_VER)
|
||||
|
||||
$(OBJDIR):
|
||||
[ -d $(OBJDIR) ] || mkdir -p $(OBJDIR)
|
||||
[ -d $(CASALIBDIR) ] || mkdir -p $(CASALIBDIR)
|
||||
[ -d $(CASALIBDIR)/$(TARGET_CFG) ] || mkdir -p $(CASALIBDIR)/$(TARGET_CFG)
|
||||
|
||||
|
||||
install-exec-local: $(OBJDIR)/$(MODULE_NAME).$(MODULE_EXT)
|
||||
$(mkinstalldirs) $(DESTDIR)$(libdir)
|
||||
$(INSTALL_PROGRAM) $(OBJDIR)/$(MODULE_NAME).$(MODULE_EXT) $(DESTDIR)$(libdir)/
|
||||
|
||||
uninstall-local:
|
||||
cd $(DESTDIR)$(libdir); rm -f $(OBJDIR)/$(MODULE_NAME).$(MODULE_EXT)
|
||||
rmdir $(DESTDIR)$(libdir)
|
||||
|
||||
#installcheck-local: install
|
||||
# $(mkinstalldirs) $(DESTDIR)$(libdir)
|
||||
# $(INSTALL_PROGRAM) $(DESTDIR)$(libdir)
|
||||
# cd $(DESTDIR)$(libdir); $(MONO)
|
||||
|
||||
clean-local:
|
||||
if [ -d $(TARGET_CFG) ]; then rm -rf $(TARGET_CFG); fi
|
||||
|
||||
distclean-local:
|
||||
|
||||
maintainer-clean-local:
|
||||
rm -f Makefile.in
|
||||
|
||||
9
jwrapper/jnsscs/linux/jmicasa_lux.exp
Normal file
9
jwrapper/jnsscs/linux/jmicasa_lux.exp
Normal file
@@ -0,0 +1,9 @@
|
||||
jmicasa_1.0.0
|
||||
{
|
||||
global:
|
||||
Java_com_novell_casa_MiCasa_jmiCASASetCredential;
|
||||
Java_com_novell_casa_MiCasa_jmiCASAGetCredential;
|
||||
Java_com_novell_casa_MiCasa_jmiCASARemoveCredential;
|
||||
local:
|
||||
*;
|
||||
};
|
||||
9
jwrapper/jnsscs/linux/link.lux
Normal file
9
jwrapper/jnsscs/linux/link.lux
Normal file
@@ -0,0 +1,9 @@
|
||||
LINK = $(CC) \
|
||||
-Wl,-Bsymbolic \
|
||||
-shared \
|
||||
-Wl,--version-script=$(TARGET)_$(PLAT).exp \
|
||||
-Wl,-rpath -Wl,/usr/lib$(ARC) \
|
||||
-L$(LIBDIR)$(XTRA) -lmicasa \
|
||||
-Wl,-soname -Wl,lib$(TARGET).so.$(PROD_NUM) \
|
||||
-o $(LIBDIR)$(XTRA)/lib$(TARGET).so.$(BLD_VER) \
|
||||
$(OBJDIR)*.$(O)
|
||||
2
jwrapper/jnsscs/linux/objs.lux
Normal file
2
jwrapper/jnsscs/linux/objs.lux
Normal file
@@ -0,0 +1,2 @@
|
||||
OBJS=\
|
||||
jmicasa.$(O)
|
||||
2
jwrapper/jnsscs/objs.w32
Normal file
2
jwrapper/jnsscs/objs.w32
Normal file
@@ -0,0 +1,2 @@
|
||||
OBJS=\
|
||||
jmicasa.$(O)
|
||||
120
jwrapper/jnsscs/windows/Makefile.am
Executable file
120
jwrapper/jnsscs/windows/Makefile.am
Executable file
@@ -0,0 +1,120 @@
|
||||
#######################################################################
|
||||
#
|
||||
# Copyright (C) 2006 Novell, Inc.
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or
|
||||
# modify it under the terms of the GNU General Public
|
||||
# License as published by the Free Software Foundation; either
|
||||
# version 2 of the License, or (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
# General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public
|
||||
# License along with this program; if not, write to the Free
|
||||
# Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
#
|
||||
#
|
||||
#######################################################################
|
||||
|
||||
if DEBUG
|
||||
TARGET_CFG = Debug
|
||||
CFLAGS += -v -w
|
||||
else
|
||||
TARGET_CFG = Release
|
||||
endif
|
||||
|
||||
SUBDIRS =
|
||||
DIST_SUBDIRS =
|
||||
|
||||
EXTRA_DIST = *.exp
|
||||
|
||||
CASAROOT = ../../..
|
||||
|
||||
CASALIBDIR = $(CASAROOT)/lib
|
||||
|
||||
BUILD_VER = 1.1.1
|
||||
|
||||
# handle Mono secondary dependencies
|
||||
export MONO_PATH := $(MONO_PATH)
|
||||
|
||||
PLATFORMINDEPENDENTSOURCEDIR = ..
|
||||
PLATFORMDEPENDENTSOURCEDIR = .
|
||||
|
||||
MODULE_NAME = jmicasa
|
||||
MODULE_EXT = dll
|
||||
|
||||
CFILES = jmicasa.c
|
||||
|
||||
CSFILES_CSC :=
|
||||
INCLUDES = -I. -I.. -I$(CASAROOT)/include -I$(JAVA_HOME)/include -I$(JAVA_HOME)/include/win32 \
|
||||
RESOURCES =
|
||||
DEFINES =
|
||||
CFLAGS += $(INCLUDES) $(DEFINES)
|
||||
|
||||
LIBS = /LIBPATH:"$(MSC)\lib" /LIBPATH:"$(MSC)\PlatformSDK\lib" /LIBPATH:"$(CASAROOT)/lib/Release"
|
||||
LDFLAGS = /VERSION:1.1.1 /MACHINE:IX86 \
|
||||
/dll
|
||||
|
||||
OBJDIR = ./$(TARGET_CFG)/lib
|
||||
|
||||
OBJS = $(addprefix $(OBJDIR)/, $(CFILES:%.c=%.o))
|
||||
|
||||
CUR_DIR := $(shell pwd)
|
||||
|
||||
all: $(OBJDIR)/$(MODULE_NAME).$(MODULE_EXT)
|
||||
|
||||
#
|
||||
# Pattern based rules.
|
||||
#
|
||||
vpath %.c $(PLATFORMDEPENDENTSOURCEDIR) $(PLATFORMINDEPENDENTSOURCEDIR)
|
||||
vpath %.cpp $(PLATFORMDEPENDENTSOURCEDIR) $(PLATFORMINDEPENDENTSOURCEDIR)
|
||||
|
||||
$(OBJDIR)/%.o: %.c
|
||||
$(CC) -c $(CFLAGS) -Fo$@ $<
|
||||
|
||||
$(OBJDIR)/%.o: %.cpp
|
||||
$(CC) -c $(CFLAGS) -o $@ $<
|
||||
|
||||
$(OBJDIR)/$(MODULE_NAME).$(MODULE_EXT): $(OBJDIR) $(OBJS)
|
||||
@echo [======== Linking $@ ========]
|
||||
"$(MSC)\bin\$(LINK)" $(LIBS) $(LDFLAGS) /OUT:$@ $(OBJS) kernel32.lib ole32.lib micasa.lib
|
||||
|
||||
cp -f $(OBJDIR)/$(MODULE_NAME).$(MODULE_EXT) $(CASALIBDIR)/$(TARGET_CFG)/$(MODULE_NAME).$(MODULE_EXT)
|
||||
cp -f $(OBJDIR)/$(MODULE_NAME).lib $(CASALIBDIR)/$(TARGET_CFG)/$(MODULE_NAME).lib
|
||||
cp -f $(OBJDIR)/$(MODULE_NAME).$(MODULE_EXT) $(CASALIBDIR)/$(TARGET_CFG)
|
||||
cp -f $(OBJDIR)/$(MODULE_NAME).$(MODULE_EXT) $(CASABINDIR)/$(TARGET_CFG)
|
||||
cp -f $(OBJDIR)/$(MODULE_NAME).lib $(CASALIBDIR)/$(TARGET_CFG)
|
||||
cp -f $(OBJDIR)/$(MODULE_NAME).lib $(CASABINDIR)$(TARGET_CFG)
|
||||
|
||||
|
||||
$(OBJDIR):
|
||||
[ -d $(OBJDIR) ] || mkdir -p $(OBJDIR)
|
||||
[ -d $(CASALIBDIR) ] || mkdir -p $(CASALIBDIR)
|
||||
[ -d $(CASABINDIR) ] || mkdir -p $(CASABINDIR)
|
||||
[ -d $(CASALIBDIR)/$(TARGET_CFG) ] || mkdir -p $(CASALIBDIR)/$(TARGET_CFG)
|
||||
[ -d $(CASABINDIR)/$(TARGET_CFG) ] || mkdir -p $(CASABINDIR)/$(TARGET_CFG)
|
||||
|
||||
install-exec-local: $(OBJDIR)/$(MODULE_NAME).$(MODULE_EXT)
|
||||
$(mkinstalldirs) $(DESTDIR)$(libdir)
|
||||
$(INSTALL_PROGRAM) $(OBJDIR)/$(MODULE_NAME).$(MODULE_EXT) $(DESTDIR)$(libdir)/
|
||||
|
||||
uninstall-local:
|
||||
cd $(DESTDIR)$(libdir); rm -f $(OBJDIR)/$(MODULE_NAME).$(MODULE_EXT)
|
||||
rmdir $(DESTDIR)$(libdir)
|
||||
|
||||
#installcheck-local: install
|
||||
# $(mkinstalldirs) $(DESTDIR)$(libdir)
|
||||
# $(INSTALL_PROGRAM) $(DESTDIR)$(libdir)
|
||||
# cd $(DESTDIR)$(libdir); $(MONO)
|
||||
|
||||
clean-local:
|
||||
if [ -d $(TARGET_CFG) ]; then rm -rf $(TARGET_CFG); fi
|
||||
|
||||
distclean-local:
|
||||
|
||||
maintainer-clean-local:
|
||||
rm -f Makefile.in
|
||||
|
||||
Reference in New Issue
Block a user