[pkg-opensc-commit] [libp11] 34/86: Windows build for the merged engine_pkcs11

Eric Dorland eric at moszumanska.debian.org
Sun Jul 24 21:40:20 UTC 2016


This is an automated email from the git hooks/post-receive script.

eric pushed a commit to branch master
in repository libp11.

commit 086c06b331a45530e0caaaf98f6dd4008ffacda0
Author: Michał Trojnara <Michal.Trojnara at stunnel.org>
Date:   Wed Feb 3 16:12:06 2016 +0100

    Windows build for the merged engine_pkcs11
---
 appveyor.yml     |  3 +++
 make.rules.mak   |  2 +-
 src/Makefile.mak | 47 +++++++++++++++++++++++++++++++----------------
 3 files changed, 35 insertions(+), 17 deletions(-)

diff --git a/appveyor.yml b/appveyor.yml
index d454dae..02fb793 100644
--- a/appveyor.yml
+++ b/appveyor.yml
@@ -49,9 +49,12 @@ build_script:
   - nmake /f Makefile.mak %NMAKE_ARCH% %NMAKE_EXTRA%
   - appveyor PushArtifact src\libp11.dll
   - appveyor PushArtifact src\libp11.lib
+  - appveyor PushArtifact src\pkcs11.dll
+  - appveyor PushArtifact src\pkcs11.lib
   - ps: >-
       If ($env:Configuration -Like "*Debug*") {
          Push-AppveyorArtifact src\libp11.pdb
+         Push-AppveyorArtifact src\pkcs11.pdb
       }
 
 cache:
diff --git a/make.rules.mak b/make.rules.mak
index 9bd4f7a..7e3fb5c 100644
--- a/make.rules.mak
+++ b/make.rules.mak
@@ -31,6 +31,6 @@ OPENSSL_LIB = $(OPENSSL_DIR)\lib\VC\static\libeay32MT$(DEBUG_SUFFIX).lib
 
 LIBS = $(OPENSSL_LIB) user32.lib advapi32.lib crypt32.lib gdi32.lib
 
-CLFLAGS =  /nologo /GS /W3 /D_CRT_SECURE_NO_DEPRECATE /MT$(DEBUG_SUFFIX) $(OPENSSL_INC) /D_WIN32_WINNT=0x0502 /DWIN32_LEAN_AND_MEAN $(DEBUG_COMPILE)
+CFLAGS =  /nologo /GS /W3 /D_CRT_SECURE_NO_DEPRECATE /MT$(DEBUG_SUFFIX) $(OPENSSL_INC) /D_WIN32_WINNT=0x0502 /DWIN32_LEAN_AND_MEAN $(DEBUG_COMPILE)
 
 LINKFLAGS = /NOLOGO /INCREMENTAL:NO $(MACHINE) /MANIFEST:NO /NXCOMPAT /DYNAMICBASE $(DEBUG_LINK)
diff --git a/src/Makefile.mak b/src/Makefile.mak
index 1d6bb8f..96e9683 100644
--- a/src/Makefile.mak
+++ b/src/Makefile.mak
@@ -2,26 +2,41 @@ TOPDIR = ..
 
 !INCLUDE $(TOPDIR)\make.rules.mak
 
-TARGET = libp11.dll
-
-OBJECTS = libpkcs11.obj p11_attr.obj p11_cert.obj \
+LIBP11_OBJECTS = libpkcs11.obj p11_attr.obj p11_cert.obj \
 	p11_err.obj p11_key.obj p11_load.obj p11_misc.obj p11_rsa.obj \
 	p11_ec.obj p11_slot.obj p11_ops.obj
+LIBP11_LIB = libp11.lib
+LIBP11_TARGET = libp11.dll
+
+PKCS11_OBJECTS = eng_front.obj eng_back.obj eng_parse.obj
+PKCS11_TARGET = pkcs11.dll
+
+OBJECTS = $(LIBP11_OBJECTS) $(PKCS11_OBJECTS)
+TARGETS = $(LIBP11_TARGET) $(PKCS11_TARGET)
+
+all: $(TARGETS)
 
-all: $(TARGET) libp11.res
+clean:
+	del $(OBJECTS) $(TARGETS) *.lib *.exp *.def *.res
 
-RSC_PROJ=/l 0x809 /r /fo"libp11.res"
+.rc.res:
+	rc /r /fo$@ $<
 
-libp11.res: libp11.rc
-	rc $(RSC_PROJ) libp11.rc
- 
-.c.obj::
-	cl $(CLFLAGS) /c $<
+.exports.def:
+	echo LIBRARY $* > $@
+	echo EXPORTS >> $@
+	type $< >> $@
 
-$(TARGET): $(OBJECTS) libp11.res
-	echo LIBRARY $* > $*.def
-	echo EXPORTS >> $*.def
-	type $*.exports >> $*.def
-	link $(LINKFLAGS) /dll /def:$*.def /implib:$*.lib /out:$(TARGET) \
-		$(OBJECTS) $(LIBS) libp11.res
+$(LIBP11_LIB): $(LIBP11_TARGET)
+
+$(LIBP11_TARGET): $(LIBP11_OBJECTS) $*.def $*.res
+	link $(LINKFLAGS) /dll /def:$*.def /implib:$*.lib /out:$@ \
+		$(LIBP11_OBJECTS) $(LIBS) $*.res
+	if EXIST $*.dll.manifest mt -manifest $*.dll.manifest -outputresource:$*.dll;2
+
+$(PKCS11_TARGET): $(PKCS11_OBJECTS) $(LIBP11_LIB) $*.def $*.res
+	link $(LINKFLAGS) /dll /def:$*.def /implib:$*.lib /out:$@ \
+		$(PKCS11_OBJECTS) $(LIBP11_LIB) $(LIBS) $*.res
 	if EXIST $*.dll.manifest mt -manifest $*.dll.manifest -outputresource:$*.dll;2
+
+.SUFFIXES: .exports

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-opensc/libp11.git



More information about the pkg-opensc-commit mailing list