better build flags, out of the box lin,mac,win; refs #5

master
Marc Wäckerlin 14 years ago
parent 8101619fdc
commit 0d6627bb78
  1. 5
      configure.in
  2. 36
      doc/examples/makefile.am
  3. 2
      src/cryptoki.hxx
  4. 8
      src/makefile.am

@ -80,11 +80,14 @@ AC_ARG_ENABLE(dot,
test "$enableval" = "yes" && HAVE_DOT="YES" || HAVE_DOT="NO";
AM_PATH_CPPUNIT([1.0.0], [have_cppunit="yes"], [have_cppunit="no"])
MINGW32=no
MAC=no
case $host_os in
*mingw32*) MINGW32=yes;;
*) MINGW32=no;;
*darwin* | *rhapsody* | *macosx*) MAC=yes;;
esac
AM_CONDITIONAL(MINGW32, test "$MINGW32" = "yes")
AM_CONDITIONAL(MAC, test "$MAC" = "yes")
# export macros
SRCDIR=${srcdir}

@ -10,40 +10,36 @@ if !MINGW32
AM_CPPFLAGS += -I/usr/include/PCSC
endif
pcsc_demo_SOURCES = pcsc-demo.cxx
pcsc_demo_LDFLAGS = -L${top_builddir}/src
pcsc_demo_LDADD = -lcryptoki++
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
pcsc_demo_LDADD += /opt/local/i586-mingw32msvc/lib/winscard.a
LDFLAGS += /opt/local/i586-mingw32msvc/lib/winscard.a /opt/local/i586-mingw32msvc/lib/ssleay32.a -leay32
else
pcsc_demo_LDADD += -lpcsclite -ldl -lpthread
LDFLAGS += -ldl -lpthread -lssl
endif
pcsc_demo_SOURCES = pcsc-demo.cxx
pcsc_demo_LDFLAGS = -L${top_builddir}/src
pcsc_demo_LDADD = -lcryptoki++
cryptoki_demo_SOURCES = cryptoki-demo.cxx
cryptoki_demo_LDADD = -lcryptoki++
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_LDFLAGS = -L${top_builddir}/src
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_LDFLAGS = -L${top_builddir}/src
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

@ -10,7 +10,7 @@
// interface
#include <openssl.hxx>
#ifndef WIN32
#include <opensc/pkcs11.h>
#include <pkcs11/pkcs11.h>
#else
#include <cryptoki.h>
#endif

@ -6,7 +6,9 @@
## 45678901234567890123456789012345678901234567890123456789012345678901234567890
include_HEADERS = pcsc.hxx cryptoki.hxx openssl.hxx cryptaux.hxx
pkcs11dir = ${includedir}/pkcs11
pkcs11_HEADERS = pkcs11/apiclient.h pkcs11/pkcs11.h pkcs11/pkcs11types.h
pkgconfigdir = $(libdir)/pkgconfig
pkgconfig_DATA = libpcscxx.pc
@ -19,9 +21,15 @@ lib_LTLIBRARIES = libcryptoki++.la
libcryptoki___la_SOURCES = cryptoki.cxx cryptoki.hxx version.cxx
libcryptoki___la_LIBADD = -lssl
if MAC
AM_CPPFLAGS+=-I/Library/OpenSC/include
AM_LDFLAGS=-F/System/Library/Frameworks/PCSC.framework
endif
if !MINGW32
if !MAC
libcryptoki___la_LIBADD += -lpcsclite
endif
endif
clean-local:
-rm -r ${QMAKE_TARGET}.app

Loading…
Cancel
Save