2008-04-07 21:28:37 +00:00
|
|
|
OPENSC_FEATURES = pcsc
|
|
|
|
|
2011-04-12 07:40:12 +00:00
|
|
|
#Include support for minidriver
|
|
|
|
MINIDRIVER_DEF = /DENABLE_MINIDRIVER
|
2010-12-06 15:47:03 +00:00
|
|
|
|
2015-09-11 08:55:34 +00:00
|
|
|
#Build MSI with the Windows Installer XML (WIX) toolkit, requires WIX >= 3.9
|
2017-05-31 14:31:43 +00:00
|
|
|
!IF "$(WIX)" == ""
|
|
|
|
# at least WiX 3.11 sets the WIX environment variable to its path
|
2017-05-31 14:43:15 +00:00
|
|
|
WIX = C:\Program Files\WiX Toolset v3.10
|
2017-05-31 14:31:43 +00:00
|
|
|
!ENDIF
|
2017-05-31 14:43:15 +00:00
|
|
|
!IF "$(DEVENVDIR)" == "C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\IDE\" || "$(DEVENVDIR)" == "C:\Program Files\Microsoft Visual Studio 10.0\Common7\IDE\"
|
2017-05-31 14:31:43 +00:00
|
|
|
WIXVSVER = VS2010
|
|
|
|
!ENDIF
|
|
|
|
!IF "$(VISUALSTUDIOVERSION)" == "12.0"
|
|
|
|
WIXVSVER = VS2013
|
|
|
|
!ENDIF
|
|
|
|
!IF "$(VISUALSTUDIOVERSION)" == "14.0"
|
|
|
|
WIXVSVER = VS2015
|
|
|
|
!ENDIF
|
|
|
|
WIX_INCL_DIR = "/I$(WIX)\SDK\$(WIXVSVER)\inc"
|
2017-05-31 14:43:15 +00:00
|
|
|
WIX_LIBS = "$(WIX)\SDK\$(WIXVSVER)\lib\$(PLATFORM)\dutil.lib" "$(WIX)\SDK\$(WIXVSVER)\lib\$(PLATFORM)\wcautil.lib"
|
2015-04-24 13:58:54 +00:00
|
|
|
|
2012-06-07 20:22:58 +00:00
|
|
|
#Include support for Secure Messaging
|
|
|
|
SM_DEF = /DENABLE_SM
|
|
|
|
|
|
|
|
#Build with debugging support
|
|
|
|
#DEBUG_DEF = /DDEBUG
|
|
|
|
|
2011-02-16 19:02:11 +00:00
|
|
|
# If you want support for OpenSSL (needed for pkcs15-init tool, software hashing in PKCS#11 library and verification):
|
2005-01-16 21:12:38 +00:00
|
|
|
# - download and build OpenSSL
|
|
|
|
# - uncomment the line starting with OPENSSL_DEF
|
|
|
|
# - set the OPENSSL_INCL_DIR below to your openssl include directory, preceded by "/I"
|
|
|
|
# - set the OPENSSL_LIB below to your openssl lib file
|
2015-09-23 06:21:57 +00:00
|
|
|
#OPENSSL_DEF= /DENABLE_OPENSSL
|
2008-04-07 19:42:43 +00:00
|
|
|
!IF "$(OPENSSL_DEF)" == "/DENABLE_OPENSSL"
|
2017-05-31 14:43:15 +00:00
|
|
|
!IF "$(PLATFORM)" == "x86"
|
2011-04-01 08:06:25 +00:00
|
|
|
OPENSSL_DIR = C:\OpenSSL-Win32
|
2017-05-31 14:43:15 +00:00
|
|
|
!ELSE
|
|
|
|
OPENSSL_DIR = C:\OpenSSL-Win64
|
2011-04-01 08:06:25 +00:00
|
|
|
!ENDIF
|
|
|
|
OPENSSL_INCL_DIR = /I$(OPENSSL_DIR)\include
|
2012-06-07 20:22:58 +00:00
|
|
|
|
2015-09-11 08:55:34 +00:00
|
|
|
#define OPENSSL_STATIC if you have visual studio compatible with OpenSSL's static binaries
|
|
|
|
OPENSSL_STATIC_DIR = static
|
|
|
|
|
2012-06-07 20:22:58 +00:00
|
|
|
!IF "$(DEBUG_DEF)" == "/DDEBUG"
|
2017-07-21 12:05:47 +00:00
|
|
|
!IF "$(PLATFORM)" == "x86"
|
2017-08-02 16:14:25 +00:00
|
|
|
# OpenSSL 1.0.2
|
|
|
|
OPENSSL_LIB = $(OPENSSL_DIR)\lib\VC\$(OPENSSL_STATIC_DIR)\libeay32MTd.lib user32.lib advapi32.lib crypt32.lib ws2_32.lib
|
|
|
|
# OpenSSL 1.1.0
|
|
|
|
#OPENSSL_LIB = $(OPENSSL_DIR)\lib\VC\$(OPENSSL_STATIC_DIR)\libcrypto32MTd.lib user32.lib advapi32.lib crypt32.lib ws2_32.lib
|
2017-07-21 12:05:47 +00:00
|
|
|
!ELSE
|
2017-08-02 16:14:25 +00:00
|
|
|
# OpenSSL 1.0.2
|
|
|
|
OPENSSL_LIB = $(OPENSSL_DIR)\lib\VC\$(OPENSSL_STATIC_DIR)\libeay32MTd.lib user32.lib advapi32.lib crypt32.lib ws2_32.lib
|
|
|
|
# OpenSSL 1.1.0
|
|
|
|
#OPENSSL_LIB = $(OPENSSL_DIR)\lib\VC\$(OPENSSL_STATIC_DIR)\libcrypto64MTd.lib user32.lib advapi32.lib crypt32.lib ws2_32.lib
|
2017-07-21 12:05:47 +00:00
|
|
|
!ENDIF
|
2012-06-07 20:22:58 +00:00
|
|
|
!ELSE
|
2017-07-21 12:05:47 +00:00
|
|
|
!IF "$(PLATFORM)" == "x86"
|
2017-08-02 16:14:25 +00:00
|
|
|
# OpenSSL 1.0.2
|
|
|
|
OPENSSL_LIB = $(OPENSSL_DIR)\lib\VC\$(OPENSSL_STATIC_DIR)\libeay32MT.lib user32.lib advapi32.lib crypt32.lib ws2_32.lib
|
|
|
|
# OpenSSL 1.1.0
|
|
|
|
#OPENSSL_LIB = $(OPENSSL_DIR)\lib\VC\$(OPENSSL_STATIC_DIR)\libcrypto32MT.lib user32.lib advapi32.lib crypt32.lib ws2_32.lib
|
2017-07-21 12:05:47 +00:00
|
|
|
!ELSE
|
2017-08-02 16:14:25 +00:00
|
|
|
# OpenSSL 1.0.2
|
|
|
|
OPENSSL_LIB = $(OPENSSL_DIR)\lib\VC\$(OPENSSL_STATIC_DIR)\libeay32MT.lib user32.lib advapi32.lib crypt32.lib ws2_32.lib
|
|
|
|
# OpenSSL 1.1.0
|
|
|
|
#OPENSSL_LIB = $(OPENSSL_DIR)\lib\VC\$(OPENSSL_STATIC_DIR)\libcrypto64MT.lib user32.lib advapi32.lib crypt32.lib ws2_32.lib
|
2017-07-21 12:05:47 +00:00
|
|
|
!ENDIF
|
2012-06-07 20:22:58 +00:00
|
|
|
!ENDIF
|
2010-12-09 09:16:03 +00:00
|
|
|
|
2015-09-23 06:23:28 +00:00
|
|
|
PROGRAMS_OPENSSL = cryptoflex-tool.exe pkcs15-init.exe netkey-tool.exe piv-tool.exe \
|
2015-11-06 07:24:16 +00:00
|
|
|
westcos-tool.exe sc-hsm-tool.exe dnie-tool.exe gids-tool.exe npa-tool.exe
|
2008-04-07 21:28:37 +00:00
|
|
|
OPENSC_FEATURES = $(OPENSC_FEATURES) openssl
|
2015-09-30 05:13:59 +00:00
|
|
|
CANDLEFLAGS = -dOpenSSL="$(OPENSSL_DIR)" $(CANDLEFLAGS)
|
2005-01-16 21:12:38 +00:00
|
|
|
!ENDIF
|
|
|
|
|
2010-12-09 09:16:03 +00:00
|
|
|
|
2009-01-29 11:47:45 +00:00
|
|
|
# If you want support for zlib (Used for PIV, infocamere and actalis):
|
2015-09-11 08:55:34 +00:00
|
|
|
# - Download zlib-dll and
|
2007-03-10 10:46:32 +00:00
|
|
|
# - uncomment the line starting with ZLIB_DEF
|
|
|
|
# - set the ZLIB_INCL_DIR below to the zlib include lib proceeded by "/I"
|
|
|
|
# - set the ZLIB_LIB below to your zlib lib file
|
2015-09-23 06:21:57 +00:00
|
|
|
#ZLIB_DEF = /DENABLE_ZLIB
|
2015-12-26 17:44:57 +00:00
|
|
|
!IF "$(ZLIBSTATIC_DEF)" == "/DENABLE_ZLIB_STATIC"
|
|
|
|
ZLIB_DEF = /DENABLE_ZLIB
|
2017-06-01 08:01:42 +00:00
|
|
|
!IF "$(ZLIB_INCL_DIR)" == ""
|
2015-12-26 17:44:57 +00:00
|
|
|
ZLIB_INCL_DIR = /IC:\zlib
|
2017-06-01 08:01:42 +00:00
|
|
|
!ENDIF
|
|
|
|
!IF "$(ZLIB_LIB)" == ""
|
2015-12-26 17:44:57 +00:00
|
|
|
ZLIB_LIB = C:\zlib\zlib.lib
|
2017-06-01 08:01:42 +00:00
|
|
|
!ENDIF
|
2015-12-26 17:44:57 +00:00
|
|
|
OPENSC_FEATURES = $(OPENSC_FEATURES) zlib
|
2017-06-01 08:01:42 +00:00
|
|
|
!ELSEIF "$(ZLIB_DEF)" == "/DENABLE_ZLIB"
|
|
|
|
!IF "$(ZLIB_INCL_DIR)" == ""
|
2015-09-11 08:55:34 +00:00
|
|
|
ZLIB_INCL_DIR = /IC:\zlib-dll\include
|
2017-06-01 08:01:42 +00:00
|
|
|
!ENDIF
|
|
|
|
!IF "$(ZLIB_LIB)" == ""
|
2015-09-11 08:55:34 +00:00
|
|
|
ZLIB_LIB = C:\zlib-dll\lib\zdll.lib
|
2017-06-01 08:01:42 +00:00
|
|
|
!ENDIF
|
2008-04-07 21:28:37 +00:00
|
|
|
OPENSC_FEATURES = $(OPENSC_FEATURES) zlib
|
2015-09-30 05:13:59 +00:00
|
|
|
CANDLEFLAGS = -dzlib="C:\zlib-dll" $(CANDLEFLAGS)
|
2007-03-10 10:46:32 +00:00
|
|
|
!ENDIF
|
|
|
|
|
2015-12-26 17:44:57 +00:00
|
|
|
|
2015-11-06 07:24:16 +00:00
|
|
|
# If you want support for EAC:
|
|
|
|
# - Download OpenPACE and
|
|
|
|
# - uncomment the line starting with OPENPACE_DEF
|
|
|
|
# - set the OPENPACE_INCL_DIR below to the OpenPACE include directory preceeded by "/I"
|
|
|
|
# - set the OPENPACE_LIB below to your OpenPACE lib file
|
|
|
|
#OPENPACE_DEF= /DENABLE_OPENPACE
|
|
|
|
!IF "$(OPENPACE_DEF)" == "/DENABLE_OPENPACE"
|
2017-06-01 08:10:56 +00:00
|
|
|
!IF "$(OPENPACE_DIR)" == ""
|
2017-03-23 15:45:31 +00:00
|
|
|
OPENPACE_DIR = C:\openpace
|
2017-06-01 08:10:56 +00:00
|
|
|
!ENDIF
|
2017-03-23 15:45:31 +00:00
|
|
|
OPENPACE_INCL_DIR = /I$(OPENPACE_DIR)\src
|
|
|
|
OPENPACE_LIB = $(OPENPACE_DIR)\src\libeac.lib
|
|
|
|
CANDLEFLAGS = -dOpenPACE="$(OPENPACE_DIR)" $(CANDLEFLAGS)
|
2015-11-06 07:24:16 +00:00
|
|
|
!ENDIF
|
|
|
|
|
|
|
|
|
2011-02-16 19:02:11 +00:00
|
|
|
# Used for MiniDriver
|
2017-05-31 14:43:15 +00:00
|
|
|
CNGSDK_INCL_DIR = "/IC:\Program Files (x86)\Microsoft CNG Development Kit\Include"
|
|
|
|
!IF "$(PROCESSOR_ARCHITECTURE)" == "x86" && "$(PROCESSOR_ARCHITEW6432)" == ""
|
|
|
|
CNGSDK_INCL_DIR = "/IC:\Program Files\Microsoft CNG Development Kit\Include"
|
|
|
|
!ENDIF
|
2010-05-01 12:15:36 +00:00
|
|
|
# Mandatory path to 'ISO C9x compliant stdint.h and inttypes.h for Microsoft Visual Studio'
|
|
|
|
# http://msinttypes.googlecode.com/files/msinttypes-r26.zip
|
2011-02-16 19:02:11 +00:00
|
|
|
# INTTYPES_INCL_DIR = /IC:\opensc\dependencies\msys\local
|
2002-06-14 12:52:56 +00:00
|
|
|
|
2011-06-14 09:34:25 +00:00
|
|
|
# Code optimisation
|
|
|
|
# O1 - minimal code size
|
|
|
|
CODE_OPTIMIZATION = /O1
|
|
|
|
|
2015-11-06 07:24:16 +00:00
|
|
|
ALL_INCLUDES = /I$(TOPDIR)\win32 /I$(TOPDIR)\src $(OPENPACE_INCL_DIR) $(OPENSSL_INCL_DIR) $(OPENSSL_EXTRA_CFLAGS) $(ZLIB_INCL_DIR) $(LIBLTDL_INCL) $(INTTYPES_INCL_DIR) $(CNGSDK_INCL_DIR) $(WIX_INCL_DIR)
|
2012-06-07 20:22:58 +00:00
|
|
|
|
|
|
|
!IF "$(DEBUG_DEF)" == "/DDEBUG"
|
|
|
|
LINKDEBUGFLAGS = /NODEFAULTLIB:LIBCMT /DEBUG
|
|
|
|
CODE_OPTIMIZATION =
|
2017-10-28 06:26:17 +00:00
|
|
|
COPTS = /GS /W3 /WX /D_CRT_SECURE_NO_DEPRECATE /D_CRT_NONSTDC_NO_WARNINGS /MTd /nologo /DHAVE_CONFIG_H $(ALL_INCLUDES) /DWINVER=0x0601 /D_WIN32_WINNT=0x0601 /DWIN32_LEAN_AND_MEAN $(OPENPACE_DEF) $(OPENSSL_DEF) $(ZLIB_DEF) $(MINIDRIVER_DEF) $(SM_DEF) /DOPENSC_FEATURES="\"$(OPENSC_FEATURES)\"" /DDEBUG /Zi /Od
|
2012-06-07 20:22:58 +00:00
|
|
|
!ELSE
|
2017-11-15 07:25:07 +00:00
|
|
|
LINKDEBUGFLAGS = /NODEFAULTLIB:LIBCMTD /DEBUG /OPT:REF /OPT:ICF
|
|
|
|
COPTS = /GS /W3 /WX /D_CRT_SECURE_NO_DEPRECATE /D_CRT_NONSTDC_NO_WARNINGS /MT /nologo /DHAVE_CONFIG_H $(ALL_INCLUDES) /DWINVER=0x0601 /D_WIN32_WINNT=0x0601 /DWIN32_LEAN_AND_MEAN $(OPENPACE_DEF) $(OPENSSL_DEF) $(ZLIB_DEF) $(MINIDRIVER_DEF) $(SM_DEF) /DOPENSC_FEATURES="\"$(OPENSC_FEATURES)\"" /Zi
|
2012-06-07 20:22:58 +00:00
|
|
|
!ENDIF
|
|
|
|
|
|
|
|
|
2017-02-09 12:44:07 +00:00
|
|
|
LINKFLAGS = /NOLOGO /INCREMENTAL:NO /MACHINE:$(PLATFORM) /NODEFAULTLIB:MSVCRTD /NODEFAULTLIB:MSVCRT /NXCOMPAT /DYNAMICBASE $(LINKDEBUGFLAGS)
|
2017-05-31 14:43:15 +00:00
|
|
|
LIBFLAGS = /nologo /machine:$(PLATFORM)
|
|
|
|
!IF "$(PLATFORM)" == "x86"
|
2015-09-30 05:13:59 +00:00
|
|
|
CANDLEFLAGS = -dPlatform=x86 $(CANDLEFLAGS)
|
2017-05-31 14:43:15 +00:00
|
|
|
!ELSE
|
|
|
|
CANDLEFLAGS = -dPlatform=x64 $(CANDLEFLAGS)
|
2011-04-01 08:06:25 +00:00
|
|
|
!ENDIF
|
2016-06-22 14:35:17 +00:00
|
|
|
|
2002-06-14 12:52:56 +00:00
|
|
|
.c.obj::
|
2011-06-14 09:34:25 +00:00
|
|
|
cl $(CODE_OPTIMIZATION) $(COPTS) /c $<
|
2005-09-21 10:10:15 +00:00
|
|
|
|
2015-04-25 15:04:17 +00:00
|
|
|
.cpp.obj::
|
|
|
|
cl $(CODE_OPTIMIZATION) $(COPTS) /c $<
|
|
|
|
|
2008-04-08 18:36:42 +00:00
|
|
|
.rc.res::
|
2011-03-31 11:28:29 +00:00
|
|
|
rc /l 0x0409 $<
|
2008-04-08 18:36:42 +00:00
|
|
|
|
2005-09-21 10:10:15 +00:00
|
|
|
clean::
|
2017-02-09 12:44:07 +00:00
|
|
|
del /Q *.obj *.dll *.exe *.pdb *.lib *.def *.res
|