Permalink
Browse files

Merge remote-tracking branch 'viktor/master' into proposed

  • Loading branch information...
2 parents dcf9a8e + 2ffa346 commit 78adc76da3914af9bbaab369dde3d704a523fd2f @martinpaljak martinpaljak committed Jun 28, 2011
Showing with 13 additions and 17 deletions.
  1. +1 −1 src/minidriver/Makefile.mak
  2. +4 −12 src/pkcs11/Makefile.mak
  3. +5 −1 win32/Make.rules.mak
  4. +3 −3 win32/OpenSC.wxs.in
@@ -11,5 +11,5 @@ $(TARGET): $(OBJECTS)
echo LIBRARY $* > $*.def
echo EXPORTS >> $*.def
type minidriver.exports >> $*.def
- link /dll $(LINKFLAGS) /def:$*.def /out:$(TARGET) $(OBJECTS) ..\libopensc\opensc.lib $(ZLIB_LIB) $(OPENSSL_LIB) ..\common\libscdl.lib ws2_32.lib gdi32.lib advapi32.lib Crypt32.lib User32.lib
+ link /dll $(LINKFLAGS) /def:$*.def /out:$(TARGET) $(OBJECTS) ..\libopensc\opensc_a.lib $(ZLIB_LIB) $(OPENSSL_LIB) ..\common\libscdl.lib ws2_32.lib gdi32.lib advapi32.lib Crypt32.lib User32.lib
if EXIST $(TARGET).manifest mt -manifest $(TARGET).manifest -outputresource:$(TARGET);2
@@ -1,8 +1,7 @@
TOPDIR = ..\..
TARGET0 = onepin-opensc-pkcs11.dll
-TARGET = opensc-pkcs11.dll
-TARGET1 = opensc-pkcs11-static.dll
+TARGET1 = opensc-pkcs11.dll
TARGET3 = pkcs11-spy.dll
OBJECTS = pkcs11-global.obj pkcs11-session.obj pkcs11-object.obj misc.obj slot.obj \
@@ -12,24 +11,17 @@ OBJECTS = pkcs11-global.obj pkcs11-session.obj pkcs11-object.obj misc.obj slot
OBJECTS3 = pkcs11-spy.obj pkcs11-display.obj \
$(TOPDIR)\win32\versioninfo.res
-all: $(TOPDIR)\win32\versioninfo.res $(TARGET0) $(TARGET) $(TARGET1) $(TARGET3)
+all: $(TOPDIR)\win32\versioninfo.res $(TARGET0) $(TARGET1) $(TARGET3)
!INCLUDE $(TOPDIR)\win32\Make.rules.mak
-$(TARGET0): $(OBJECTS) hack-enabled.obj ..\libopensc\opensc.lib ..\scconf\scconf.lib ..\pkcs15init\pkcs15init.lib ..\common\common.lib
+$(TARGET0): $(OBJECTS) hack-enabled.obj ..\libopensc\opensc_a.lib ..\pkcs15init\pkcs15init.lib
echo LIBRARY $* > $*.def
echo EXPORTS >> $*.def
type opensc-pkcs11.exports >> $*.def
- link $(LINKFLAGS) /dll /def:$*.def /implib:$*.lib /out:$(TARGET0) $(OBJECTS) hack-enabled.obj ..\libopensc\opensc.lib ..\scconf\scconf.lib ..\pkcs15init\pkcs15init.lib ..\common\common.lib $(OPENSSL_LIB) gdi32.lib
+ link $(LINKFLAGS) /dll /def:$*.def /implib:$*.lib /out:$(TARGET0) $(OBJECTS) hack-enabled.obj ..\libopensc\opensc_a.lib ..\pkcs15init\pkcs15init.lib $(OPENSSL_LIB) gdi32.lib
if EXIST $(TARGET0).manifest mt -manifest $(TARGET0).manifest -outputresource:$(TARGET0);2
-$(TARGET): $(OBJECTS) hack-disabled.obj ..\libopensc\opensc.lib ..\scconf\scconf.lib ..\pkcs15init\pkcs15init.lib ..\common\common.lib
- echo LIBRARY $* > $*.def
- echo EXPORTS >> $*.def
- type $*.exports >> $*.def
- link $(LINKFLAGS) /dll /def:$*.def /implib:$*.lib /out:$(TARGET) $(OBJECTS) hack-disabled.obj ..\libopensc\opensc.lib ..\scconf\scconf.lib ..\pkcs15init\pkcs15init.lib ..\common\common.lib $(OPENSSL_LIB) gdi32.lib
- if EXIST $(TARGET).manifest mt -manifest $(TARGET).manifest -outputresource:$(TARGET);2
-
$(TARGET1): $(OBJECTS) hack-disabled.obj ..\libopensc\opensc_a.lib ..\pkcs15init\pkcs15init.lib
echo LIBRARY $* > $*.def
echo EXPORTS >> $*.def
@@ -52,6 +52,10 @@ CNGSDK_INCL_DIR = "/IC:\Program Files\Microsoft CNG Development Kit\Include"
# http://msinttypes.googlecode.com/files/msinttypes-r26.zip
# INTTYPES_INCL_DIR = /IC:\opensc\dependencies\msys\local
+# Code optimisation
+# O1 - minimal code size
+CODE_OPTIMIZATION = /O1
+
ALL_INCLUDES = /I$(TOPDIR)\win32 /I$(TOPDIR)\src $(OPENSSL_INCL_DIR) $(ZLIB_INCL_DIR) $(LIBLTDL_INCL) $(INTTYPES_INCL_DIR) $(CNGSDK_INCL_DIR)
COPTS = /W3 /D_CRT_SECURE_NO_DEPRECATE /MT /nologo /DHAVE_CONFIG_H $(ALL_INCLUDES) /D_WIN32_WINNT=0x0502 /DWIN32_LEAN_AND_MEAN $(OPENSSL_DEF) $(ZLIB_DEF) $(MINIDRIVER_DEF) /DOPENSC_FEATURES="\"$(OPENSC_FEATURES)\""
!IF "$(BUILD_FOR)" == "WIN64"
@@ -64,7 +68,7 @@ LIBFLAGS = /nologo /machine:x86
CANDLEFLAGS = -dPlatform=x86
!ENDIF
.c.obj::
- cl $(COPTS) /c $<
+ cl $(CODE_OPTIMIZATION) $(COPTS) /c $<
.rc.res::
rc /l 0x0409 $<
View
@@ -52,9 +52,6 @@
<Component Id="opensc_pkcs11.dll" Guid="*" Win64="$(var.Win64YesNo)">
<File Source="$(var.SOURCE_DIR)\src\pkcs11\opensc-pkcs11.dll" Vital="yes"/>
</Component>
- <Component Id="opensc.dll" Guid="*" Win64="$(var.Win64YesNo)">
- <File Source="$(var.SOURCE_DIR)\src\libopensc\opensc.dll" Vital="yes"/>
- </Component>
<Component Id="opensc_minidriver.dll" Guid="*" Win64="$(var.Win64YesNo)">
<File Source="$(var.SOURCE_DIR)\src\minidriver\opensc-minidriver.dll" Vital="yes"/>
</Component>
@@ -75,6 +72,9 @@
</Component>
<!-- Tools have their own folder -->
<Directory Id="INSTALLDIR_TOOLS" Name="tools">
+ <Component Id="opensc.dll" Guid="*" Win64="$(var.Win64YesNo)">
+ <File Source="$(var.SOURCE_DIR)\src\libopensc\opensc.dll" Vital="yes"/>
+ </Component>
<Component Id="opensc_explorer.exe" Guid="*" Win64="$(var.Win64YesNo)">
<File Source="$(var.SOURCE_DIR)\src\tools\opensc-explorer.exe" Vital="yes"/>
</Component>

0 comments on commit 78adc76

Please sign in to comment.