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
|
|
|
|
2011-03-31 11:28:29 +00:00
|
|
|
#Build MSI with the Windows Installer XML (WIX) toolkit, requires WIX >= 3.6
|
2011-04-03 07:41:56 +00:00
|
|
|
!IF "$(BUILD_ON)" == "WIN64"
|
2011-04-01 08:06:25 +00:00
|
|
|
WIX_PATH = "C:\Program Files (x86)\Windows Installer XML v3.6"
|
|
|
|
!ELSE
|
2011-03-31 11:28:29 +00:00
|
|
|
WIX_PATH = "C:\Program Files\Windows Installer XML v3.6"
|
2011-04-01 08:06:25 +00:00
|
|
|
!ENDIF
|
2010-12-09 09:16:03 +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
|
2011-03-31 11:28:29 +00:00
|
|
|
OPENSSL_DEF = /DENABLE_OPENSSL
|
2008-04-07 19:42:43 +00:00
|
|
|
!IF "$(OPENSSL_DEF)" == "/DENABLE_OPENSSL"
|
2011-04-03 07:41:56 +00:00
|
|
|
!IF "$(BUILD_FOR)" == "WIN64"
|
2011-04-01 08:06:25 +00:00
|
|
|
OPENSSL_DIR = C:\OpenSSL-Win64
|
|
|
|
!ELSE
|
|
|
|
OPENSSL_DIR = C:\OpenSSL-Win32
|
|
|
|
!ENDIF
|
|
|
|
OPENSSL_INCL_DIR = /I$(OPENSSL_DIR)\include
|
2012-06-07 20:22:58 +00:00
|
|
|
|
|
|
|
!IF "$(DEBUG_DEF)" == "/DDEBUG"
|
|
|
|
OPENSSL_LIB = $(OPENSSL_DIR)\lib\VC\static\libeay32MTd.lib $(OPENSSL_DIR)\lib\VC\static\ssleay32MTd.lib user32.lib advapi32.lib crypt32.lib
|
|
|
|
!ELSE
|
2011-04-01 08:06:25 +00:00
|
|
|
OPENSSL_LIB = $(OPENSSL_DIR)\lib\VC\static\libeay32MT.lib $(OPENSSL_DIR)\lib\VC\static\ssleay32MT.lib user32.lib advapi32.lib crypt32.lib
|
2012-06-07 20:22:58 +00:00
|
|
|
!ENDIF
|
2010-12-09 09:16:03 +00:00
|
|
|
|
2010-12-06 15:20:19 +00:00
|
|
|
PROGRAMS_OPENSSL = pkcs15-init.exe cryptoflex-tool.exe netkey-tool.exe piv-tool.exe westcos-tool.exe
|
2008-04-07 21:28:37 +00:00
|
|
|
OPENSC_FEATURES = $(OPENSC_FEATURES) openssl
|
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):
|
2011-04-12 07:48:53 +00:00
|
|
|
# - Download zlib and build with "nmake /f win32\Makefile.msc zlib.lib"
|
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
|
2011-04-12 07:48:53 +00:00
|
|
|
ZLIB_DEF = /DENABLE_ZLIB
|
2008-04-07 19:42:43 +00:00
|
|
|
!IF "$(ZLIB_DEF)" == "/DENABLE_ZLIB"
|
2011-04-12 07:48:53 +00:00
|
|
|
ZLIB_INCL_DIR = /IC:\zlib-1.2.5
|
|
|
|
ZLIB_LIB = C:\zlib-1.2.5\zlib.lib
|
2008-04-07 21:28:37 +00:00
|
|
|
OPENSC_FEATURES = $(OPENSC_FEATURES) zlib
|
2007-03-10 10:46:32 +00:00
|
|
|
!ENDIF
|
|
|
|
|
2011-02-16 19:02:11 +00:00
|
|
|
# Used for MiniDriver
|
2011-04-03 07:41:56 +00:00
|
|
|
!IF "$(BUILD_ON)" == "WIN64"
|
2011-04-01 08:06:25 +00:00
|
|
|
CNGSDK_INCL_DIR = "/IC:\Program Files (x86)\Microsoft CNG Development Kit\Include"
|
|
|
|
!ELSE
|
2011-02-16 19:02:11 +00:00
|
|
|
CNGSDK_INCL_DIR = "/IC:\Program Files\Microsoft CNG Development Kit\Include"
|
2011-04-01 08:06:25 +00:00
|
|
|
!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
|
|
|
|
|
2011-02-16 19:02:11 +00:00
|
|
|
ALL_INCLUDES = /I$(TOPDIR)\win32 /I$(TOPDIR)\src $(OPENSSL_INCL_DIR) $(ZLIB_INCL_DIR) $(LIBLTDL_INCL) $(INTTYPES_INCL_DIR) $(CNGSDK_INCL_DIR)
|
2012-06-07 20:22:58 +00:00
|
|
|
|
|
|
|
!IF "$(DEBUG_DEF)" == "/DDEBUG"
|
|
|
|
LINKDEBUGFLAGS = /NODEFAULTLIB:LIBCMT /DEBUG
|
|
|
|
CODE_OPTIMIZATION =
|
|
|
|
COPTS = /W3 /D_CRT_SECURE_NO_DEPRECATE /MTd /nologo /DHAVE_CONFIG_H $(ALL_INCLUDES) /D_WIN32_WINNT=0x0502 /DWIN32_LEAN_AND_MEAN $(OPENSSL_DEF) $(ZLIB_DEF) $(MINIDRIVER_DEF) $(SM_DEF) /DOPENSC_FEATURES="\"$(OPENSC_FEATURES)\"" /DDEBUG /Zi /Od
|
|
|
|
!ELSE
|
|
|
|
LINKDEBUGFLAGS = /NODEFAULTLIB:LIBCMTD
|
|
|
|
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) $(SM_DEF) /DOPENSC_FEATURES="\"$(OPENSC_FEATURES)\""
|
|
|
|
!ENDIF
|
|
|
|
|
|
|
|
|
2011-04-03 07:41:56 +00:00
|
|
|
!IF "$(BUILD_FOR)" == "WIN64"
|
2012-06-07 20:22:58 +00:00
|
|
|
LINKFLAGS = /NOLOGO /INCREMENTAL:NO /MACHINE:X64 /MANIFEST:NO /NODEFAULTLIB:MSVCRTD /NODEFAULTLIB:MSVCRT $(LINKDEBUGFLAGS)
|
2011-04-01 08:06:25 +00:00
|
|
|
LIBFLAGS = /nologo /machine:x64
|
2011-04-11 14:42:48 +00:00
|
|
|
CANDLEFLAGS = -dPlatform=x64
|
2011-04-01 08:06:25 +00:00
|
|
|
!ELSE
|
2012-06-07 20:22:58 +00:00
|
|
|
LINKFLAGS = /NOLOGO /INCREMENTAL:NO /MACHINE:X86 /MANIFEST:NO /NODEFAULTLIB:MSVCRTD /NODEFAULTLIB:MSVCRT $(LINKDEBUGFLAGS)
|
2011-04-01 08:06:25 +00:00
|
|
|
LIBFLAGS = /nologo /machine:x86
|
2011-04-11 14:42:48 +00:00
|
|
|
CANDLEFLAGS = -dPlatform=x86
|
2011-04-01 08:06:25 +00:00
|
|
|
!ENDIF
|
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
|
|
|
|
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::
|
2013-12-29 18:20:59 +00:00
|
|
|
del /Q *.obj *.dll *.exe *.pdb *.lib *.def *.manifest *.res
|