windows-make-cygwin-libs-20090519
authorAsanka Herath <asanka@secure-endpoints.com>
Wed, 20 May 2009 06:03:09 +0000 (06:03 +0000)
committerJeffrey Altman <jaltman@secure-endpoints.com>
Wed, 20 May 2009 06:03:09 +0000 (06:03 +0000)
LICENSE MIT

Unless NOCYGWIN is defined create cygwin .a import libraries
for each OpenAFS DLL that is constructed.

19 files changed:
src/WINNT/install/wix/NTMakefile
src/WINNT/install/wix/feature.wxi
src/WINNT/install/wix/files.wxi
src/WINNT/install/wix/platform.wxi
src/WINNT/pthread/NTMakefile
src/config/NTMakefile.amd64_w2k
src/config/NTMakefile.i386_nt40
src/config/NTMakefile.i386_w2k
src/libadmin/adminutil/NTMakefile
src/libadmin/bos/NTMakefile
src/libadmin/cfg/NTMakefile
src/libadmin/client/NTMakefile
src/libadmin/kas/NTMakefile
src/libadmin/pts/NTMakefile
src/libadmin/vos/NTMakefile
src/libafsauthent/NTMakefile
src/libafsauthent/afsauthent.def
src/libafsrpc/NTMakefile
src/procmgmt/NTMakefile

index 8ffc5d2..eedbd59 100644 (file)
@@ -35,6 +35,11 @@ WIXOBJ = $(OUT)\openafs-$(LANG).wixobj
 !IF ("$(CPU)" == "i386")
 BINWIXOBJ  = $(OUT)\openafs-32bit-tools-$(LANG).wixobj
 !ENDIF
+!IFNDEF NOCYGWIN
+WIXCYGOPT=-dCygwinArchives
+!ELSE
+WIXCYGOPT=
+!ENDIF
 
 LANGUAGES=en_US de_DE es_ES ja_JP ko_KR pt_BR zh_CN zh_TW
 
@@ -83,7 +88,7 @@ $(WIXOBJ): openafs.wxs $(WIXINCLUDES)
                -dIDNMRedistDir=$(MSIDNNLS)\\REDIST     \
                -v0 \
                -w0 \
-        $(AFSDEV_AUXWIXDEFINES)        openafs.wxs
+               $(WIXCYGOPT) $(AFSDEV_AUXWIXDEFINES)    openafs.wxs
 
 !IF ("$(CPU)" == "i386")
 $(BINWIXOBJ): oafwbins.wxs $(WIXINCLUDES)
@@ -98,7 +103,7 @@ $(BINWIXOBJ): oafwbins.wxs $(WIXINCLUDES)
                -dCellDbFile=CellServDB \
                -v0 \
                -w0 \
-        $(AFSDEV_AUXWIXDEFINES)        oafwbins.wxs
+        $(WIXCYGOPT) $(AFSDEV_AUXWIXDEFINES)   oafwbins.wxs
 
 $(BINMSIFILE): $(BINWIXOBJ)
        light -nologo -out $(BINMSIFILE) \
index 6d262e8..873fb97 100644 (file)
                                <ComponentRef Id="cmp_SDK_Include_Winnt" />
                                <ComponentRef Id="cmp_SDK_Lib" />
                                <ComponentRef Id="cmp_SDK_Lib_Afs" />
+                <?ifdef CygwinArchives ?>
+                <ComponentRef Id="cmp_SDK_Lib_Cygwin" />
+                <ComponentRef Id="cmp_SDK_Lib_Afs_Cygwin" />
+                <?endif?>
 
                        <?ifdef DebugSyms?>
                                <Feature Id="feaSDKDebug" AllowAdvertise="no" Description="$(loc.StrAFSSDKDebugLongDesc)" Display="expand"
index d7871df..7a84aaf 100644 (file)
                             <File Id="filecm_config_OBJ" Name="CM_CON~1.obj" LongName="cm_config.obj" DiskId="1" src="$(var.LibDir)cm_config.obj" /> 
                             <File Id="filecm_dns_OBJ" Name="cm_dns.obj" LongName="cm_dns.obj" DiskId="1" src="$(var.LibDir)cm_dns.obj" /> 
                         </Component>
