XFree 4.2.1 + fontconfig-2
Harold L Hunt II
huntharo@msu.edu
Tue Sep 24 14:13:00 GMT 2002
If it builds then I approve and Alan should commit this directly.
Harold
Alexander Gottwald wrote:
> Nicholas Wourms wrote:
>
>
>>final outcome:
>>--------------
>>/usr/X11R6/bin/cygXfoo.0.0.dll
>>/usr/X11R6/lib/libXfoo.0.0.dll.a
>>/usr/X11R6/lib/libXfoo.0.dll.a
>>/usr/X11R6/lib/libXfoo.dll.a
>>/usr/X11R6/lib/libXfoo.a
>
>
> Attached a patch which tweaks the makefile to build
>
> lib$(NAME)-$(MAJOR).dll
> lib$(NAME)-$(MAJOR).a
> lib$(NAME).a -> lib$(NAME)-$(MAJOR).a
>
> for Xft1 and Xft2 its
> exports/bin/libXft-1.dll
> exports/bin/libXft-2.dll
> exports/lib/libXft-1.a -> ../../lib/Xft1/libXft-1.a
> exports/lib/libXft-2.a -> ../../lib/Xft/libXft-2.a
> exports/lib/libXft.a -> libXft-2.a
>
> tweaking it to use cyg*.dll is simple
>
> I also change the widely spreaded concat3(lib,libname,.dll) to one macro
> (SharedLibraryName, libFoo-X.dll)
> The other new macro is ImportLibraryName, which is libFoo-X.a
> LibraryTargetName is still libFoo.a
>
> And the is the rule LinkImportLibrary which links ImportLibraryName to
> LibraryTargetName.
>
> bye
> ago
>
>
> ------------------------------------------------------------------------
>
> Index: cygwin.rules
> ===================================================================
> RCS file: /cvs/xc/config/cf/cygwin.rules,v
> retrieving revision 3.19
> diff -u -r3.19 cygwin.rules
> --- cygwin.rules 2002/04/15 09:22:33 3.19
> +++ cygwin.rules 2002/09/24 20:53:19
> @@ -52,7 +52,10 @@
> #define UseExportLists YES
> #endif
>
> +#define SharedLibraryName(libname, rev) Concat3(lib,libname,-$(shell echo rev|sed s=\\..*==).dll)
>
> +#define ImportLibraryName(libname, rev) Concat3(lib,libname,-$(shell echo rev|sed s=\\..*==).a)
> +
> /*
> * SharedDepLibraryTarget - generate rules to create a shared library.
> */
> @@ -75,22 +78,23 @@
> */
>
> #define SharedDepLibraryTarget(libname,rev,deplist,solist,down,up) @@\
> -AllTarget(Concat3(lib,libname,.dll)) @@\
> +AllTarget(SharedLibraryName(libname,rev)) @@\
> @@\
> CppFileTarget(libname.def,libname-def.cpp,-DLIBRARY_VERSION=rev,$(ICONFIGFILES)) @@\
> @@\
> @@\
> @@\
> -Concat3(lib,libname,.dll): deplist libname.def @@\
> - RemoveFile(LibraryTargetName(libname)) @@\
> - RemoveFile(Concat3(lib,libname,.dll)) @@\
> - MakeDLL(libname,solist) @@\
> - LinkBuildLibrary(Concat3(lib,libname,.a)) @@\
> - LinkBuildDLL(Concat3(lib,libname,.dll)) @@\
> +SharedLibraryName(libname,rev): deplist libname.def @@\
> + RemoveFile(ImportLibraryName(libname,rev)) @@\
> + RemoveFile(SharedLibraryName(libname,rev)) @@\
> + MakeDLL(libname,solist,rev) @@\
> + LinkBuildLibrary(ImportLibraryName(libname,rev)) @@\
> + LinkImportLibrary(ImportLibraryName(libname,rev),LibraryTargetName(libname)) @@\
> + LinkBuildDLL(SharedLibraryName(libname,rev)) @@\
> @@\
> clean:: @@\
> - RemoveFile(LibraryTargetName(libname)) @@\
> - RemoveFile(Concat3(lib,libname,.dll)) @@\
> + RemoveFile(ImportLibraryName(libname,rev)) @@\
> + RemoveFile(SharedLibraryName(libname,rev)) @@\
>
> #endif /* SharedDepLibraryTarget */
>
> @@ -116,22 +120,23 @@
> */
>
> #define SharedDepCplusplusLibraryTarget(libname,rev,deplist,solist,down,up) @@\
> -AllTarget(Concat3(lib,libname,.dll)) @@\
> +AllTarget(SharedLibraryName(libname,rev)) @@\
> @@\
> CppFileTarget(libname.def,libname-def.cpp,-DLIBRARY_VERSION=rev,$(ICONFIGFILES)) @@\
> @@\
> @@\
> - @@\
> -Concat3(lib,libname,.dll): deplist libname.def @@\
> - RemoveFile(LibraryTargetName(libname)) @@\
> - RemoveFile(Concat3(lib,libname,.dll)) @@\
> - MakeCplusplusDLL(libname,solist) @@\
> - LinkBuildLibrary(Concat3(lib,libname,.a)) @@\
> - LinkBuildDLL(Concat3(lib,libname,.dll)) @@\
> @@\
> -clean:: @@\
> - RemoveFile(LibraryTargetName(libname)) @@\
> - RemoveFile(Concat3(lib,libname,.dll)) @@\
> +SharedLibraryName(libname,rev): deplist libname.def @@\
> + RemoveFile(ImportLibraryName(libname,rev)) @@\
> + RemoveFile(SharedLibraryName(libname,rev)) @@\
> + MakeCplusplusDLL(libname,solist,rev) @@\
> + LinkBuildLibrary(ImportLibraryName(libname,rev)) @@\
> + LinkImportLibrary(ImportLibraryName(libname,rev),LibraryTargetName(libname)) @@\
> + LinkBuildDLL(SharedLibraryName(libname,rev)) @@\
> + @@\
> +clean:: @@\
> + RemoveFile(ImportLibraryName(libname,rev)) @@\
> + RemoveFile(SharedLibraryName(libname,rev)) @@\
>
> #endif /* SharedDepCplusplusLibraryTarget */
>
> @@ -173,22 +178,22 @@
> * MakeDllProg
> */
>
> -#define MakeDLLProg(libname,solist,prog) @@\
> - prog -shared -Wl,--out-implib=Concat3(lib,libname,.a) -Wl,--enable-auto-import --def libname.def -o Concat3(lib,libname,.dll) solist $(REQUIREDLIBS)
> +#define MakeDLLProg(libname,solist,prog,rev) @@\
> + prog -shared -Wl,--out-implib=ImportLibraryName(libname,rev) -Wl,--enable-auto-import --def libname.def -o SharedLibraryName(libname,rev) solist $(REQUIREDLIBS)
>
> /*
> * MakeDll
> */
>
> -#define MakeDLL(libname,solist) @@\
> - MakeDLLProg(libname,solist,$(CC))
> +#define MakeDLL(libname,solist,rev) @@\
> + MakeDLLProg(libname,solist,$(CC),rev)
>
> /*
> * MakeCplusplusDll
> */
>
> -#define MakeCplusplusDLL(libname,solist) @@\
> - MakeDLLProg(libname,solist,$(CXX))
> +#define MakeCplusplusDLL(libname,solist,rev) @@\
> + MakeDLLProg(libname,solist,$(CXX),rev)
>
>
>
> @@ -197,20 +202,21 @@
> */
>
> #define SharedLibraryTarget(libname,rev,solist,down,up) @@\
> -AllTarget(Concat3(lib,libname,.dll)) @@\
> +AllTarget(SharedLibraryName(libname,rev)) @@\
> @@\
> CppFileTarget(libname.def,libname-def.cpp,-DLIBRARY_VERSION=rev,$(ICONFIGFILES)) @@\
> @@\
> @@\
> -Concat3(lib,libname,.dll): solist libname.def @@\
> - RemoveFile(LibraryTargetName(libname)) @@\
> - RemoveFile(Concat3(lib,libname,.dll)) @@\
> - MakeDLL(libname,solist) @@\
> - LinkBuildLibrary(Concat3(lib,libname,.a)) @@\
> - LinkBuildDLL(Concat3(lib,libname,.dll)) @@\
> -clean:: @@\
> - RemoveFile(LibraryTargetName(libname)) @@\
> - RemoveFile(Concat3(lib,libname,.dll)) @@\
> +SharedLibraryName(libname,rev): solist libname.def @@\
> + RemoveFile(ImportLibraryName(libname,rev)) @@\
> + RemoveFile(SharedLibraryName(libname,rev)) @@\
> + MakeDLL(libname,solist,rev) @@\
> + LinkBuildLibrary(ImportLibraryName(libname,rev)) @@\
> + LinkImportLibrary(ImportLibraryName(libname,rev),LibraryTargetName(libname)) @@\
> + LinkBuildDLL(SharedLibraryName(libname,rev)) @@\
> +clean:: @@\
> + RemoveFile(ImportLibraryName(libname,rev)) @@\
> + RemoveFile(SharedLibraryName(libname,rev)) @@\
>
>
> /*
> @@ -219,7 +225,7 @@
>
> #define InstallSharedLibrary(libname,rev,dest) @@\
> InstallTarget(install,LibraryTargetName(libname),$(INSTLIBFLAGS),$(USRLIBDIR)) @@\
> -InstallTarget(install,Concat3(lib,libname,.dll),$(INSTLIBFLAGS),$(BINDIR))
> +InstallTarget(install,SharedLibraryName(libname,rev),$(INSTLIBFLAGS),$(BINDIR))
>
>
> /*
> @@ -263,6 +269,16 @@
> RemoveFile($(BUILDBINDIR)/lib) @@\
> cd $(BUILDBINDIR) && $(CP) $(BUILDBINTOP)/$(CURRENT_DIR)/lib .
> #endif
> +
> +#ifndef LinkImportLibrary
> +#ifdef UseInstalled
> +#define LinkImportLibrary(lib, importlib) $(_NULLCMD_)
> +#else
> +#define LinkImportLibrary(lib, importlib) MakeDir($(BUILDLIBDIR)) @@\
> + RemoveFile($(BUILDLIBDIR)/importlib) @@\
> + cd $(BUILDLIBDIR) && $(LN) lib importlib
> +#endif
> +#endif /* LinkImportLibrary */
>
>
> /*
More information about the Cygwin-xfree
mailing list