better build flags, out of the box lin,mac,win; refs #5
This commit is contained in:
@@ -80,11 +80,14 @@ AC_ARG_ENABLE(dot,
|
|||||||
test "$enableval" = "yes" && HAVE_DOT="YES" || HAVE_DOT="NO";
|
test "$enableval" = "yes" && HAVE_DOT="YES" || HAVE_DOT="NO";
|
||||||
AM_PATH_CPPUNIT([1.0.0], [have_cppunit="yes"], [have_cppunit="no"])
|
AM_PATH_CPPUNIT([1.0.0], [have_cppunit="yes"], [have_cppunit="no"])
|
||||||
|
|
||||||
|
MINGW32=no
|
||||||
|
MAC=no
|
||||||
case $host_os in
|
case $host_os in
|
||||||
*mingw32*) MINGW32=yes;;
|
*mingw32*) MINGW32=yes;;
|
||||||
*) MINGW32=no;;
|
*darwin* | *rhapsody* | *macosx*) MAC=yes;;
|
||||||
esac
|
esac
|
||||||
AM_CONDITIONAL(MINGW32, test "$MINGW32" = "yes")
|
AM_CONDITIONAL(MINGW32, test "$MINGW32" = "yes")
|
||||||
|
AM_CONDITIONAL(MAC, test "$MAC" = "yes")
|
||||||
|
|
||||||
# export macros
|
# export macros
|
||||||
SRCDIR=${srcdir}
|
SRCDIR=${srcdir}
|
||||||
|
@@ -10,40 +10,36 @@ if !MINGW32
|
|||||||
AM_CPPFLAGS += -I/usr/include/PCSC
|
AM_CPPFLAGS += -I/usr/include/PCSC
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
LDFLAGS=
|
||||||
|
if MAC
|
||||||
|
AM_CPPFLAGS+=-I/Library/OpenSC/include
|
||||||
|
LDFLAGS += -F/System/Library/Frameworks/PCSC.framework
|
||||||
|
endif
|
||||||
|
if !MINGW32
|
||||||
|
if !MAC
|
||||||
|
LDFLAGS += -lpcsclite
|
||||||
|
endif
|
||||||
|
endif
|
||||||
|
if MINGW32
|
||||||
|
LDFLAGS += /opt/local/i586-mingw32msvc/lib/winscard.a /opt/local/i586-mingw32msvc/lib/ssleay32.a -leay32
|
||||||
|
else
|
||||||
|
LDFLAGS += -ldl -lpthread -lssl
|
||||||
|
endif
|
||||||
|
|
||||||
pcsc_demo_SOURCES = pcsc-demo.cxx
|
pcsc_demo_SOURCES = pcsc-demo.cxx
|
||||||
pcsc_demo_LDFLAGS = -L${top_builddir}/src
|
pcsc_demo_LDFLAGS = -L${top_builddir}/src
|
||||||
pcsc_demo_LDADD = -lcryptoki++
|
pcsc_demo_LDADD = -lcryptoki++
|
||||||
if MINGW32
|
|
||||||
pcsc_demo_LDADD += /opt/local/i586-mingw32msvc/lib/winscard.a
|
|
||||||
else
|
|
||||||
pcsc_demo_LDADD += -lpcsclite -ldl -lpthread
|
|
||||||
endif
|
|
||||||
|
|
||||||
cryptoki_demo_SOURCES = cryptoki-demo.cxx
|
cryptoki_demo_SOURCES = cryptoki-demo.cxx
|
||||||
cryptoki_demo_LDADD = -lcryptoki++
|
cryptoki_demo_LDADD = -lcryptoki++
|
||||||
cryptoki_demo_LDFLAGS = -L${top_builddir}/src
|
cryptoki_demo_LDFLAGS = -L${top_builddir}/src
|
||||||
if MINGW32
|
|
||||||
cryptoki_demo_LDADD += -leay32
|
|
||||||
else
|
|
||||||
cryptoki_demo_LDADD += -ldl -lpthread -lssl
|
|
||||||
endif
|
|
||||||
|
|
||||||
openssl_tcp_demo_SOURCES = openssl-tcp-demo.cxx
|
openssl_tcp_demo_SOURCES = openssl-tcp-demo.cxx
|
||||||
openssl_tcp_demo_LDFLAGS = -L${top_builddir}/src
|
openssl_tcp_demo_LDFLAGS = -L${top_builddir}/src
|
||||||
openssl_tcp_demo_LDADD = -lcryptoki++
|
openssl_tcp_demo_LDADD = -lcryptoki++
|
||||||
if MINGW32
|
|
||||||
openssl_tcp_demo_LDADD += /opt/local/i586-mingw32msvc/lib/ssleay32.a /opt/local/i586-mingw32msvc/lib/libeay32.a
|
|
||||||
else
|
|
||||||
openssl_tcp_demo_LDADD += -ldl -lpthread -lssl
|
|
||||||
endif
|
|
||||||
|
|
||||||
openssl_ssl_demo_SOURCES = openssl-ssl-demo.cxx
|
openssl_ssl_demo_SOURCES = openssl-ssl-demo.cxx
|
||||||
openssl_ssl_demo_LDFLAGS = -L${top_builddir}/src
|
openssl_ssl_demo_LDFLAGS = -L${top_builddir}/src
|
||||||
openssl_ssl_demo_LDADD = -lcryptoki++
|
openssl_ssl_demo_LDADD = -lcryptoki++
|
||||||
if MINGW32
|
|
||||||
openssl_ssl_demo_LDADD += /opt/local/i586-mingw32msvc/lib/ssleay32.a /opt/local/i586-mingw32msvc/lib/libeay32.a
|
|
||||||
else
|
|
||||||
openssl_ssl_demo_LDADD += -ldl -lpthread -lssl
|
|
||||||
endif
|
|
||||||
|
|
||||||
MAINTAINERCLEANFILES = makefile.in
|
MAINTAINERCLEANFILES = makefile.in
|
||||||
|
@@ -10,7 +10,7 @@
|
|||||||
// interface
|
// interface
|
||||||
#include <openssl.hxx>
|
#include <openssl.hxx>
|
||||||
#ifndef WIN32
|
#ifndef WIN32
|
||||||
#include <opensc/pkcs11.h>
|
#include <pkcs11/pkcs11.h>
|
||||||
#else
|
#else
|
||||||
#include <cryptoki.h>
|
#include <cryptoki.h>
|
||||||
#endif
|
#endif
|
||||||
|
@@ -6,7 +6,9 @@
|
|||||||
## 45678901234567890123456789012345678901234567890123456789012345678901234567890
|
## 45678901234567890123456789012345678901234567890123456789012345678901234567890
|
||||||
|
|
||||||
include_HEADERS = pcsc.hxx cryptoki.hxx openssl.hxx cryptaux.hxx
|
include_HEADERS = pcsc.hxx cryptoki.hxx openssl.hxx cryptaux.hxx
|
||||||
|
|
||||||
pkcs11dir = ${includedir}/pkcs11
|
pkcs11dir = ${includedir}/pkcs11
|
||||||
|
pkcs11_HEADERS = pkcs11/apiclient.h pkcs11/pkcs11.h pkcs11/pkcs11types.h
|
||||||
|
|
||||||
pkgconfigdir = $(libdir)/pkgconfig
|
pkgconfigdir = $(libdir)/pkgconfig
|
||||||
pkgconfig_DATA = libpcscxx.pc
|
pkgconfig_DATA = libpcscxx.pc
|
||||||
@@ -19,9 +21,15 @@ lib_LTLIBRARIES = libcryptoki++.la
|
|||||||
|
|
||||||
libcryptoki___la_SOURCES = cryptoki.cxx cryptoki.hxx version.cxx
|
libcryptoki___la_SOURCES = cryptoki.cxx cryptoki.hxx version.cxx
|
||||||
libcryptoki___la_LIBADD = -lssl
|
libcryptoki___la_LIBADD = -lssl
|
||||||
|
if MAC
|
||||||
|
AM_CPPFLAGS+=-I/Library/OpenSC/include
|
||||||
|
AM_LDFLAGS=-F/System/Library/Frameworks/PCSC.framework
|
||||||
|
endif
|
||||||
if !MINGW32
|
if !MINGW32
|
||||||
|
if !MAC
|
||||||
libcryptoki___la_LIBADD += -lpcsclite
|
libcryptoki___la_LIBADD += -lpcsclite
|
||||||
endif
|
endif
|
||||||
|
endif
|
||||||
|
|
||||||
clean-local:
|
clean-local:
|
||||||
-rm -r ${QMAKE_TARGET}.app
|
-rm -r ${QMAKE_TARGET}.app
|
||||||
|
Reference in New Issue
Block a user