+                        <?ifdef CygwinArchives?>
+                        <Component Win64="$(var.Win64)" Id="cmp_SDK_Lib_Cygwin" Guid="$(var.cmp_SDK_Lib_Cygwin_guid)">
+                          <File Id="fileafsauthent_A" Name="afsauth.a" LongName="afsauthent.a" DiskId="1" src="$(var.LibDir)afsauthent.a" />
+                          <File Id="fileafspthread_A" Name="afspthrd.a" LongName="afspthread.a" DiskId="1" src="$(var.LibDir)afspthread.a" />
+                          <File Id="fileafsrpc_A" Name="afsrpc.a" LongName="afsrpc.a" DiskId="1" src="$(var.LibDir)afsrpc.a" />
+                        </Component>
+                        <?endif?>
                         <Directory Id="dirLibAfs" Name="afs">
                             <Component Win64="$(var.Win64)" Id="cmp_SDK_Lib_Afs" Guid="$(var.cmp_SDK_Lib_Afs_guid)">
                                 <File Id="fileafsacl_LIB" Name="afsacl.lib" LongName="afsacl.lib" DiskId="1" src="$(var.LibDir)afs\afsacl.lib" /> 
                                 <File Id="fileTaAfsAppLib_LIB" Name="TAAFSA~2.lib" LongName="TaAfsAppLib.lib" DiskId="1" src="$(var.LibDir)afs\TaAfsAppLib.lib" /> 
                                 <File Id="filetalocale_LIB" Name="talocale.lib" LongName="talocale.lib" DiskId="1" src="$(var.LibDir)afs\talocale.lib" /> 
                             </Component>
+                            <?ifdef CygwinArchives?>
+                            <Component Win64="$(var.Win64)" Id="cmp_SDK_Lib_Afs_Cygwin" Guid="$(var.cmp_SDK_Lib_Afs_Cygwin_guid)">
+                                <File Id="fileafsadminutil_A" Name="afsadmut.a" LongName="afsadminutil.a" DiskId="1" src="$(var.ServerDir)afsadminutil.a" /> 
+                                <File Id="fileafsbosadmin_A" Name="afsbosad.a" LongName="afsbosadmin.a" DiskId="1" src="$(var.ServerDir)afsbosadmin.a" /> 
+                                <File Id="fileafscfgadmin_A" Name="afscfgad.a" LongName="afscfgadmin.a" DiskId="1" src="$(var.ServerDir)afscfgadmin.a" /> 
+                                <File Id="fileafsclientadmin_A" Name="afscliad.a" LongName="afsclientadmin.a" DiskId="1" src="$(var.ServerDir)afsclientadmin.a" /> 
+                                <File Id="fileafskasadmin_A" Name="afskasad.a" LongName="afskasadmin.a" DiskId="1" src="$(var.ServerDir)afskasadmin.a" /> 
+                                <File Id="fileafsprocmgmt_A" Name="afsprcmg.a" LongName="afsprocmgmt.a" DiskId="1" src="$(var.ServerDir)afsprocmgmt.a" /> 
+                                <File Id="fileafsptsadmin_A" Name="afsptsad.a" LongName="afsptsadmin.a" DiskId="1" src="$(var.ServerDir)afsptsadmin.a" /> 
+                                <File Id="fileafsvosadmin_A" Name="afsvosad.a" LongName="afsvosadmin.a" DiskId="1" src="$(var.ServerDir)afsvosadmin.a" /> 
+                            </Component>
+                            <?endif?>
                         </Directory>
                     </Directory>
             </Directory> <!-- SDK -->
index 473fc44..86e9bf4 100644 (file)
@@ -79,6 +79,8 @@
        <?define cmp_ClientProgramDebug_guid="FC0AD966-9323-4AAA-96D1-FFEF44460E59"?>
        <?define cmp_SDK_Lib_guid="A7CC24B1-E6A9-4254-B468-F4C47BC9ECFC"?>
        <?define cmp_SDK_Lib_Afs_guid="C0DA2C3B-B2B8-4AD4-9B00-42FB45C5B352"?>
+       <?define cmp_SDK_Lib_Cygwin_guid="6F09E575-6482-4D90-A6CD-408321539679"?>
+       <?define cmp_SDK_Lib_Afs_Cygwin_guid="19AB6F3B-AE92-40D8-8C68-3F39A1AB68C0"?>
        <?define cmf_vlserver_EXE_guid="88A9024C-D5B2-4AF1-8241-E0B046E25FE3"?>
        <?define cmf_volinfo_EXE_guid="55C8984F-D58A-44FD-9566-3C033612B2DB"?>
        <?define cmf_volserver_EXE_guid="98049267-9D3C-4BBC-B5E5-E3A0BCE0B8AF"?>
        <?define cmp_ClientProgramDebug_guid="A6A394F6-45D0-45A9-A7DD-C0997070EC14"?>
        <?define cmp_SDK_Lib_guid="71BC1B4E-4C4C-4FF8-8DDA-C6AB2BE22142"?>
        <?define cmp_SDK_Lib_Afs_guid="CD671A64-D491-4363-A7AD-645482B481BE"?>
