PLEASE no attachment PLAIN TEXT only with patch inline.

Added WIN32_LEAN_AND_MEAN and please notice that
resource is missing.

On 4/8/08, Douglas E. Engert <[EMAIL PROTECTED]> wrote:
>
>
>  Alon Bar-Lev wrote:
>
>
> > 2. libp11, engine_pkcs11 should also be fixed... :)
> >
>
>  Here they are. This email has libp11 changes.  The next email will have
>  the engine_pkcs11.
>
>  The changes are inline as you asked. Watch out for wrapped lines and
>  spacing. (I attached the changes too, just in case.)
>
>
>   added top Makefile.mak to handle winconfig.h
>
>   updated src/Makefile.mak to include config.h and use libp11.exports
>         take care of manifest.
>
>   remove makedef.pl
>
>   added winconfig.h  with nothing in it for now.
>
>
>  Index: Makefile.mak
> ===================================================================
>  --- Makefile.mak        (revision 0)
>  +++ Makefile.mak        (revision 0)
>  @@ -0,0 +1,13 @@
>  +
>  +SUBDIRS = src
>  +
>  +all::
>  +
>  +all:: config.h
>  +
>  +config.h: winconfig.h
>  +       @copy /y winconfig.h config.h
>  +
>  +all depend install clean::
>  +        @for %i in ( $(SUBDIRS) ) do \
>  +               @cmd /c "cd %i && $(MAKE) /nologo /f Makefile.mak $@"
>  Index: src/Makefile.mak
> ===================================================================
>  --- src/Makefile.mak    (revision 143)
>  +++ src/Makefile.mak    (working copy)
>  @@ -4,7 +4,7 @@
>   OPENSSL_INC = /IC:\openssl\include
>   OPENSSL_LIB = C:\openssl\out32dll\libeay32.lib
>
>  -COPTS = /Zi /MD /nologo /I. $(OPENSSL_INC) $(LIBLTDL_INC)
> /D_WIN32_WINNT=0x0400 /DWIN32
>  +COPTS = /Zi /MD /nologo /I..\ /I. $(OPENSSL_INC) $(LIBLTDL_INC)
> /D_WIN32_WINNT=0x0400 /DWIN32
>   LINKFLAGS = /DEBUG /NOLOGO /INCREMENTAL:NO /MACHINE:IX86
>
>   TARGET                  = libp11.dll
>  @@ -18,6 +18,10 @@
>         cl $(COPTS) /c $<
>
>   $(TARGET): $(OBJECTS)
>  -       perl makedef.pl $*.def $* $(OBJECTS)
>  +       echo LIBRARY $* > $*.def
>  +       echo EXPORTS >> $*.def
>  +       type $*.exports >> $*.def
>         link $(LINKFLAGS) /dll /def:$*.def /implib:$*.lib /out:$(TARGET) \
>                 $(OBJECTS) $(OPENSSL_LIB) $(LIBLTDL_LIB)
>  +       if EXIST $*.dll.manifest mt -manifest $*.dll.manifest
> -outputresource:$*.dll;2
>  +
>  Index: src/makedef.pl
> ===================================================================
>  --- src/makedef.pl      (revision 143)
>  +++ src/makedef.pl      (working copy)
>  @@ -1,35 +0,0 @@
>  -$def = $ARGV[0];
>  -shift @ARGV;
>  -$lib = $ARGV[0];
>  -shift @ARGV;
>  -$dumpbin = "dumpbin /symbols @ARGV";
>  -
>  -open(DUMP, "$dumpbin |")
>  -    || die "Can't run `$dumpbin': $!.\n";
>  -
>  -open(DEF, "> $def")
>  -    || die "Can't open `$def': $!.\n";
>  -
>  -print DEF "LIBRARY $lib\n";
>  -print DEF "EXPORTS\n";
>  -
>  -while(<DUMP>)
>  -{
>  -    if(!/\bUNDEF\b/ && /\bExternal\b/)
>  -    {
>  -       s/^.*\|\s+//;
>  -       split;
>  -       $_ = $_[0];
>  -
>  -       next unless ($_ =~ /PKCS11/);
>  -
>  -       if(!/^\?\?_G/ && !/^\?\?_E/ && !/DllMain/)
>  -        {
>  -            # Stupid windows linker needs to have
>  -            # preceding underscore for ANSI C programs
>  -            s/^_//;
>  -
>  -            print DEF "    $_\n";
>  -       }
>  -    }
>  -}
>  Index: winconfig.h
> ===================================================================
>  --- winconfig.h (revision 0)
>  +++ winconfig.h (revision 0)
>  @@ -0,0 +1 @@
>  +/* nothing for now */
>
>
>  --
>
>   Douglas E. Engert  <[EMAIL PROTECTED]>
>   Argonne National Laboratory
>   9700 South Cass Avenue
>   Argonne, Illinois  60439
>   (630) 252-5444
>
> Index: Makefile.mak
> ===================================================================
>  --- Makefile.mak        (revision 0)
>  +++ Makefile.mak        (revision 0)
>  @@ -0,0 +1,13 @@
>  +
>  +SUBDIRS = src
>  +
>  +all::
>  +
>  +all:: config.h
>  +
>  +config.h: winconfig.h
>  +       @copy /y winconfig.h config.h
>  +
>  +all depend install clean::
>  +        @for %i in ( $(SUBDIRS) ) do \
>  +               @cmd /c "cd %i && $(MAKE) /nologo /f Makefile.mak $@"
>  Index: src/Makefile.mak
> ===================================================================
>  --- src/Makefile.mak    (revision 143)
>  +++ src/Makefile.mak    (working copy)
>  @@ -4,7 +4,7 @@
>   OPENSSL_INC = /IC:\openssl\include
>   OPENSSL_LIB = C:\openssl\out32dll\libeay32.lib
>
>  -COPTS = /Zi /MD /nologo /I. $(OPENSSL_INC) $(LIBLTDL_INC)
> /D_WIN32_WINNT=0x0400 /DWIN32
>  +COPTS = /Zi /MD /nologo /I..\ /I. $(OPENSSL_INC) $(LIBLTDL_INC)
> /D_WIN32_WINNT=0x0400 /DWIN32
>   LINKFLAGS = /DEBUG /NOLOGO /INCREMENTAL:NO /MACHINE:IX86
>
>   TARGET                  = libp11.dll
>  @@ -18,6 +18,10 @@
>         cl $(COPTS) /c $<
>
>   $(TARGET): $(OBJECTS)
>  -       perl makedef.pl $*.def $* $(OBJECTS)
>  +       echo LIBRARY $* > $*.def
>  +       echo EXPORTS >> $*.def
>  +       type $*.exports >> $*.def
>         link $(LINKFLAGS) /dll /def:$*.def /implib:$*.lib /out:$(TARGET) \
>                 $(OBJECTS) $(OPENSSL_LIB) $(LIBLTDL_LIB)
>  +       if EXIST $*.dll.manifest mt -manifest $*.dll.manifest
> -outputresource:$*.dll;2
>  +
>  Index: src/makedef.pl
> ===================================================================
>  --- src/makedef.pl      (revision 143)
>  +++ src/makedef.pl      (working copy)
>  @@ -1,35 +0,0 @@
>  -$def = $ARGV[0];
>  -shift @ARGV;
>  -$lib = $ARGV[0];
>  -shift @ARGV;
>  -$dumpbin = "dumpbin /symbols @ARGV";
>  -
>  -open(DUMP, "$dumpbin |")
>  -    || die "Can't run `$dumpbin': $!.\n";
>  -
>  -open(DEF, "> $def")
>  -    || die "Can't open `$def': $!.\n";
>  -
>  -print DEF "LIBRARY $lib\n";
>  -print DEF "EXPORTS\n";
>  -
>  -while(<DUMP>)
>  -{
>  -    if(!/\bUNDEF\b/ && /\bExternal\b/)
>  -    {
>  -       s/^.*\|\s+//;
>  -       split;
>  -       $_ = $_[0];
>  -
>  -       next unless ($_ =~ /PKCS11/);
>  -
>  -       if(!/^\?\?_G/ && !/^\?\?_E/ && !/DllMain/)
>  -        {
>  -            # Stupid windows linker needs to have
>  -            # preceding underscore for ANSI C programs
>  -            s/^_//;
>  -
>  -            print DEF "    $_\n";
>  -       }
>  -    }
>  -}
>  Index: winconfig.h
> ===================================================================
>  --- winconfig.h (revision 0)
>  +++ winconfig.h (revision 0)
>  @@ -0,0 +1 @@
>  +/* nothing for now */
>
>
_______________________________________________
opensc-devel mailing list
[email protected]
http://www.opensc-project.org/mailman/listinfo/opensc-devel

Reply via email to