diff options
Diffstat (limited to 'mDNSResponder/mDNSWindows/Java')
-rwxr-xr-x | mDNSResponder/mDNSWindows/Java/Java.vcproj | 111 | ||||
-rwxr-xr-x | mDNSResponder/mDNSWindows/Java/Java.vcxproj | 116 | ||||
-rw-r--r-- | mDNSResponder/mDNSWindows/Java/jdns_sd.rc | 62 | ||||
-rw-r--r-- | mDNSResponder/mDNSWindows/Java/makefile | 143 | ||||
-rw-r--r-- | mDNSResponder/mDNSWindows/Java/makefile64 | 143 |
5 files changed, 575 insertions, 0 deletions
diff --git a/mDNSResponder/mDNSWindows/Java/Java.vcproj b/mDNSResponder/mDNSWindows/Java/Java.vcproj new file mode 100755 index 00000000..1707ac59 --- /dev/null +++ b/mDNSResponder/mDNSWindows/Java/Java.vcproj @@ -0,0 +1,111 @@ +<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+ ProjectType="Visual C++"
+ Version="8.00"
+ Name="Java"
+ ProjectGUID="{9CE2568A-3170-41C6-9F20-A0188A9EC114}"
+ Keyword="MakeFileProj"
+ >
+ <Platforms>
+ <Platform
+ Name="Win32"
+ />
+ <Platform
+ Name="x64"
+ />
+ </Platforms>
+ <ToolFiles>
+ </ToolFiles>
+ <Configurations>
+ <Configuration
+ Name="Debug|Win32"
+ OutputDirectory="Debug"
+ IntermediateDirectory="Debug"
+ ConfigurationType="0"
+ InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
+ >
+ <Tool
+ Name="VCNMakeTool"
+ BuildCommandLine="nmake /f makefile DEBUG=1"
+ ReBuildCommandLine="nmake /f makefile DEBUG=1"
+ CleanCommandLine="nmake /f makefile DEBUG=1 clean"
+ Output=""
+ PreprocessorDefinitions=""
+ IncludeSearchPath=""
+ ForcedIncludes=""
+ AssemblySearchPath=""
+ ForcedUsingAssemblies=""
+ CompileAsManaged=""
+ />
+ </Configuration>
+ <Configuration
+ Name="Debug|x64"
+ OutputDirectory="$(PlatformName)\$(ConfigurationName)"
+ IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"
+ ConfigurationType="0"
+ InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
+ >
+ <Tool
+ Name="VCNMakeTool"
+ BuildCommandLine="nmake /f makefile64 DEBUG=1"
+ ReBuildCommandLine="nmake /f makefile64 DEBUG=1"
+ CleanCommandLine="nmake /f makefile64 DEBUG=1 clean"
+ Output=""
+ PreprocessorDefinitions=""
+ IncludeSearchPath=""
+ ForcedIncludes=""
+ AssemblySearchPath=""
+ ForcedUsingAssemblies=""
+ CompileAsManaged=""
+ />
+ </Configuration>
+ <Configuration
+ Name="Release|Win32"
+ OutputDirectory="Release"
+ IntermediateDirectory="Release"
+ ConfigurationType="0"
+ InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
+ >
+ <Tool
+ Name="VCNMakeTool"
+ BuildCommandLine="nmake /f makefile"
+ ReBuildCommandLine="nmake /f makefile"
+ CleanCommandLine="nmake /f makefile clean"
+ Output=""
+ PreprocessorDefinitions=""
+ IncludeSearchPath=""
+ ForcedIncludes=""
+ AssemblySearchPath=""
+ ForcedUsingAssemblies=""
+ CompileAsManaged=""
+ />
+ </Configuration>
+ <Configuration
+ Name="Release|x64"
+ OutputDirectory="$(PlatformName)\$(ConfigurationName)"
+ IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"
+ ConfigurationType="0"
+ InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
+ >
+ <Tool
+ Name="VCNMakeTool"
+ BuildCommandLine="nmake /f makefile64"
+ ReBuildCommandLine="nmake /f makefile64"
+ CleanCommandLine="nmake /f makefile64 clean"
+ Output=""
+ PreprocessorDefinitions=""
+ IncludeSearchPath=""
+ ForcedIncludes=""
+ AssemblySearchPath=""
+ ForcedUsingAssemblies=""
+ CompileAsManaged=""
+ />
+ </Configuration>
+ </Configurations>
+ <References>
+ </References>
+ <Files>
+ </Files>
+ <Globals>
+ </Globals>
+</VisualStudioProject>
diff --git a/mDNSResponder/mDNSWindows/Java/Java.vcxproj b/mDNSResponder/mDNSWindows/Java/Java.vcxproj new file mode 100755 index 00000000..9c63f876 --- /dev/null +++ b/mDNSResponder/mDNSWindows/Java/Java.vcxproj @@ -0,0 +1,116 @@ +<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <ItemGroup Label="ProjectConfigurations">
+ <ProjectConfiguration Include="Debug|Win32">
+ <Configuration>Debug</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Debug|x64">
+ <Configuration>Debug</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release|Win32">
+ <Configuration>Release</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release|x64">
+ <Configuration>Release</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ </ItemGroup>
+ <PropertyGroup Label="Globals">
+ <ProjectGuid>{9CE2568A-3170-41C6-9F20-A0188A9EC114}</ProjectGuid>
+ <Keyword>MakeFileProj</Keyword>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
+ <ConfigurationType>Makefile</ConfigurationType>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
+ <ConfigurationType>Makefile</ConfigurationType>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
+ <ConfigurationType>Makefile</ConfigurationType>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
+ <ConfigurationType>Makefile</ConfigurationType>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
+ <ImportGroup Label="ExtensionSettings">
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
+ </ImportGroup>
+ <PropertyGroup Label="UserMacros" />
+ <PropertyGroup>
+ <_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Debug\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Debug\</IntDir>
+ <NMakeBuildCommandLine Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">nmake /f makefile DEBUG=1</NMakeBuildCommandLine>
+ <NMakeReBuildCommandLine Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">nmake /f makefile DEBUG=1</NMakeReBuildCommandLine>
+ <NMakeCleanCommandLine Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">nmake /f makefile DEBUG=1 clean</NMakeCleanCommandLine>
+ <NMakeOutput Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
+ <NMakePreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(NMakePreprocessorDefinitions)</NMakePreprocessorDefinitions>
+ <NMakeIncludeSearchPath Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(NMakeIncludeSearchPath)</NMakeIncludeSearchPath>
+ <NMakeForcedIncludes Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(NMakeForcedIncludes)</NMakeForcedIncludes>
+ <NMakeAssemblySearchPath Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(NMakeAssemblySearchPath)</NMakeAssemblySearchPath>
+ <NMakeForcedUsingAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(NMakeForcedUsingAssemblies)</NMakeForcedUsingAssemblies>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(Platform)\$(Configuration)\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(Platform)\$(Configuration)\</IntDir>
+ <NMakeBuildCommandLine Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">nmake /f makefile64 DEBUG=1</NMakeBuildCommandLine>
+ <NMakeReBuildCommandLine Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">nmake /f makefile64 DEBUG=1</NMakeReBuildCommandLine>
+ <NMakeCleanCommandLine Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">nmake /f makefile64 DEBUG=1 clean</NMakeCleanCommandLine>
+ <NMakeOutput Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
+ <NMakePreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(NMakePreprocessorDefinitions)</NMakePreprocessorDefinitions>
+ <NMakeIncludeSearchPath Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(NMakeIncludeSearchPath)</NMakeIncludeSearchPath>
+ <NMakeForcedIncludes Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(NMakeForcedIncludes)</NMakeForcedIncludes>
+ <NMakeAssemblySearchPath Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(NMakeAssemblySearchPath)</NMakeAssemblySearchPath>
+ <NMakeForcedUsingAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(NMakeForcedUsingAssemblies)</NMakeForcedUsingAssemblies>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Release\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Release\</IntDir>
+ <NMakeBuildCommandLine Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">nmake /f makefile</NMakeBuildCommandLine>
+ <NMakeReBuildCommandLine Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">nmake /f makefile</NMakeReBuildCommandLine>
+ <NMakeCleanCommandLine Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">nmake /f makefile clean</NMakeCleanCommandLine>
+ <NMakeOutput Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
+ <NMakePreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(NMakePreprocessorDefinitions)</NMakePreprocessorDefinitions>
+ <NMakeIncludeSearchPath Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(NMakeIncludeSearchPath)</NMakeIncludeSearchPath>
+ <NMakeForcedIncludes Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(NMakeForcedIncludes)</NMakeForcedIncludes>
+ <NMakeAssemblySearchPath Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(NMakeAssemblySearchPath)</NMakeAssemblySearchPath>
+ <NMakeForcedUsingAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(NMakeForcedUsingAssemblies)</NMakeForcedUsingAssemblies>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(Platform)\$(Configuration)\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(Platform)\$(Configuration)\</IntDir>
+ <NMakeBuildCommandLine Condition="'$(Configuration)|$(Platform)'=='Release|x64'">nmake /f makefile64</NMakeBuildCommandLine>
+ <NMakeReBuildCommandLine Condition="'$(Configuration)|$(Platform)'=='Release|x64'">nmake /f makefile64</NMakeReBuildCommandLine>
+ <NMakeCleanCommandLine Condition="'$(Configuration)|$(Platform)'=='Release|x64'">nmake /f makefile64 clean</NMakeCleanCommandLine>
+ <NMakeOutput Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
+ <NMakePreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(NMakePreprocessorDefinitions)</NMakePreprocessorDefinitions>
+ <NMakeIncludeSearchPath Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(NMakeIncludeSearchPath)</NMakeIncludeSearchPath>
+ <NMakeForcedIncludes Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(NMakeForcedIncludes)</NMakeForcedIncludes>
+ <NMakeAssemblySearchPath Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(NMakeAssemblySearchPath)</NMakeAssemblySearchPath>
+ <NMakeForcedUsingAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(NMakeForcedUsingAssemblies)</NMakeForcedUsingAssemblies>
+ </PropertyGroup>
+ <ItemDefinitionGroup>
+ </ItemDefinitionGroup>
+ <ItemGroup>
+ <ProjectReference Include="..\DLL\dnssd.vcxproj">
+ <Project>{ab581101-18f0-46f6-b56a-83a6b1ea657e}</Project>
+ <ReferenceOutputAssembly>false</ReferenceOutputAssembly>
+ </ProjectReference>
+ </ItemGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
+ <ImportGroup Label="ExtensionTargets">
+ </ImportGroup>
+</Project>
\ No newline at end of file diff --git a/mDNSResponder/mDNSWindows/Java/jdns_sd.rc b/mDNSResponder/mDNSWindows/Java/jdns_sd.rc new file mode 100644 index 00000000..79fdf140 --- /dev/null +++ b/mDNSResponder/mDNSWindows/Java/jdns_sd.rc @@ -0,0 +1,62 @@ +/* -*- Mode: C; tab-width: 4 -*- + * + * Copyright (c) 2004 Apple Computer, Inc. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifndef JDNS_SD_RC +#define JDNS_SD_RC + +#include "afxres.h" +#include "../WinVersRes.h" + +///////////////////////////////////////////////////////////////////////////// +// +// Version +// + +VS_VERSION_INFO VERSIONINFO + FILEVERSION MASTER_PROD_VERS + PRODUCTVERSION MASTER_PROD_VERS + FILEFLAGSMASK 0x17L +#ifdef _DEBUG + FILEFLAGS 0x1L +#else + FILEFLAGS 0x0L +#endif + FILEOS 0x4L + FILETYPE 0x2L + FILESUBTYPE 0x0L +BEGIN + BLOCK "StringFileInfo" + BEGIN + BLOCK "040904b0" + BEGIN + VALUE "CompanyName", MASTER_COMPANY_NAME + VALUE "FileDescription", MASTER_PROD_NAME " support for Java" + VALUE "FileVersion", MASTER_PROD_VERS_STR + VALUE "InternalName", "jdns_sd" + VALUE "LegalCopyright", MASTER_LEGAL_COPYRIGHT + VALUE "OriginalFilename", "jdns_sd.dll" + VALUE "ProductName", MASTER_PROD_NAME + VALUE "ProductVersion", MASTER_PROD_VERS_STR + END + END + BLOCK "VarFileInfo" + BEGIN + VALUE "Translation", 0x409, 1200 + END +END + +#endif // JDNS_SD_RC diff --git a/mDNSResponder/mDNSWindows/Java/makefile b/mDNSResponder/mDNSWindows/Java/makefile new file mode 100644 index 00000000..2e4b6bd0 --- /dev/null +++ b/mDNSResponder/mDNSWindows/Java/makefile @@ -0,0 +1,143 @@ +# -*- tab-width: 4 -*- +# +# Copyright (c) 2002-2004 Apple Computer, Inc. All rights reserved. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# This Makefile builds a .jar file and accompanying JNI support library +# containing the DNSSD implementation for Java and support classes. +# +# Prior to building Java support, you must build DNSSD.dll. +# +# nmake with no arguments builds all production targets. +# 'nmake DEBUG=1' to build debugging targets. +# 'nmake clean' or 'nmake clean DEBUG=1' to delete prod/debug objects & targets +# +# To run nmake, you may need to set up your PATH correctly, using a script +# such as: "\Program Files\Microsoft Visual Studio .NET\Vc7\bin\vcvars32.bat" +# +# The default location of the JDK is \javasdk. You can override this on the +# command line (e.g. 'nmake JDK=\j2dk1.4.2_03'). + +############################################################################ + +COREDIR = ..\..\mDNSCore +SHAREDDIR = ..\..\mDNSShared + +JDK = $(JAVA_HOME) + +CC = cl +RC = rc +LD = ld +CP = copy +RM = del /Q +RMDIR = rmdir /S /Q +JAVAC = $(JDK)\bin\javac +JAVAH = $(JDK)\bin\javah +JAR = $(JDK)\bin\jar +CFLAGS_COMMON = -LD -DAUTO_CALLBACKS=0 -I. -I..\.. \ + -I$(COREDIR) -I$(SHAREDDIR) -I$(JDK)\include -I$(JDK)\include\win32 + +# Set up diverging paths for debug vs. prod builds +DEBUG=0 +!if $(DEBUG) == 1 +CFLAGS_DEBUG = -Zi -DMDNS_DEBUGMSGS=2 +OBJDIR = objects\debug +BUILDDIR = build\debug +INSTALLDIR = root\"Program Files"\Bonjour +LIBDIR = ..\DLL\Win32\Debug +!else +CFLAGS_DEBUG = -Os -DMDNS_DEBUGMSGS=0 +OBJDIR = objects\prod +BUILDDIR = build\prod +INSTALLDIR = root\"Program Files"\Bonjour +LIBDIR = ..\DLL\Win32\Release +!endif + +CFLAGS = $(CFLAGS_COMMON) $(CFLAGS_DEBUG) +JAVACFLAGS = $(CFLAGS) $(JAVACFLAGS_OS) + +############################################################################# + +all: setup Java postbuild + +# 'setup' sets up the build directory structure the way we want +setup: + @if not exist objects mkdir objects + @if not exist build mkdir build + @if not exist $(OBJDIR) mkdir $(OBJDIR) + @if not exist $(BUILDDIR) mkdir $(BUILDDIR) + +postbuild: + @if not "%RC_XBS%"=="YES" GOTO CONT + @if not exist "$(DSTROOT)\WINDOWS\system32\Win32" mkdir "$(DSTROOT)\WINDOWS\system32\Win32" + @if not exist "$(DSTROOT)\Program Files\Bonjour\Win32" mkdir "$(DSTROOT)\Program Files\Bonjour\Win32" + @copy $(BUILDDIR)\jdns_sd.dll "$(DSTROOT)\WINDOWS\system32\Win32" + @copy $(BUILDDIR)\dns_sd.jar "$(DSTROOT)\Program Files\Bonjour\Win32" + @:CONT + @if not exist root mkdir root + @if not exist root\"Program Files" mkdir root\"Program Files" + @if not exist $(INSTALLDIR) mkdir $(INSTALLDIR) + copy $(BUILDDIR)\dns_sd.jar $(INSTALLDIR) + copy $(BUILDDIR)\jdns_sd.dll $(INSTALLDIR) + +# clean removes targets and objects +clean: + @if exist $(OBJDIR) $(RMDIR) $(OBJDIR) + @if exist $(BUILDDIR) $(RMDIR) $(BUILDDIR) + +############################################################################# + +# The following targets build Java wrappers for the dns-sd.h API. + +Java: setup $(BUILDDIR)\dns_sd.jar $(BUILDDIR)\jdns_sd.dll postbuild + @echo "Java wrappers done" + +JAVASRC = $(SHAREDDIR)\Java +JARCONTENTS = $(OBJDIR)\com\apple\dnssd\DNSSDService.class \ + $(OBJDIR)\com\apple\dnssd\DNSSDException.class \ + $(OBJDIR)\com\apple\dnssd\DNSRecord.class \ + $(OBJDIR)\com\apple\dnssd\TXTRecord.class \ + $(OBJDIR)\com\apple\dnssd\DNSSDRegistration.class \ + $(OBJDIR)\com\apple\dnssd\DNSSDRecordRegistrar.class \ + $(OBJDIR)\com\apple\dnssd\BaseListener.class \ + $(OBJDIR)\com\apple\dnssd\BrowseListener.class \ + $(OBJDIR)\com\apple\dnssd\ResolveListener.class \ + $(OBJDIR)\com\apple\dnssd\RegisterListener.class \ + $(OBJDIR)\com\apple\dnssd\RegisterRecordListener.class \ + $(OBJDIR)\com\apple\dnssd\QueryListener.class \ + $(OBJDIR)\com\apple\dnssd\DomainListener.class \ + $(OBJDIR)\com\apple\dnssd\DNSSD.class + +$(BUILDDIR)\dns_sd.jar: $(JARCONTENTS) + $(JAR) -cf $@ -C $(OBJDIR) com + +$(BUILDDIR)\jdns_sd.dll: $(JAVASRC)\JNISupport.c $(OBJDIR)\DNSSD.java.h $(OBJDIR)\jdns_sd.RES + $(CC) -Fe$@ $(JAVASRC)\JNISupport.c $(CFLAGS) -I$(OBJDIR) \ + $(LIBDIR)\DNSSD.lib $(JDK)\lib\jvm.lib ws2_32.lib iphlpapi.lib $(OBJDIR)\jdns_sd.RES /link /NXCOMPAT /DYNAMICBASE /SAFESEH + +.SUFFIXES : .java +{$(JAVASRC)}.java{$(OBJDIR)\com\apple\dnssd}.class: + $(JAVAC) -d $(OBJDIR) -classpath $(OBJDIR) $< + +$(OBJDIR)\DNSSD.java.h: $(OBJDIR)\com\apple\dnssd\DNSSD.class + $(JAVAH) -classpath $(OBJDIR) -o $@ \ + com.apple.dnssd.AppleBrowser \ + com.apple.dnssd.AppleResolver \ + com.apple.dnssd.AppleRegistration \ + com.apple.dnssd.AppleQuery \ + com.apple.dnssd.AppleService + +$(OBJDIR)\jdns_sd.RES: jdns_sd.rc + $(RC) /fo $@ $? + diff --git a/mDNSResponder/mDNSWindows/Java/makefile64 b/mDNSResponder/mDNSWindows/Java/makefile64 new file mode 100644 index 00000000..fb0ff9ce --- /dev/null +++ b/mDNSResponder/mDNSWindows/Java/makefile64 @@ -0,0 +1,143 @@ +# -*- tab-width: 4 -*- +# +# Copyright (c) 2002-2004 Apple Computer, Inc. All rights reserved. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# This Makefile builds a .jar file and accompanying JNI support library +# containing the DNSSD implementation for Java and support classes. +# +# Prior to building Java support, you must build DNSSD.dll. +# +# nmake with no arguments builds all production targets. +# 'nmake DEBUG=1' to build debugging targets. +# 'nmake clean' or 'nmake clean DEBUG=1' to delete prod/debug objects & targets +# +# To run nmake, you may need to set up your PATH correctly, using a script +# such as: "\Program Files\Microsoft Visual Studio .NET\Vc7\bin\vcvars32.bat" +# +# The default location of the JDK is \javasdk. You can override this on the +# command line (e.g. 'nmake JDK=\j2dk1.4.2_03'). + +############################################################################ + +COREDIR = ..\..\mDNSCore +SHAREDDIR = ..\..\mDNSShared + +JDK = $(JAVA_HOME) + +CC = cl +RC = rc +LD = ld +CP = copy +RM = del /Q +RMDIR = rmdir /S /Q +JAVAC = $(JDK)\bin\javac +JAVAH = $(JDK)\bin\javah +JAR = $(JDK)\bin\jar +CFLAGS_COMMON = -LD -DAUTO_CALLBACKS=0 -I. -I..\.. \ + -I$(COREDIR) -I$(SHAREDDIR) -I$(JDK)\include -I$(JDK)\include\win32 + +# Set up diverging paths for debug vs. prod builds +DEBUG=0 +!if $(DEBUG) == 1 +CFLAGS_DEBUG = -Zi -DMDNS_DEBUGMSGS=2 +OBJDIR = objects\debug\x64 +BUILDDIR = build\debug\x64 +INSTALLDIR = root\"Program Files"\Bonjour +LIBDIR = ..\DLL\x64\Debug +!else +CFLAGS_DEBUG = -Os -DMDNS_DEBUGMSGS=0 +OBJDIR = objects\prod\x64 +BUILDDIR = build\prod\x64 +INSTALLDIR = root\"Program Files"\Bonjour +LIBDIR = ..\DLL\x64\Release +!endif + +CFLAGS = $(CFLAGS_COMMON) $(CFLAGS_DEBUG) +JAVACFLAGS = $(CFLAGS) $(JAVACFLAGS_OS) + +############################################################################# + +all: setup Java postbuild + +# 'setup' sets up the build directory structure the way we want +setup: + @if not exist objects mkdir objects + @if not exist build mkdir build + @if not exist $(OBJDIR) mkdir $(OBJDIR) + @if not exist $(BUILDDIR) mkdir $(BUILDDIR) + +postbuild: + @if not "%RC_XBS%"=="YES" GOTO CONT + @if not exist "$(DSTROOT)\WINDOWS\system32\x64" mkdir "$(DSTROOT)\WINDOWS\system32\x64" + @if not exist "$(DSTROOT)\Program Files\Bonjour\x64" mkdir "$(DSTROOT)\Program Files\Bonjour\x64" + @copy $(BUILDDIR)\jdns_sd.dll "$(DSTROOT)\WINDOWS\system32\x64" + @copy $(BUILDDIR)\dns_sd.jar "$(DSTROOT)\Program Files\Bonjour\x64" + @:CONT + @if not exist root mkdir root + @if not exist root\"Program Files" mkdir root\"Program Files" + @if not exist $(INSTALLDIR) mkdir $(INSTALLDIR) + copy $(BUILDDIR)\dns_sd.jar $(INSTALLDIR) + copy $(BUILDDIR)\jdns_sd.dll $(INSTALLDIR) + +# clean removes targets and objects +clean: + @if exist $(OBJDIR) $(RMDIR) $(OBJDIR) + @if exist $(BUILDDIR) $(RMDIR) $(BUILDDIR) + +############################################################################# + +# The following targets build Java wrappers for the dns-sd.h API. + +Java: setup $(BUILDDIR)\dns_sd.jar $(BUILDDIR)\jdns_sd.dll postbuild + @echo "Java wrappers done" + +JAVASRC = $(SHAREDDIR)\Java +JARCONTENTS = $(OBJDIR)\com\apple\dnssd\DNSSDService.class \ + $(OBJDIR)\com\apple\dnssd\DNSSDException.class \ + $(OBJDIR)\com\apple\dnssd\DNSRecord.class \ + $(OBJDIR)\com\apple\dnssd\TXTRecord.class \ + $(OBJDIR)\com\apple\dnssd\DNSSDRegistration.class \ + $(OBJDIR)\com\apple\dnssd\DNSSDRecordRegistrar.class \ + $(OBJDIR)\com\apple\dnssd\BaseListener.class \ + $(OBJDIR)\com\apple\dnssd\BrowseListener.class \ + $(OBJDIR)\com\apple\dnssd\ResolveListener.class \ + $(OBJDIR)\com\apple\dnssd\RegisterListener.class \ + $(OBJDIR)\com\apple\dnssd\RegisterRecordListener.class \ + $(OBJDIR)\com\apple\dnssd\QueryListener.class \ + $(OBJDIR)\com\apple\dnssd\DomainListener.class \ + $(OBJDIR)\com\apple\dnssd\DNSSD.class + +$(BUILDDIR)\dns_sd.jar: $(JARCONTENTS) + $(JAR) -cf $@ -C $(OBJDIR) com + +$(BUILDDIR)\jdns_sd.dll: $(JAVASRC)\JNISupport.c $(OBJDIR)\DNSSD.java.h $(OBJDIR)\jdns_sd.RES + $(CC) -Fe$@ $(JAVASRC)\JNISupport.c $(CFLAGS) -I$(OBJDIR) \ + $(LIBDIR)\DNSSD.lib $(JDK)\lib\jvm.lib ws2_32.lib iphlpapi.lib $(OBJDIR)\jdns_sd.RES /link /NXCOMPAT /DYNAMICBASE + +.SUFFIXES : .java +{$(JAVASRC)}.java{$(OBJDIR)\com\apple\dnssd}.class: + $(JAVAC) -d $(OBJDIR) -classpath $(OBJDIR) $< + +$(OBJDIR)\DNSSD.java.h: $(OBJDIR)\com\apple\dnssd\DNSSD.class + $(JAVAH) -classpath $(OBJDIR) -o $@ \ + com.apple.dnssd.AppleBrowser \ + com.apple.dnssd.AppleResolver \ + com.apple.dnssd.AppleRegistration \ + com.apple.dnssd.AppleQuery \ + com.apple.dnssd.AppleService + +$(OBJDIR)\jdns_sd.RES: jdns_sd.rc + $(RC) /fo $@ $? + |