+       <?define cmp_SDK_Lib_Cygwin_guid="EA2FC9C5-2001-41F7-9220-A5C63B2C523D"?>
+       <?define cmp_SDK_Lib_Afs_Cygwin_guid="F342A346-E149-47A2-9206-5B51EED7E689"?>
        <?define cmf_vlserver_EXE_guid="F6A43B78-EE17-4483-AA81-4B6C6957977D"?>
        <?define cmf_volinfo_EXE_guid="CED56F48-1049-403F-912B-3C186867B563"?>
        <?define cmf_volserver_EXE_guid="36A386A0-6DA9-40A7-A12D-6A521559933D"?>
index ab6a9ae..27ada43 100644 (file)
@@ -32,6 +32,7 @@ $(PTHR_DLLFILE): $(PTHR_DLLOBJS)
         $(_VC_MANIFEST_EMBED_DLL)
        $(DLLPREP)
         $(CODESIGN_USERLAND)
+       $(MAKECYGLIB) --input-def pthread.def
 
 install: $(PTHR_DLLFILE) $(LIBINCLUDES)
 
index 49b1c93..1554fbf 100644 (file)
@@ -465,3 +465,13 @@ AFSDEV_AUXMIDLFLAGS=/env x64 /x64 /Oicf
 LEX = flex -l
 YACC = bison
 
+######### Create Cygwin .a files
+# This macro should be invoked as a build step for a DLL target.
+!IFNDEF NOCYGWIN
+MAKECYGLIB=\
+       for %%C in (as.exe) do \
+       if exist %%~$$PATH:C \
+       dlltool --dllname $(@B).dll --output-lib $(@R).a --temp-prefix $(OUT) -S %%~$$PATH:C
+!ELSE
+MAKECYGLIB=echo Skipping Cygwin archive
+!ENDIF
index a22bad6..0433b2c 100644 (file)
@@ -455,3 +455,13 @@ AFSDEV_AUXMIDLFLAGS=$(AFSDEV_AUXMIDLFLAGS) /Oi
 LEX = flex -l
 YACC = bison
 
+######### Create Cygwin .a files
+# This macro should be invoked as a build step for a DLL target.
+!IFNDEF NOCYGWIN
+MAKECYGLIB=\
+       for %%C in (as.exe) do \
+       if exist %%~$$PATH:C \
+       dlltool --dllname $(@B).dll --output-lib $(@R).a --temp-prefix $(OUT) -S %%~$$PATH:C
+!ELSE
+MAKECYGLIB=echo Skipping Cygwin archive
+!ENDIF
index 61b6dc9..cc02f87 100644 (file)
@@ -482,3 +482,14 @@ AFSDEV_AUXMIDLFLAGS=/env win32 /win32 /no_robust /Oicf
 LEX = flex -l
 YACC = bison
 
+
+######### Create Cygwin .a files
+# This macro should be invoked as a build step for a DLL target.
+!IFNDEF NOCYGWIN
+MAKECYGLIB=\
+       for %%C in (as.exe) do \
+       if exist %%~$$PATH:C \
+       dlltool --dllname $(@B).dll --output-lib $(@R).a --temp-prefix $(OUT) -S %%~$$PATH:C
+!ELSE
+MAKECYGLIB=echo Skipping Cygwin archive
+!ENDIF
index d6b085e..7f75448 100644 (file)
@@ -147,6 +147,7 @@ $(DLLFILE): $(DLLOBJS) $(DLLLIBS)
         $(_VC_MANIFEST_EMBED_DLL)
        $(DLLPREP)
         $(CODESIGN_USERLAND)
+       $(MAKECYGLIB) --input-def afsadminutil.def
        $(COPY) $*.lib $(ILIBDIR)
        $(DEL) $*.lib $*.exp
 
index d3e9d06..1610a2e 100644 (file)
@@ -46,6 +46,7 @@ $(DLLFILE): $(DLLOBJS) $(DLLLIBS)
         $(_VC_MANIFEST_EMBED_DLL)
        $(DLLPREP)
         $(CODESIGN_USERLAND)
+       $(MAKECYGLIB) --input-def bosadmin.def
        $(COPY) $*.lib $(ILIBDIR)
        $(DEL) $*.lib $*.exp
 
