opensc/win32/Make.rules.mak

53 lines
2.2 KiB
Makefile
Raw Normal View History

# Note: these instructions obsolete the instructions in opensc.html
# You first need to download the gnuwin32 libtool (e.g. the "Binaries" and "Developer
# files" from http://gnuwin32.sourceforge.net/packages/libtool.htm)
# Then fill in the directory path to ltdl.h on the LIBLTDL_INCL line below, preceeded
# by an "/I"; and fill in the path to the libltdl.lib on the LIBLTDL_LIB line below.
# Then you can build this OpenSC package; and afterwards you'll need to copy the
# libltdl3.dll somewhere on your execution path.
LIBLTDL_INCL = # E.g. /IC:\libtool-1.5.8-lib\include
LIBLTDL_LIB = # E.g. C:\libtool-1.5.8-lib\lib\libltdl.lib
# If you want support for OpenSSL (needed for a.o. pkcs15-init tool and openssl engine):
# - 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
Attached are the latest mode to OpenSC svn 3462 to use the Makefile.mak files to build on Windows. I got rutoken to compile, and took out the #ifdef's I had in last week. The rutoken programmer declared some variables in the middle of a block rather then having all the declare statements at the beginning of a block as is normally done in C. The Microsoft compile treats this as an error. (Actual many errors.) The makedef.pl is no longer needed, as the exports files can be used. Note that in the original Makefile.mak files only opensc.def and pkcs15init.def were created. winconfig.h has a number of changes. As discussed last week this could be created by autoconf. I also noted that the Active State Perl that was required for the makedef.pl has a psed command that could be used like sed to update winconfig.h. I did not attempt to do this. win32/Make.rules.mak - Use ENABLE_OPENSSL and ENABLE_ZLIB src/tools/Makefile.mak - add the rutoken.tool.exe src/tools/eidenv.c - use PACKAGE_VERSION src/pkcs11/Makefile.mak - reorder the objest to match the list in the Makefile.am. Makes it easier to read. src/include/winconfig.h - The windows version of the config.h Changes based on discussions on the list last week. src/common/Makefile.mak - renamed modules. src/pkcs15init/Makefile.mak - reordered, and added back the rutoken modules replaced the use of makdef.pl to sue the exports file. src/scconf/Makefile.mak - reordered objects. src/libopensc/card-rutoken.c - error. Moved the declares to the beginning of blocks. src/libopensc/Makefile.mak - reorder names, and add rutoken. Use the libopensc.exports file. src/libopensc/pkcs15-prkey-rutoken.c - more moving of declare statements. By Douglas E. Engert http://www.opensc-project.org/pipermail/opensc-devel/2008-April/011011.html git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3464 c6295689-39f2-0310-b995-f0e70906c6a9
2008-04-07 19:42:43 +00:00
#OPENSSL_DEF = /DENABLE_OPENSSL
!IF "$(OPENSSL_DEF)" == "/DENABLE_OPENSSL"
OPENSSL_INCL_DIR = /IC:\openssl\include
OPENSSL_LIB = C:\openssl\out32dll\libeay32.lib
PROGRAMS_OPENSSL = pkcs15-init.exe cryptoflex-tool.exe netkey-tool.exe
!ENDIF
# If you want support for zlib (Used for PIV, infocamere and actalis:
# - Download zlib and build
# - 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
Attached are the latest mode to OpenSC svn 3462 to use the Makefile.mak files to build on Windows. I got rutoken to compile, and took out the #ifdef's I had in last week. The rutoken programmer declared some variables in the middle of a block rather then having all the declare statements at the beginning of a block as is normally done in C. The Microsoft compile treats this as an error. (Actual many errors.) The makedef.pl is no longer needed, as the exports files can be used. Note that in the original Makefile.mak files only opensc.def and pkcs15init.def were created. winconfig.h has a number of changes. As discussed last week this could be created by autoconf. I also noted that the Active State Perl that was required for the makedef.pl has a psed command that could be used like sed to update winconfig.h. I did not attempt to do this. win32/Make.rules.mak - Use ENABLE_OPENSSL and ENABLE_ZLIB src/tools/Makefile.mak - add the rutoken.tool.exe src/tools/eidenv.c - use PACKAGE_VERSION src/pkcs11/Makefile.mak - reorder the objest to match the list in the Makefile.am. Makes it easier to read. src/include/winconfig.h - The windows version of the config.h Changes based on discussions on the list last week. src/common/Makefile.mak - renamed modules. src/pkcs15init/Makefile.mak - reordered, and added back the rutoken modules replaced the use of makdef.pl to sue the exports file. src/scconf/Makefile.mak - reordered objects. src/libopensc/card-rutoken.c - error. Moved the declares to the beginning of blocks. src/libopensc/Makefile.mak - reorder names, and add rutoken. Use the libopensc.exports file. src/libopensc/pkcs15-prkey-rutoken.c - more moving of declare statements. By Douglas E. Engert http://www.opensc-project.org/pipermail/opensc-devel/2008-April/011011.html git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3464 c6295689-39f2-0310-b995-f0e70906c6a9
2008-04-07 19:42:43 +00:00
#ZLIB_DEF = /DENABLE_ZLIB
!IF "$(ZLIB_DEF)" == "/DENABLE_ZLIB"
ZLIB_INCL_DIR = /IC:\ZLIB\INCLUDE
ZLIB_LIB = C:\ZLIB\LIB\zlib.lib
!ENDIF
Attached are the latest mode to OpenSC svn 3462 to use the Makefile.mak files to build on Windows. I got rutoken to compile, and took out the #ifdef's I had in last week. The rutoken programmer declared some variables in the middle of a block rather then having all the declare statements at the beginning of a block as is normally done in C. The Microsoft compile treats this as an error. (Actual many errors.) The makedef.pl is no longer needed, as the exports files can be used. Note that in the original Makefile.mak files only opensc.def and pkcs15init.def were created. winconfig.h has a number of changes. As discussed last week this could be created by autoconf. I also noted that the Active State Perl that was required for the makedef.pl has a psed command that could be used like sed to update winconfig.h. I did not attempt to do this. win32/Make.rules.mak - Use ENABLE_OPENSSL and ENABLE_ZLIB src/tools/Makefile.mak - add the rutoken.tool.exe src/tools/eidenv.c - use PACKAGE_VERSION src/pkcs11/Makefile.mak - reorder the objest to match the list in the Makefile.am. Makes it easier to read. src/include/winconfig.h - The windows version of the config.h Changes based on discussions on the list last week. src/common/Makefile.mak - renamed modules. src/pkcs15init/Makefile.mak - reordered, and added back the rutoken modules replaced the use of makdef.pl to sue the exports file. src/scconf/Makefile.mak - reordered objects. src/libopensc/card-rutoken.c - error. Moved the declares to the beginning of blocks. src/libopensc/Makefile.mak - reorder names, and add rutoken. Use the libopensc.exports file. src/libopensc/pkcs15-prkey-rutoken.c - more moving of declare statements. By Douglas E. Engert http://www.opensc-project.org/pipermail/opensc-devel/2008-April/011011.html git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3464 c6295689-39f2-0310-b995-f0e70906c6a9
2008-04-07 19:42:43 +00:00
COPTS = /D_CRT_SECURE_NO_DEPRECATE /Zi /MD /nologo /DHAVE_CONFIG_H /I$(TOPDIR)\src\include /I$(TOPDIR)\src\include\opensc /I$(TOPDIR)\src\common $(OPENSSL_INCL_DIR) $(ZLIB_INCL_DIR) $(LIBLTDL_INCL) /D_WIN32_WINNT=0x0400 /DWIN32_LEAN_AND_MEAN $(OPENSSL_DEF) $(ZLIB_DEF)
LINKFLAGS = /DEBUG /NOLOGO /INCREMENTAL:NO /MACHINE:IX86
install-headers:
@for %i in ( $(HEADERS) ) do \
@xcopy /d /q /y %i $(HEADERSDIR) > nul
install-headers-dir:
@for %i in ( $(HEADERSDIRFROM2) ) do \
@xcopy /d /q /y %i\*.h $(HEADERSDIR2)\*.h > nul
.c.obj::
cl $(COPTS) /c $<
clean::
del /Q *.obj *.dll *.exe *.pdb *.lib *.exp *.def