PATCH: Static compilation of libopensc on Windows

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

PATCH: Static compilation of libopensc on Windows

Joachim Bauch
Hi!

Using the attached patch, you can compile a static version of libopensc on
Windows.  It would be great if this could be included in the next version.

Greetings,
  Joachim

--
Joachim Bauch, struktur AG
Download icoya OpenContent GPL for FREE!       visit http://dl.struktur.de/ <-

--- src/libopensc/Makefile.mak.orig 2005-09-20 11:22:10.831623000 +0200
+++ src/libopensc/Makefile.mak 2005-09-20 11:17:14.592089400 +0200
@@ -40,3 +40,7 @@
 $(TARGET): $(OBJECTS) ..\scconf\scconf.lib ..\scdl\scdl.lib ..\common\common.lib
  perl $(TOPDIR)\win32\makedef.pl $*.def $* $(OBJECTS)
  link $(LINKFLAGS) /dll /def:$*.def /implib:$*.lib /out:$(TARGET) $(OBJECTS) ..\scconf\scconf.lib ..\scdl\scdl.lib ..\common\common.lib winscard.lib
+
+opensc_a.lib: $(OBJECTS) ..\scconf\scconf.lib ..\scdl\scdl.lib ..\common\common.lib
+ perl $(TOPDIR)\win32\makedef.pl $*.def $* $(OBJECTS)
+    lib $(LIBFLAGS) /out:opensc_a.lib $(OBJECTS) ..\scconf\scconf.lib ..\scdl\scdl.lib ..\common\common.lib winscard.lib

_______________________________________________
opensc-devel mailing list
[hidden email]
http://www.opensc.org/cgi-bin/mailman/listinfo/opensc-devel

signature.asc (262 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: PATCH: Static compilation of libopensc on Windows

Joachim Bauch
Hi again,

Joachim Bauch wrote:
> Using the attached patch, you can compile a static version of libopensc on
> Windows.  It would be great if this could be included in the next version.

sorry, the attachment of my previous mail was actually an incomplete version of
the patch.  Attached is the fixed version.

Greetings,
  Joachim

--
Joachim Bauch, struktur AG
Download icoya OpenContent GPL for FREE!       visit http://dl.struktur.de/ <-

--- src/libopensc/Makefile.mak.orig 2005-09-20 11:22:10.831623000 +0200
+++ src/libopensc/Makefile.mak 2005-09-20 11:26:47.682919300 +0200
@@ -33,10 +33,14 @@
  \
  $(TOPDIR)\win32\version.res
 
-all: install-headers $(TARGET)
+all: install-headers $(TARGET) opensc_a.lib
 
 !INCLUDE $(TOPDIR)\win32\Make.rules.mak
 
 $(TARGET): $(OBJECTS) ..\scconf\scconf.lib ..\scdl\scdl.lib ..\common\common.lib
  perl $(TOPDIR)\win32\makedef.pl $*.def $* $(OBJECTS)
  link $(LINKFLAGS) /dll /def:$*.def /implib:$*.lib /out:$(TARGET) $(OBJECTS) ..\scconf\scconf.lib ..\scdl\scdl.lib ..\common\common.lib winscard.lib
+
+opensc_a.lib: $(OBJECTS) ..\scconf\scconf.lib ..\scdl\scdl.lib ..\common\common.lib
+ perl $(TOPDIR)\win32\makedef.pl $*.def $* $(OBJECTS)
+    lib $(LIBFLAGS) /out:opensc_a.lib $(OBJECTS) ..\scconf\scconf.lib ..\scdl\scdl.lib ..\common\common.lib winscard.lib

_______________________________________________
opensc-devel mailing list
[hidden email]
http://www.opensc.org/cgi-bin/mailman/listinfo/opensc-devel

signature.asc (262 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Re: PATCH: Static compilation of libopensc on Windows

Andreas Jellinghaus-2
Hi Joachim,

could you send in a new patch against opensc svn trunk?
that patch mentions scdl, which does no longer exist,
so it won't apply to trunk at all.

also, if you want static libs, wouldn't it be best to
create static libs for scconf, opensc and pkcs15init?
maybe even opensc-pkcs11?

Thanks, Andreas
_______________________________________________
opensc-devel mailing list
[hidden email]
http://www.opensc.org/cgi-bin/mailman/listinfo/opensc-devel
Reply | Threaded
Open this post in threaded view
|

Re: PATCH: Static compilation of libopensc on Windows

Stef Hoeben-2
In reply to this post by Joachim Bauch
Hi Joachim,

> Hi!
>
> Using the attached patch, you can compile a static version of libopensc on
> Windows.  It would be great if this could be included in the next version.
>
> Greetings,
>  Joachim

the problem with the static lib is that you blows up the size
of your binaries.

Could you maybe make it an option in the makefile(s)?
So you e.g. do  "nmake /f Makefile.mak staticlibs".

Cheers,
Stef


_______________________________________________
opensc-devel mailing list
[hidden email]
http://www.opensc.org/cgi-bin/mailman/listinfo/opensc-devel