index 0867464..4fd146d 100644 (file)
@@ -63,6 +63,7 @@ $(DLLFILE): $(DLLOBJS) $(DLLLIBS)
         $(_VC_MANIFEST_EMBED_DLL)
        $(DLLPREP)
         $(CODESIGN_USERLAND)
+       $(MAKECYGLIB) --input-def afscfgadmin.def
        $(COPY) $*.lib $(ILIBDIR)
        $(DEL) $*.lib $*.exp
 
index 2a7f0fd..3008eeb 100644 (file)
@@ -34,6 +34,7 @@ $(DLLFILE): $(DLLOBJS) $(DLLLIBS)
         $(_VC_MANIFEST_EMBED_DLL)
        $(DLLPREP)
         $(CODESIGN_USERLAND)
+       $(MAKECYGLIB) --input-def clientadmin.def
        $(COPY) $*.lib $(ILIBDIR)
        $(DEL) $*.lib $*.exp
 
index e138b6d..8419e88 100644 (file)
@@ -43,6 +43,7 @@ $(DLLFILE): $(DLLOBJS) $(DLLLIBS)
         $(_VC_MANIFEST_EMBED_DLL)
        $(DLLPREP)
         $(CODESIGN_USERLAND)
+       $(MAKECYGLIB) --input-def kasadmin.def
        $(COPY) $*.lib $(ILIBDIR)
        $(DEL) $*.lib $*.exp
 
index 1459860..1db68b0 100644 (file)
@@ -46,6 +46,7 @@ $(DLLFILE): $(DLLOBJS) $(DLLLIBS)
         $(_VC_MANIFEST_EMBED_DLL)
        $(DLLPREP)
         $(CODESIGN_USERLAND)
+       $(MAKECYGLIB) --input-def ptsadmin.def
        $(COPY) $*.lib $(ILIBDIR)
        $(DEL) $*.lib $*.exp
 
index 28bf596..e1e1dfa 100644 (file)
@@ -67,6 +67,7 @@ $(DLLFILE): $(DLLOBJS) $(DLLLIBS)
         $(_VC_MANIFEST_EMBED_DLL)
        $(DLLPREP)
         $(CODESIGN_USERLAND)
+       $(MAKECYGLIB) --input-def vosadmin.def
        $(COPY) $*.lib $(ILIBDIR)
        $(DEL) $*.lib $*.exp
 
index 576e1ce..f4f8fcc 100644 (file)
@@ -149,6 +149,7 @@ $(LIBFILE): $(DLLOBJS) $(DLLLIBS) $(RXOBJS)
         $(_VC_MANIFEST_EMBED_DLL)
        $(DLLPREP)
         $(CODESIGN_USERLAND)
+       $(MAKECYGLIB) --input-def afsauthent.def
 
 # Definitions for generating versioninfo resources
 $(OUT)\afsauthent.res: AFS_component_version_number.h
index 2e59483..7cb09b0 100644 (file)
@@ -108,8 +108,8 @@ EXPORTS
         PR_UpdateEntry                                 @106
         PR_ListEntries                                 @107
         PR_ListSuperGroups                             @108
-       ka_AuthSpecificServersConn                      @109
-       ka_KeyCheckSum                                  @110
+;      ka_AuthSpecificServersConn                      @109   /* duplicate */
+;      ka_KeyCheckSum                                  @110   /* duplicate */
        rx_Finalize                                     @111
        rx_InitHost                                     @112
        VOTE_GetSyncSite                                @113
index b3a1609..6491bb0 100644 (file)
@@ -99,6 +99,7 @@ $(LIBFILE): $(DLLOBJS) $(DLLLIBS)
         $(_VC_MANIFEST_EMBED_DLL)
        $(DLLPREP)
         $(CODESIGN_USERLAND)
+       $(MAKECYGLIB) --input-def afsrpc.def
 
 # Definitions for generating versioninfo resources
 $(OUT)\afsrpc.res: AFS_component_version_number.h
index 1bab98d..c1571e5 100644 (file)
@@ -38,6 +38,7 @@ $(DLLFILE): $(DLLOBJS) $(DLLRES) $(DLLLIBS)
         $(_VC_MANIFEST_EMBED_DLL)
        $(DLLPREP)
         $(CODESIGN_USERLAND)
+       $(MAKECYGLIB) --input-def afsprocmgmt.def
        $(COPY) $*.lib $(ILIBDIR)
        $(DEL) $*.lib $*.exp