mirror of
https://gitlab.freedesktop.org/libfprint/libfprint.git
synced 2026-06-11 10:34:18 +00:00
New upstream version 0.7.0
This commit is contained in:
-24
@@ -1,24 +0,0 @@
|
|||||||
ltmain.sh
|
|
||||||
missing
|
|
||||||
stamp-h1
|
|
||||||
libtool
|
|
||||||
*.la
|
|
||||||
*.lo
|
|
||||||
*.o
|
|
||||||
*.swp
|
|
||||||
Makefile
|
|
||||||
Makefile.in
|
|
||||||
config.h*
|
|
||||||
aclocal.m4
|
|
||||||
autom4te.cache
|
|
||||||
config.guess
|
|
||||||
config.log
|
|
||||||
config.status
|
|
||||||
config.sub
|
|
||||||
configure
|
|
||||||
depcomp
|
|
||||||
install-sh
|
|
||||||
.deps
|
|
||||||
.libs
|
|
||||||
compile
|
|
||||||
ChangeLog
|
|
||||||
+915
@@ -0,0 +1,915 @@
|
|||||||
|
# Makefile.in generated by automake 1.15 from Makefile.am.
|
||||||
|
# @configure_input@
|
||||||
|
|
||||||
|
# Copyright (C) 1994-2014 Free Software Foundation, Inc.
|
||||||
|
|
||||||
|
# This Makefile.in is free software; the Free Software Foundation
|
||||||
|
# gives unlimited permission to copy and/or distribute it,
|
||||||
|
# with or without modifications, as long as this notice is preserved.
|
||||||
|
|
||||||
|
# This program is distributed in the hope that it will be useful,
|
||||||
|
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
|
||||||
|
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
|
||||||
|
# PARTICULAR PURPOSE.
|
||||||
|
|
||||||
|
@SET_MAKE@
|
||||||
|
|
||||||
|
VPATH = @srcdir@
|
||||||
|
am__is_gnu_make = { \
|
||||||
|
if test -z '$(MAKELEVEL)'; then \
|
||||||
|
false; \
|
||||||
|
elif test -n '$(MAKE_HOST)'; then \
|
||||||
|
true; \
|
||||||
|
elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
|
||||||
|
true; \
|
||||||
|
else \
|
||||||
|
false; \
|
||||||
|
fi; \
|
||||||
|
}
|
||||||
|
am__make_running_with_option = \
|
||||||
|
case $${target_option-} in \
|
||||||
|
?) ;; \
|
||||||
|
*) echo "am__make_running_with_option: internal error: invalid" \
|
||||||
|
"target option '$${target_option-}' specified" >&2; \
|
||||||
|
exit 1;; \
|
||||||
|
esac; \
|
||||||
|
has_opt=no; \
|
||||||
|
sane_makeflags=$$MAKEFLAGS; \
|
||||||
|
if $(am__is_gnu_make); then \
|
||||||
|
sane_makeflags=$$MFLAGS; \
|
||||||
|
else \
|
||||||
|
case $$MAKEFLAGS in \
|
||||||
|
*\\[\ \ ]*) \
|
||||||
|
bs=\\; \
|
||||||
|
sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \
|
||||||
|
| sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \
|
||||||
|
esac; \
|
||||||
|
fi; \
|
||||||
|
skip_next=no; \
|
||||||
|
strip_trailopt () \
|
||||||
|
{ \
|
||||||
|
flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \
|
||||||
|
}; \
|
||||||
|
for flg in $$sane_makeflags; do \
|
||||||
|
test $$skip_next = yes && { skip_next=no; continue; }; \
|
||||||
|
case $$flg in \
|
||||||
|
*=*|--*) continue;; \
|
||||||
|
-*I) strip_trailopt 'I'; skip_next=yes;; \
|
||||||
|
-*I?*) strip_trailopt 'I';; \
|
||||||
|
-*O) strip_trailopt 'O'; skip_next=yes;; \
|
||||||
|
-*O?*) strip_trailopt 'O';; \
|
||||||
|
-*l) strip_trailopt 'l'; skip_next=yes;; \
|
||||||
|
-*l?*) strip_trailopt 'l';; \
|
||||||
|
-[dEDm]) skip_next=yes;; \
|
||||||
|
-[JT]) skip_next=yes;; \
|
||||||
|
esac; \
|
||||||
|
case $$flg in \
|
||||||
|
*$$target_option*) has_opt=yes; break;; \
|
||||||
|
esac; \
|
||||||
|
done; \
|
||||||
|
test $$has_opt = yes
|
||||||
|
am__make_dryrun = (target_option=n; $(am__make_running_with_option))
|
||||||
|
am__make_keepgoing = (target_option=k; $(am__make_running_with_option))
|
||||||
|
pkgdatadir = $(datadir)/@PACKAGE@
|
||||||
|
pkgincludedir = $(includedir)/@PACKAGE@
|
||||||
|
pkglibdir = $(libdir)/@PACKAGE@
|
||||||
|
pkglibexecdir = $(libexecdir)/@PACKAGE@
|
||||||
|
am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
|
||||||
|
install_sh_DATA = $(install_sh) -c -m 644
|
||||||
|
install_sh_PROGRAM = $(install_sh) -c
|
||||||
|
install_sh_SCRIPT = $(install_sh) -c
|
||||||
|
INSTALL_HEADER = $(INSTALL_DATA)
|
||||||
|
transform = $(program_transform_name)
|
||||||
|
NORMAL_INSTALL = :
|
||||||
|
PRE_INSTALL = :
|
||||||
|
POST_INSTALL = :
|
||||||
|
NORMAL_UNINSTALL = :
|
||||||
|
PRE_UNINSTALL = :
|
||||||
|
POST_UNINSTALL = :
|
||||||
|
build_triplet = @build@
|
||||||
|
host_triplet = @host@
|
||||||
|
@BUILD_EXAMPLES_TRUE@am__append_1 = examples
|
||||||
|
subdir = .
|
||||||
|
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
|
||||||
|
am__aclocal_m4_deps = $(top_srcdir)/m4/libtool.m4 \
|
||||||
|
$(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \
|
||||||
|
$(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \
|
||||||
|
$(top_srcdir)/configure.ac
|
||||||
|
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
|
||||||
|
$(ACLOCAL_M4)
|
||||||
|
DIST_COMMON = $(srcdir)/Makefile.am $(top_srcdir)/configure \
|
||||||
|
$(am__configure_deps) $(am__DIST_COMMON)
|
||||||
|
am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \
|
||||||
|
configure.lineno config.status.lineno
|
||||||
|
mkinstalldirs = $(install_sh) -d
|
||||||
|
CONFIG_HEADER = config.h
|
||||||
|
CONFIG_CLEAN_FILES = libfprint.pc
|
||||||
|
CONFIG_CLEAN_VPATH_FILES =
|
||||||
|
AM_V_P = $(am__v_P_@AM_V@)
|
||||||
|
am__v_P_ = $(am__v_P_@AM_DEFAULT_V@)
|
||||||
|
am__v_P_0 = false
|
||||||
|
am__v_P_1 = :
|
||||||
|
AM_V_GEN = $(am__v_GEN_@AM_V@)
|
||||||
|
am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@)
|
||||||
|
am__v_GEN_0 = @echo " GEN " $@;
|
||||||
|
am__v_GEN_1 =
|
||||||
|
AM_V_at = $(am__v_at_@AM_V@)
|
||||||
|
am__v_at_ = $(am__v_at_@AM_DEFAULT_V@)
|
||||||
|
am__v_at_0 = @
|
||||||
|
am__v_at_1 =
|
||||||
|
SOURCES =
|
||||||
|
DIST_SOURCES =
|
||||||
|
RECURSIVE_TARGETS = all-recursive check-recursive cscopelist-recursive \
|
||||||
|
ctags-recursive dvi-recursive html-recursive info-recursive \
|
||||||
|
install-data-recursive install-dvi-recursive \
|
||||||
|
install-exec-recursive install-html-recursive \
|
||||||
|
install-info-recursive install-pdf-recursive \
|
||||||
|
install-ps-recursive install-recursive installcheck-recursive \
|
||||||
|
installdirs-recursive pdf-recursive ps-recursive \
|
||||||
|
tags-recursive uninstall-recursive
|
||||||
|
am__can_run_installinfo = \
|
||||||
|
case $$AM_UPDATE_INFO_DIR in \
|
||||||
|
n|no|NO) false;; \
|
||||||
|
*) (install-info --version) >/dev/null 2>&1;; \
|
||||||
|
esac
|
||||||
|
am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
|
||||||
|
am__vpath_adj = case $$p in \
|
||||||
|
$(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
|
||||||
|
*) f=$$p;; \
|
||||||
|
esac;
|
||||||
|
am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`;
|
||||||
|
am__install_max = 40
|
||||||
|
am__nobase_strip_setup = \
|
||||||
|
srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'`
|
||||||
|
am__nobase_strip = \
|
||||||
|
for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||"
|
||||||
|
am__nobase_list = $(am__nobase_strip_setup); \
|
||||||
|
for p in $$list; do echo "$$p $$p"; done | \
|
||||||
|
sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \
|
||||||
|
$(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \
|
||||||
|
if (++n[$$2] == $(am__install_max)) \
|
||||||
|
{ print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \
|
||||||
|
END { for (dir in files) print dir, files[dir] }'
|
||||||
|
am__base_list = \
|
||||||
|
sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
|
||||||
|
sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
|
||||||
|
am__uninstall_files_from_dir = { \
|
||||||
|
test -z "$$files" \
|
||||||
|
|| { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \
|
||||||
|
|| { echo " ( cd '$$dir' && rm -f" $$files ")"; \
|
||||||
|
$(am__cd) "$$dir" && rm -f $$files; }; \
|
||||||
|
}
|
||||||
|
am__installdirs = "$(DESTDIR)$(pkgconfigdir)"
|
||||||
|
DATA = $(pkgconfig_DATA)
|
||||||
|
RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \
|
||||||
|
distclean-recursive maintainer-clean-recursive
|
||||||
|
am__recursive_targets = \
|
||||||
|
$(RECURSIVE_TARGETS) \
|
||||||
|
$(RECURSIVE_CLEAN_TARGETS) \
|
||||||
|
$(am__extra_recursive_targets)
|
||||||
|
AM_RECURSIVE_TARGETS = $(am__recursive_targets:-recursive=) TAGS CTAGS \
|
||||||
|
cscope distdir dist dist-all distcheck
|
||||||
|
am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) \
|
||||||
|
$(LISP)config.h.in
|
||||||
|
# Read a list of newline-separated strings from the standard input,
|
||||||
|
# and print each of them once, without duplicates. Input order is
|
||||||
|
# *not* preserved.
|
||||||
|
am__uniquify_input = $(AWK) '\
|
||||||
|
BEGIN { nonempty = 0; } \
|
||||||
|
{ items[$$0] = 1; nonempty = 1; } \
|
||||||
|
END { if (nonempty) { for (i in items) print i; }; } \
|
||||||
|
'
|
||||||
|
# Make sure the list of sources is unique. This is necessary because,
|
||||||
|
# e.g., the same source file might be shared among _SOURCES variables
|
||||||
|
# for different programs/libraries.
|
||||||
|
am__define_uniq_tagged_files = \
|
||||||
|
list='$(am__tagged_files)'; \
|
||||||
|
unique=`for i in $$list; do \
|
||||||
|
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
|
||||||
|
done | $(am__uniquify_input)`
|
||||||
|
ETAGS = etags
|
||||||
|
CTAGS = ctags
|
||||||
|
CSCOPE = cscope
|
||||||
|
am__DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/config.h.in \
|
||||||
|
$(srcdir)/libfprint.pc.in AUTHORS COPYING ChangeLog INSTALL \
|
||||||
|
NEWS README THANKS TODO compile config.guess config.sub \
|
||||||
|
depcomp install-sh ltmain.sh missing
|
||||||
|
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
|
||||||
|
distdir = $(PACKAGE)-$(VERSION)
|
||||||
|
top_distdir = $(distdir)
|
||||||
|
am__remove_distdir = \
|
||||||
|
if test -d "$(distdir)"; then \
|
||||||
|
find "$(distdir)" -type d ! -perm -200 -exec chmod u+w {} ';' \
|
||||||
|
&& rm -rf "$(distdir)" \
|
||||||
|
|| { sleep 5 && rm -rf "$(distdir)"; }; \
|
||||||
|
else :; fi
|
||||||
|
am__post_remove_distdir = $(am__remove_distdir)
|
||||||
|
am__relativize = \
|
||||||
|
dir0=`pwd`; \
|
||||||
|
sed_first='s,^\([^/]*\)/.*$$,\1,'; \
|
||||||
|
sed_rest='s,^[^/]*/*,,'; \
|
||||||
|
sed_last='s,^.*/\([^/]*\)$$,\1,'; \
|
||||||
|
sed_butlast='s,/*[^/]*$$,,'; \
|
||||||
|
while test -n "$$dir1"; do \
|
||||||
|
first=`echo "$$dir1" | sed -e "$$sed_first"`; \
|
||||||
|
if test "$$first" != "."; then \
|
||||||
|
if test "$$first" = ".."; then \
|
||||||
|
dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \
|
||||||
|
dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \
|
||||||
|
else \
|
||||||
|
first2=`echo "$$dir2" | sed -e "$$sed_first"`; \
|
||||||
|
if test "$$first2" = "$$first"; then \
|
||||||
|
dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \
|
||||||
|
else \
|
||||||
|
dir2="../$$dir2"; \
|
||||||
|
fi; \
|
||||||
|
dir0="$$dir0"/"$$first"; \
|
||||||
|
fi; \
|
||||||
|
fi; \
|
||||||
|
dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \
|
||||||
|
done; \
|
||||||
|
reldir="$$dir2"
|
||||||
|
GZIP_ENV = --best
|
||||||
|
DIST_ARCHIVES = $(distdir).tar.xz
|
||||||
|
DIST_TARGETS = dist-xz
|
||||||
|
distuninstallcheck_listfiles = find . -type f -print
|
||||||
|
am__distuninstallcheck_listfiles = $(distuninstallcheck_listfiles) \
|
||||||
|
| sed 's|^\./|$(prefix)/|' | grep -v '$(infodir)/dir$$'
|
||||||
|
distcleancheck_listfiles = find . -type f -print
|
||||||
|
ACLOCAL = @ACLOCAL@
|
||||||
|
AMTAR = @AMTAR@
|
||||||
|
AM_CFLAGS = @AM_CFLAGS@
|
||||||
|
AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
|
||||||
|
AR = @AR@
|
||||||
|
AUTOCONF = @AUTOCONF@
|
||||||
|
AUTOHEADER = @AUTOHEADER@
|
||||||
|
AUTOMAKE = @AUTOMAKE@
|
||||||
|
AWK = @AWK@
|
||||||
|
CC = @CC@
|
||||||
|
CCDEPMODE = @CCDEPMODE@
|
||||||
|
CFLAGS = @CFLAGS@
|
||||||
|
CPP = @CPP@
|
||||||
|
CPPFLAGS = @CPPFLAGS@
|
||||||
|
CRYPTO_CFLAGS = @CRYPTO_CFLAGS@
|
||||||
|
CRYPTO_LIBS = @CRYPTO_LIBS@
|
||||||
|
CXX = @CXX@
|
||||||
|
CXXCPP = @CXXCPP@
|
||||||
|
CXXDEPMODE = @CXXDEPMODE@
|
||||||
|
CXXFLAGS = @CXXFLAGS@
|
||||||
|
CYGPATH_W = @CYGPATH_W@
|
||||||
|
DEFS = @DEFS@
|
||||||
|
DEPDIR = @DEPDIR@
|
||||||
|
DLLTOOL = @DLLTOOL@
|
||||||
|
DSYMUTIL = @DSYMUTIL@
|
||||||
|
DUMPBIN = @DUMPBIN@
|
||||||
|
ECHO_C = @ECHO_C@
|
||||||
|
ECHO_N = @ECHO_N@
|
||||||
|
ECHO_T = @ECHO_T@
|
||||||
|
EGREP = @EGREP@
|
||||||
|
EXEEXT = @EXEEXT@
|
||||||
|
FGREP = @FGREP@
|
||||||
|
GLIB_CFLAGS = @GLIB_CFLAGS@
|
||||||
|
GLIB_LIBS = @GLIB_LIBS@
|
||||||
|
GREP = @GREP@
|
||||||
|
IMAGING_CFLAGS = @IMAGING_CFLAGS@
|
||||||
|
IMAGING_LIBS = @IMAGING_LIBS@
|
||||||
|
INSTALL = @INSTALL@
|
||||||
|
INSTALL_DATA = @INSTALL_DATA@
|
||||||
|
INSTALL_PROGRAM = @INSTALL_PROGRAM@
|
||||||
|
INSTALL_SCRIPT = @INSTALL_SCRIPT@
|
||||||
|
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
|
||||||
|
LD = @LD@
|
||||||
|
LDFLAGS = @LDFLAGS@
|
||||||
|
LIBOBJS = @LIBOBJS@
|
||||||
|
LIBS = @LIBS@
|
||||||
|
LIBTOOL = @LIBTOOL@
|
||||||
|
LIBUSB_CFLAGS = @LIBUSB_CFLAGS@
|
||||||
|
LIBUSB_LIBS = @LIBUSB_LIBS@
|
||||||
|
LIPO = @LIPO@
|
||||||
|
LN_S = @LN_S@
|
||||||
|
LTLIBOBJS = @LTLIBOBJS@
|
||||||
|
LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@
|
||||||
|
MAKEINFO = @MAKEINFO@
|
||||||
|
MANIFEST_TOOL = @MANIFEST_TOOL@
|
||||||
|
MKDIR_P = @MKDIR_P@
|
||||||
|
NM = @NM@
|
||||||
|
NMEDIT = @NMEDIT@
|
||||||
|
OBJDUMP = @OBJDUMP@
|
||||||
|
OBJEXT = @OBJEXT@
|
||||||
|
OTOOL = @OTOOL@
|
||||||
|
OTOOL64 = @OTOOL64@
|
||||||
|
PACKAGE = @PACKAGE@
|
||||||
|
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
|
||||||
|
PACKAGE_NAME = @PACKAGE_NAME@
|
||||||
|
PACKAGE_STRING = @PACKAGE_STRING@
|
||||||
|
PACKAGE_TARNAME = @PACKAGE_TARNAME@
|
||||||
|
PACKAGE_URL = @PACKAGE_URL@
|
||||||
|
PACKAGE_VERSION = @PACKAGE_VERSION@
|
||||||
|
PATH_SEPARATOR = @PATH_SEPARATOR@
|
||||||
|
PKG_CONFIG = @PKG_CONFIG@
|
||||||
|
PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@
|
||||||
|
PKG_CONFIG_PATH = @PKG_CONFIG_PATH@
|
||||||
|
RANLIB = @RANLIB@
|
||||||
|
SED = @SED@
|
||||||
|
SET_MAKE = @SET_MAKE@
|
||||||
|
SHELL = @SHELL@
|
||||||
|
STRIP = @STRIP@
|
||||||
|
VERSION = @VERSION@
|
||||||
|
XV_CFLAGS = @XV_CFLAGS@
|
||||||
|
XV_LIBS = @XV_LIBS@
|
||||||
|
abs_builddir = @abs_builddir@
|
||||||
|
abs_srcdir = @abs_srcdir@
|
||||||
|
abs_top_builddir = @abs_top_builddir@
|
||||||
|
abs_top_srcdir = @abs_top_srcdir@
|
||||||
|
ac_ct_AR = @ac_ct_AR@
|
||||||
|
ac_ct_CC = @ac_ct_CC@
|
||||||
|
ac_ct_CXX = @ac_ct_CXX@
|
||||||
|
ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
|
||||||
|
am__include = @am__include@
|
||||||
|
am__leading_dot = @am__leading_dot@
|
||||||
|
am__quote = @am__quote@
|
||||||
|
am__tar = @am__tar@
|
||||||
|
am__untar = @am__untar@
|
||||||
|
bindir = @bindir@
|
||||||
|
build = @build@
|
||||||
|
build_alias = @build_alias@
|
||||||
|
build_cpu = @build_cpu@
|
||||||
|
build_os = @build_os@
|
||||||
|
build_vendor = @build_vendor@
|
||||||
|
builddir = @builddir@
|
||||||
|
datadir = @datadir@
|
||||||
|
datarootdir = @datarootdir@
|
||||||
|
docdir = @docdir@
|
||||||
|
dvidir = @dvidir@
|
||||||
|
exec_prefix = @exec_prefix@
|
||||||
|
host = @host@
|
||||||
|
host_alias = @host_alias@
|
||||||
|
host_cpu = @host_cpu@
|
||||||
|
host_os = @host_os@
|
||||||
|
host_vendor = @host_vendor@
|
||||||
|
htmldir = @htmldir@
|
||||||
|
includedir = @includedir@
|
||||||
|
infodir = @infodir@
|
||||||
|
install_sh = @install_sh@
|
||||||
|
libdir = @libdir@
|
||||||
|
libexecdir = @libexecdir@
|
||||||
|
localedir = @localedir@
|
||||||
|
localstatedir = @localstatedir@
|
||||||
|
lt_age = @lt_age@
|
||||||
|
lt_major = @lt_major@
|
||||||
|
lt_revision = @lt_revision@
|
||||||
|
mandir = @mandir@
|
||||||
|
mkdir_p = @mkdir_p@
|
||||||
|
oldincludedir = @oldincludedir@
|
||||||
|
pdfdir = @pdfdir@
|
||||||
|
prefix = @prefix@
|
||||||
|
program_transform_name = @program_transform_name@
|
||||||
|
psdir = @psdir@
|
||||||
|
sbindir = @sbindir@
|
||||||
|
sharedstatedir = @sharedstatedir@
|
||||||
|
srcdir = @srcdir@
|
||||||
|
sysconfdir = @sysconfdir@
|
||||||
|
target_alias = @target_alias@
|
||||||
|
top_build_prefix = @top_build_prefix@
|
||||||
|
top_builddir = @top_builddir@
|
||||||
|
top_srcdir = @top_srcdir@
|
||||||
|
udev_rulesdir = @udev_rulesdir@
|
||||||
|
ACLOCAL_AMFLAGS = -I m4
|
||||||
|
EXTRA_DIST = THANKS TODO HACKING libfprint.pc.in
|
||||||
|
DISTCLEANFILES = ChangeLog libfprint.pc
|
||||||
|
SUBDIRS = libfprint doc $(am__append_1)
|
||||||
|
DIST_SUBDIRS = libfprint doc examples
|
||||||
|
DISTCHECK_CONFIGURE_FLAGS = --with-drivers=all --enable-examples-build --enable-x11-examples-build --with-udev-rules-dir='$${libdir}/udev/rules.d-distcheck'
|
||||||
|
pkgconfigdir = $(libdir)/pkgconfig
|
||||||
|
pkgconfig_DATA = libfprint.pc
|
||||||
|
all: config.h
|
||||||
|
$(MAKE) $(AM_MAKEFLAGS) all-recursive
|
||||||
|
|
||||||
|
.SUFFIXES:
|
||||||
|
am--refresh: Makefile
|
||||||
|
@:
|
||||||
|
$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
|
||||||
|
@for dep in $?; do \
|
||||||
|
case '$(am__configure_deps)' in \
|
||||||
|
*$$dep*) \
|
||||||
|
echo ' cd $(srcdir) && $(AUTOMAKE) --gnu'; \
|
||||||
|
$(am__cd) $(srcdir) && $(AUTOMAKE) --gnu \
|
||||||
|
&& exit 0; \
|
||||||
|
exit 1;; \
|
||||||
|
esac; \
|
||||||
|
done; \
|
||||||
|
echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu Makefile'; \
|
||||||
|
$(am__cd) $(top_srcdir) && \
|
||||||
|
$(AUTOMAKE) --gnu Makefile
|
||||||
|
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
|
||||||
|
@case '$?' in \
|
||||||
|
*config.status*) \
|
||||||
|
echo ' $(SHELL) ./config.status'; \
|
||||||
|
$(SHELL) ./config.status;; \
|
||||||
|
*) \
|
||||||
|
echo ' cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe)'; \
|
||||||
|
cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe);; \
|
||||||
|
esac;
|
||||||
|
|
||||||
|
$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
|
||||||
|
$(SHELL) ./config.status --recheck
|
||||||
|
|
||||||
|
$(top_srcdir)/configure: $(am__configure_deps)
|
||||||
|
$(am__cd) $(srcdir) && $(AUTOCONF)
|
||||||
|
$(ACLOCAL_M4): $(am__aclocal_m4_deps)
|
||||||
|
$(am__cd) $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS)
|
||||||
|
$(am__aclocal_m4_deps):
|
||||||
|
|
||||||
|
config.h: stamp-h1
|
||||||
|
@test -f $@ || rm -f stamp-h1
|
||||||
|
@test -f $@ || $(MAKE) $(AM_MAKEFLAGS) stamp-h1
|
||||||
|
|
||||||
|
stamp-h1: $(srcdir)/config.h.in $(top_builddir)/config.status
|
||||||
|
@rm -f stamp-h1
|
||||||
|
cd $(top_builddir) && $(SHELL) ./config.status config.h
|
||||||
|
$(srcdir)/config.h.in: $(am__configure_deps)
|
||||||
|
($(am__cd) $(top_srcdir) && $(AUTOHEADER))
|
||||||
|
rm -f stamp-h1
|
||||||
|
touch $@
|
||||||
|
|
||||||
|
distclean-hdr:
|
||||||
|
-rm -f config.h stamp-h1
|
||||||
|
libfprint.pc: $(top_builddir)/config.status $(srcdir)/libfprint.pc.in
|
||||||
|
cd $(top_builddir) && $(SHELL) ./config.status $@
|
||||||
|
|
||||||
|
mostlyclean-libtool:
|
||||||
|
-rm -f *.lo
|
||||||
|
|
||||||
|
clean-libtool:
|
||||||
|
-rm -rf .libs _libs
|
||||||
|
|
||||||
|
distclean-libtool:
|
||||||
|
-rm -f libtool config.lt
|
||||||
|
install-pkgconfigDATA: $(pkgconfig_DATA)
|
||||||
|
@$(NORMAL_INSTALL)
|
||||||
|
@list='$(pkgconfig_DATA)'; test -n "$(pkgconfigdir)" || list=; \
|
||||||
|
if test -n "$$list"; then \
|
||||||
|
echo " $(MKDIR_P) '$(DESTDIR)$(pkgconfigdir)'"; \
|
||||||
|
$(MKDIR_P) "$(DESTDIR)$(pkgconfigdir)" || exit 1; \
|
||||||
|
fi; \
|
||||||
|
for p in $$list; do \
|
||||||
|
if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
|
||||||
|
echo "$$d$$p"; \
|
||||||
|
done | $(am__base_list) | \
|
||||||
|
while read files; do \
|
||||||
|
echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(pkgconfigdir)'"; \
|
||||||
|
$(INSTALL_DATA) $$files "$(DESTDIR)$(pkgconfigdir)" || exit $$?; \
|
||||||
|
done
|
||||||
|
|
||||||
|
uninstall-pkgconfigDATA:
|
||||||
|
@$(NORMAL_UNINSTALL)
|
||||||
|
@list='$(pkgconfig_DATA)'; test -n "$(pkgconfigdir)" || list=; \
|
||||||
|
files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
|
||||||
|
dir='$(DESTDIR)$(pkgconfigdir)'; $(am__uninstall_files_from_dir)
|
||||||
|
|
||||||
|
# This directory's subdirectories are mostly independent; you can cd
|
||||||
|
# into them and run 'make' without going through this Makefile.
|
||||||
|
# To change the values of 'make' variables: instead of editing Makefiles,
|
||||||
|
# (1) if the variable is set in 'config.status', edit 'config.status'
|
||||||
|
# (which will cause the Makefiles to be regenerated when you run 'make');
|
||||||
|
# (2) otherwise, pass the desired values on the 'make' command line.
|
||||||
|
$(am__recursive_targets):
|
||||||
|
@fail=; \
|
||||||
|
if $(am__make_keepgoing); then \
|
||||||
|
failcom='fail=yes'; \
|
||||||
|
else \
|
||||||
|
failcom='exit 1'; \
|
||||||
|
fi; \
|
||||||
|
dot_seen=no; \
|
||||||
|
target=`echo $@ | sed s/-recursive//`; \
|
||||||
|
case "$@" in \
|
||||||
|
distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \
|
||||||
|
*) list='$(SUBDIRS)' ;; \
|
||||||
|
esac; \
|
||||||
|
for subdir in $$list; do \
|
||||||
|
echo "Making $$target in $$subdir"; \
|
||||||
|
if test "$$subdir" = "."; then \
|
||||||
|
dot_seen=yes; \
|
||||||
|
local_target="$$target-am"; \
|
||||||
|
else \
|
||||||
|
local_target="$$target"; \
|
||||||
|
fi; \
|
||||||
|
($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
|
||||||
|
|| eval $$failcom; \
|
||||||
|
done; \
|
||||||
|
if test "$$dot_seen" = "no"; then \
|
||||||
|
$(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \
|
||||||
|
fi; test -z "$$fail"
|
||||||
|
|
||||||
|
ID: $(am__tagged_files)
|
||||||
|
$(am__define_uniq_tagged_files); mkid -fID $$unique
|
||||||
|
tags: tags-recursive
|
||||||
|
TAGS: tags
|
||||||
|
|
||||||
|
tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
|
||||||
|
set x; \
|
||||||
|
here=`pwd`; \
|
||||||
|
if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \
|
||||||
|
include_option=--etags-include; \
|
||||||
|
empty_fix=.; \
|
||||||
|
else \
|
||||||
|
include_option=--include; \
|
||||||
|
empty_fix=; \
|
||||||
|
fi; \
|
||||||
|
list='$(SUBDIRS)'; for subdir in $$list; do \
|
||||||
|
if test "$$subdir" = .; then :; else \
|
||||||
|
test ! -f $$subdir/TAGS || \
|
||||||
|
set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \
|
||||||
|
fi; \
|
||||||
|
done; \
|
||||||
|
$(am__define_uniq_tagged_files); \
|
||||||
|
shift; \
|
||||||
|
if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
|
||||||
|
test -n "$$unique" || unique=$$empty_fix; \
|
||||||
|
if test $$# -gt 0; then \
|
||||||
|
$(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
|
||||||
|
"$$@" $$unique; \
|
||||||
|
else \
|
||||||
|
$(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
|
||||||
|
$$unique; \
|
||||||
|
fi; \
|
||||||
|
fi
|
||||||
|
ctags: ctags-recursive
|
||||||
|
|
||||||
|
CTAGS: ctags
|
||||||
|
ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
|
||||||
|
$(am__define_uniq_tagged_files); \
|
||||||
|
test -z "$(CTAGS_ARGS)$$unique" \
|
||||||
|
|| $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
|
||||||
|
$$unique
|
||||||
|
|
||||||
|
GTAGS:
|
||||||
|
here=`$(am__cd) $(top_builddir) && pwd` \
|
||||||
|
&& $(am__cd) $(top_srcdir) \
|
||||||
|
&& gtags -i $(GTAGS_ARGS) "$$here"
|
||||||
|
cscope: cscope.files
|
||||||
|
test ! -s cscope.files \
|
||||||
|
|| $(CSCOPE) -b -q $(AM_CSCOPEFLAGS) $(CSCOPEFLAGS) -i cscope.files $(CSCOPE_ARGS)
|
||||||
|
clean-cscope:
|
||||||
|
-rm -f cscope.files
|
||||||
|
cscope.files: clean-cscope cscopelist
|
||||||
|
cscopelist: cscopelist-recursive
|
||||||
|
|
||||||
|
cscopelist-am: $(am__tagged_files)
|
||||||
|
list='$(am__tagged_files)'; \
|
||||||
|
case "$(srcdir)" in \
|
||||||
|
[\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \
|
||||||
|
*) sdir=$(subdir)/$(srcdir) ;; \
|
||||||
|
esac; \
|
||||||
|
for i in $$list; do \
|
||||||
|
if test -f "$$i"; then \
|
||||||
|
echo "$(subdir)/$$i"; \
|
||||||
|
else \
|
||||||
|
echo "$$sdir/$$i"; \
|
||||||
|
fi; \
|
||||||
|
done >> $(top_builddir)/cscope.files
|
||||||
|
|
||||||
|
distclean-tags:
|
||||||
|
-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
|
||||||
|
-rm -f cscope.out cscope.in.out cscope.po.out cscope.files
|
||||||
|
|
||||||
|
distdir: $(DISTFILES)
|
||||||
|
@case `sed 15q $(srcdir)/NEWS` in \
|
||||||
|
*"$(VERSION)"*) : ;; \
|
||||||
|
*) \
|
||||||
|
echo "NEWS not updated; not releasing" 1>&2; \
|
||||||
|
exit 1;; \
|
||||||
|
esac
|
||||||
|
$(am__remove_distdir)
|
||||||
|
test -d "$(distdir)" || mkdir "$(distdir)"
|
||||||
|
@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
|
||||||
|
topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
|
||||||
|
list='$(DISTFILES)'; \
|
||||||
|
dist_files=`for file in $$list; do echo $$file; done | \
|
||||||
|
sed -e "s|^$$srcdirstrip/||;t" \
|
||||||
|
-e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
|
||||||
|
case $$dist_files in \
|
||||||
|
*/*) $(MKDIR_P) `echo "$$dist_files" | \
|
||||||
|
sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
|
||||||
|
sort -u` ;; \
|
||||||
|
esac; \
|
||||||
|
for file in $$dist_files; do \
|
||||||
|
if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
|
||||||
|
if test -d $$d/$$file; then \
|
||||||
|
dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
|
||||||
|
if test -d "$(distdir)/$$file"; then \
|
||||||
|
find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
|
||||||
|
fi; \
|
||||||
|
if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
|
||||||
|
cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
|
||||||
|
find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
|
||||||
|
fi; \
|
||||||
|
cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
|
||||||
|
else \
|
||||||
|
test -f "$(distdir)/$$file" \
|
||||||
|
|| cp -p $$d/$$file "$(distdir)/$$file" \
|
||||||
|
|| exit 1; \
|
||||||
|
fi; \
|
||||||
|
done
|
||||||
|
@list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
|
||||||
|
if test "$$subdir" = .; then :; else \
|
||||||
|
$(am__make_dryrun) \
|
||||||
|
|| test -d "$(distdir)/$$subdir" \
|
||||||
|
|| $(MKDIR_P) "$(distdir)/$$subdir" \
|
||||||
|
|| exit 1; \
|
||||||
|
dir1=$$subdir; dir2="$(distdir)/$$subdir"; \
|
||||||
|
$(am__relativize); \
|
||||||
|
new_distdir=$$reldir; \
|
||||||
|
dir1=$$subdir; dir2="$(top_distdir)"; \
|
||||||
|
$(am__relativize); \
|
||||||
|
new_top_distdir=$$reldir; \
|
||||||
|
echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \
|
||||||
|
echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \
|
||||||
|
($(am__cd) $$subdir && \
|
||||||
|
$(MAKE) $(AM_MAKEFLAGS) \
|
||||||
|
top_distdir="$$new_top_distdir" \
|
||||||
|
distdir="$$new_distdir" \
|
||||||
|
am__remove_distdir=: \
|
||||||
|
am__skip_length_check=: \
|
||||||
|
am__skip_mode_fix=: \
|
||||||
|
distdir) \
|
||||||
|
|| exit 1; \
|
||||||
|
fi; \
|
||||||
|
done
|
||||||
|
$(MAKE) $(AM_MAKEFLAGS) \
|
||||||
|
top_distdir="$(top_distdir)" distdir="$(distdir)" \
|
||||||
|
dist-hook
|
||||||
|
-test -n "$(am__skip_mode_fix)" \
|
||||||
|
|| find "$(distdir)" -type d ! -perm -755 \
|
||||||
|
-exec chmod u+rwx,go+rx {} \; -o \
|
||||||
|
! -type d ! -perm -444 -links 1 -exec chmod a+r {} \; -o \
|
||||||
|
! -type d ! -perm -400 -exec chmod a+r {} \; -o \
|
||||||
|
! -type d ! -perm -444 -exec $(install_sh) -c -m a+r {} {} \; \
|
||||||
|
|| chmod -R a+r "$(distdir)"
|
||||||
|
dist-gzip: distdir
|
||||||
|
tardir=$(distdir) && $(am__tar) | eval GZIP= gzip $(GZIP_ENV) -c >$(distdir).tar.gz
|
||||||
|
$(am__post_remove_distdir)
|
||||||
|
|
||||||
|
dist-bzip2: distdir
|
||||||
|
tardir=$(distdir) && $(am__tar) | BZIP2=$${BZIP2--9} bzip2 -c >$(distdir).tar.bz2
|
||||||
|
$(am__post_remove_distdir)
|
||||||
|
|
||||||
|
dist-lzip: distdir
|
||||||
|
tardir=$(distdir) && $(am__tar) | lzip -c $${LZIP_OPT--9} >$(distdir).tar.lz
|
||||||
|
$(am__post_remove_distdir)
|
||||||
|
dist-xz: distdir
|
||||||
|
tardir=$(distdir) && $(am__tar) | XZ_OPT=$${XZ_OPT--e} xz -c >$(distdir).tar.xz
|
||||||
|
$(am__post_remove_distdir)
|
||||||
|
|
||||||
|
dist-tarZ: distdir
|
||||||
|
@echo WARNING: "Support for distribution archives compressed with" \
|
||||||
|
"legacy program 'compress' is deprecated." >&2
|
||||||
|
@echo WARNING: "It will be removed altogether in Automake 2.0" >&2
|
||||||
|
tardir=$(distdir) && $(am__tar) | compress -c >$(distdir).tar.Z
|
||||||
|
$(am__post_remove_distdir)
|
||||||
|
|
||||||
|
dist-shar: distdir
|
||||||
|
@echo WARNING: "Support for shar distribution archives is" \
|
||||||
|
"deprecated." >&2
|
||||||
|
@echo WARNING: "It will be removed altogether in Automake 2.0" >&2
|
||||||
|
shar $(distdir) | eval GZIP= gzip $(GZIP_ENV) -c >$(distdir).shar.gz
|
||||||
|
$(am__post_remove_distdir)
|
||||||
|
|
||||||
|
dist-zip: distdir
|
||||||
|
-rm -f $(distdir).zip
|
||||||
|
zip -rq $(distdir).zip $(distdir)
|
||||||
|
$(am__post_remove_distdir)
|
||||||
|
|
||||||
|
dist dist-all:
|
||||||
|
$(MAKE) $(AM_MAKEFLAGS) $(DIST_TARGETS) am__post_remove_distdir='@:'
|
||||||
|
$(am__post_remove_distdir)
|
||||||
|
|
||||||
|
# This target untars the dist file and tries a VPATH configuration. Then
|
||||||
|
# it guarantees that the distribution is self-contained by making another
|
||||||
|
# tarfile.
|
||||||
|
distcheck: dist
|
||||||
|
case '$(DIST_ARCHIVES)' in \
|
||||||
|
*.tar.gz*) \
|
||||||
|
eval GZIP= gzip $(GZIP_ENV) -dc $(distdir).tar.gz | $(am__untar) ;;\
|
||||||
|
*.tar.bz2*) \
|
||||||
|
bzip2 -dc $(distdir).tar.bz2 | $(am__untar) ;;\
|
||||||
|
*.tar.lz*) \
|
||||||
|
lzip -dc $(distdir).tar.lz | $(am__untar) ;;\
|
||||||
|
*.tar.xz*) \
|
||||||
|
xz -dc $(distdir).tar.xz | $(am__untar) ;;\
|
||||||
|
*.tar.Z*) \
|
||||||
|
uncompress -c $(distdir).tar.Z | $(am__untar) ;;\
|
||||||
|
*.shar.gz*) \
|
||||||
|
eval GZIP= gzip $(GZIP_ENV) -dc $(distdir).shar.gz | unshar ;;\
|
||||||
|
*.zip*) \
|
||||||
|
unzip $(distdir).zip ;;\
|
||||||
|
esac
|
||||||
|
chmod -R a-w $(distdir)
|
||||||
|
chmod u+w $(distdir)
|
||||||
|
mkdir $(distdir)/_build $(distdir)/_build/sub $(distdir)/_inst
|
||||||
|
chmod a-w $(distdir)
|
||||||
|
test -d $(distdir)/_build || exit 0; \
|
||||||
|
dc_install_base=`$(am__cd) $(distdir)/_inst && pwd | sed -e 's,^[^:\\/]:[\\/],/,'` \
|
||||||
|
&& dc_destdir="$${TMPDIR-/tmp}/am-dc-$$$$/" \
|
||||||
|
&& am__cwd=`pwd` \
|
||||||
|
&& $(am__cd) $(distdir)/_build/sub \
|
||||||
|
&& ../../configure \
|
||||||
|
$(AM_DISTCHECK_CONFIGURE_FLAGS) \
|
||||||
|
$(DISTCHECK_CONFIGURE_FLAGS) \
|
||||||
|
--srcdir=../.. --prefix="$$dc_install_base" \
|
||||||
|
&& $(MAKE) $(AM_MAKEFLAGS) \
|
||||||
|
&& $(MAKE) $(AM_MAKEFLAGS) dvi \
|
||||||
|
&& $(MAKE) $(AM_MAKEFLAGS) check \
|
||||||
|
&& $(MAKE) $(AM_MAKEFLAGS) install \
|
||||||
|
&& $(MAKE) $(AM_MAKEFLAGS) installcheck \
|
||||||
|
&& $(MAKE) $(AM_MAKEFLAGS) uninstall \
|
||||||
|
&& $(MAKE) $(AM_MAKEFLAGS) distuninstallcheck_dir="$$dc_install_base" \
|
||||||
|
distuninstallcheck \
|
||||||
|
&& chmod -R a-w "$$dc_install_base" \
|
||||||
|
&& ({ \
|
||||||
|
(cd ../.. && umask 077 && mkdir "$$dc_destdir") \
|
||||||
|
&& $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" install \
|
||||||
|
&& $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" uninstall \
|
||||||
|
&& $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" \
|
||||||
|
distuninstallcheck_dir="$$dc_destdir" distuninstallcheck; \
|
||||||
|
} || { rm -rf "$$dc_destdir"; exit 1; }) \
|
||||||
|
&& rm -rf "$$dc_destdir" \
|
||||||
|
&& $(MAKE) $(AM_MAKEFLAGS) dist \
|
||||||
|
&& rm -rf $(DIST_ARCHIVES) \
|
||||||
|
&& $(MAKE) $(AM_MAKEFLAGS) distcleancheck \
|
||||||
|
&& cd "$$am__cwd" \
|
||||||
|
|| exit 1
|
||||||
|
$(am__post_remove_distdir)
|
||||||
|
@(echo "$(distdir) archives ready for distribution: "; \
|
||||||
|
list='$(DIST_ARCHIVES)'; for i in $$list; do echo $$i; done) | \
|
||||||
|
sed -e 1h -e 1s/./=/g -e 1p -e 1x -e '$$p' -e '$$x'
|
||||||
|
distuninstallcheck:
|
||||||
|
@test -n '$(distuninstallcheck_dir)' || { \
|
||||||
|
echo 'ERROR: trying to run $@ with an empty' \
|
||||||
|
'$$(distuninstallcheck_dir)' >&2; \
|
||||||
|
exit 1; \
|
||||||
|
}; \
|
||||||
|
$(am__cd) '$(distuninstallcheck_dir)' || { \
|
||||||
|
echo 'ERROR: cannot chdir into $(distuninstallcheck_dir)' >&2; \
|
||||||
|
exit 1; \
|
||||||
|
}; \
|
||||||
|
test `$(am__distuninstallcheck_listfiles) | wc -l` -eq 0 \
|
||||||
|
|| { echo "ERROR: files left after uninstall:" ; \
|
||||||
|
if test -n "$(DESTDIR)"; then \
|
||||||
|
echo " (check DESTDIR support)"; \
|
||||||
|
fi ; \
|
||||||
|
$(distuninstallcheck_listfiles) ; \
|
||||||
|
exit 1; } >&2
|
||||||
|
distcleancheck: distclean
|
||||||
|
@if test '$(srcdir)' = . ; then \
|
||||||
|
echo "ERROR: distcleancheck can only run from a VPATH build" ; \
|
||||||
|
exit 1 ; \
|
||||||
|
fi
|
||||||
|
@test `$(distcleancheck_listfiles) | wc -l` -eq 0 \
|
||||||
|
|| { echo "ERROR: files left in build directory after distclean:" ; \
|
||||||
|
$(distcleancheck_listfiles) ; \
|
||||||
|
exit 1; } >&2
|
||||||
|
check-am: all-am
|
||||||
|
check: check-recursive
|
||||||
|
all-am: Makefile $(DATA) config.h
|
||||||
|
installdirs: installdirs-recursive
|
||||||
|
installdirs-am:
|
||||||
|
for dir in "$(DESTDIR)$(pkgconfigdir)"; do \
|
||||||
|
test -z "$$dir" || $(MKDIR_P) "$$dir"; \
|
||||||
|
done
|
||||||
|
install: install-recursive
|
||||||
|
install-exec: install-exec-recursive
|
||||||
|
install-data: install-data-recursive
|
||||||
|
uninstall: uninstall-recursive
|
||||||
|
|
||||||
|
install-am: all-am
|
||||||
|
@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
|
||||||
|
|
||||||
|
installcheck: installcheck-recursive
|
||||||
|
install-strip:
|
||||||
|
if test -z '$(STRIP)'; then \
|
||||||
|
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
|
||||||
|
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
|
||||||
|
install; \
|
||||||
|
else \
|
||||||
|
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
|
||||||
|
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
|
||||||
|
"INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
|
||||||
|
fi
|
||||||
|
mostlyclean-generic:
|
||||||
|
|
||||||
|
clean-generic:
|
||||||
|
|
||||||
|
distclean-generic:
|
||||||
|
-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
|
||||||
|
-test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
|
||||||
|
-test -z "$(DISTCLEANFILES)" || rm -f $(DISTCLEANFILES)
|
||||||
|
|
||||||
|
maintainer-clean-generic:
|
||||||
|
@echo "This command is intended for maintainers to use"
|
||||||
|
@echo "it deletes files that may require special tools to rebuild."
|
||||||
|
clean: clean-recursive
|
||||||
|
|
||||||
|
clean-am: clean-generic clean-libtool mostlyclean-am
|
||||||
|
|
||||||
|
distclean: distclean-recursive
|
||||||
|
-rm -f $(am__CONFIG_DISTCLEAN_FILES)
|
||||||
|
-rm -f Makefile
|
||||||
|
distclean-am: clean-am distclean-generic distclean-hdr \
|
||||||
|
distclean-libtool distclean-tags
|
||||||
|
|
||||||
|
dvi: dvi-recursive
|
||||||
|
|
||||||
|
dvi-am:
|
||||||
|
|
||||||
|
html: html-recursive
|
||||||
|
|
||||||
|
html-am:
|
||||||
|
|
||||||
|
info: info-recursive
|
||||||
|
|
||||||
|
info-am:
|
||||||
|
|
||||||
|
install-data-am: install-pkgconfigDATA
|
||||||
|
|
||||||
|
install-dvi: install-dvi-recursive
|
||||||
|
|
||||||
|
install-dvi-am:
|
||||||
|
|
||||||
|
install-exec-am:
|
||||||
|
|
||||||
|
install-html: install-html-recursive
|
||||||
|
|
||||||
|
install-html-am:
|
||||||
|
|
||||||
|
install-info: install-info-recursive
|
||||||
|
|
||||||
|
install-info-am:
|
||||||
|
|
||||||
|
install-man:
|
||||||
|
|
||||||
|
install-pdf: install-pdf-recursive
|
||||||
|
|
||||||
|
install-pdf-am:
|
||||||
|
|
||||||
|
install-ps: install-ps-recursive
|
||||||
|
|
||||||
|
install-ps-am:
|
||||||
|
|
||||||
|
installcheck-am:
|
||||||
|
|
||||||
|
maintainer-clean: maintainer-clean-recursive
|
||||||
|
-rm -f $(am__CONFIG_DISTCLEAN_FILES)
|
||||||
|
-rm -rf $(top_srcdir)/autom4te.cache
|
||||||
|
-rm -f Makefile
|
||||||
|
maintainer-clean-am: distclean-am maintainer-clean-generic
|
||||||
|
|
||||||
|
mostlyclean: mostlyclean-recursive
|
||||||
|
|
||||||
|
mostlyclean-am: mostlyclean-generic mostlyclean-libtool
|
||||||
|
|
||||||
|
pdf: pdf-recursive
|
||||||
|
|
||||||
|
pdf-am:
|
||||||
|
|
||||||
|
ps: ps-recursive
|
||||||
|
|
||||||
|
ps-am:
|
||||||
|
|
||||||
|
uninstall-am: uninstall-pkgconfigDATA
|
||||||
|
|
||||||
|
.MAKE: $(am__recursive_targets) all install-am install-strip
|
||||||
|
|
||||||
|
.PHONY: $(am__recursive_targets) CTAGS GTAGS TAGS all all-am \
|
||||||
|
am--refresh check check-am clean clean-cscope clean-generic \
|
||||||
|
clean-libtool cscope cscopelist-am ctags ctags-am dist \
|
||||||
|
dist-all dist-bzip2 dist-gzip dist-hook dist-lzip dist-shar \
|
||||||
|
dist-tarZ dist-xz dist-zip distcheck distclean \
|
||||||
|
distclean-generic distclean-hdr distclean-libtool \
|
||||||
|
distclean-tags distcleancheck distdir distuninstallcheck dvi \
|
||||||
|
dvi-am html html-am info info-am install install-am \
|
||||||
|
install-data install-data-am install-dvi install-dvi-am \
|
||||||
|
install-exec install-exec-am install-html install-html-am \
|
||||||
|
install-info install-info-am install-man install-pdf \
|
||||||
|
install-pdf-am install-pkgconfigDATA install-ps install-ps-am \
|
||||||
|
install-strip installcheck installcheck-am installdirs \
|
||||||
|
installdirs-am maintainer-clean maintainer-clean-generic \
|
||||||
|
mostlyclean mostlyclean-generic mostlyclean-libtool pdf pdf-am \
|
||||||
|
ps ps-am tags tags-am uninstall uninstall-am \
|
||||||
|
uninstall-pkgconfigDATA
|
||||||
|
|
||||||
|
.PRECIOUS: Makefile
|
||||||
|
|
||||||
|
|
||||||
|
.PHONY: ChangeLog dist-up
|
||||||
|
ChangeLog:
|
||||||
|
git --git-dir $(top_srcdir)/.git log > ChangeLog || touch ChangeLog
|
||||||
|
|
||||||
|
dist-hook: ChangeLog
|
||||||
|
|
||||||
|
dist-up: dist
|
||||||
|
rsync $(distdir).tar.bz2 frs.sourceforge.net:uploads/
|
||||||
|
|
||||||
|
# Tell versions [3.59,3.63) of GNU make to not export all variables.
|
||||||
|
# Otherwise a system limit (for SysV at least) may be exceeded.
|
||||||
|
.NOEXPORT:
|
||||||
@@ -1,6 +1,28 @@
|
|||||||
This file lists notable changes in each release. For the full history of all
|
This file lists notable changes in each release. For the full history of all
|
||||||
changes, see ChangeLog.
|
changes, see ChangeLog.
|
||||||
|
|
||||||
|
2017-05-14: v0.7.0 release
|
||||||
|
* Drivers:
|
||||||
|
- Add VFS0050 driver
|
||||||
|
- Fix possible crash in AES3500 and AES4000
|
||||||
|
- Fix broken enrollment in VFS101
|
||||||
|
- Better verification with small sensor scanners
|
||||||
|
- Plenty of fixes in VFS5011
|
||||||
|
- Fix memory corruption in AES1610
|
||||||
|
- Improve calibration settings for AES1610
|
||||||
|
- Improve image assembling in upeksonly driver
|
||||||
|
- Autodetect whether image is encrypted in uru4k
|
||||||
|
|
||||||
|
* Library:
|
||||||
|
- NBIS: Remove false minutia at the edge of partial image
|
||||||
|
- Introduce routines to assemble image from lines (used in VFS5011 and upeksonly)
|
||||||
|
- Fix a bug that can cause driver state machine to enter into endless loop.
|
||||||
|
|
||||||
|
* Udev rules:
|
||||||
|
- Add driver name to the USB properties
|
||||||
|
|
||||||
|
* Plenty of build fixes
|
||||||
|
|
||||||
2015-02-03: v0.6.0 release
|
2015-02-03: v0.6.0 release
|
||||||
|
|
||||||
* Drivers:
|
* Drivers:
|
||||||
|
|||||||
Vendored
+1433
File diff suppressed because it is too large
Load Diff
-10
@@ -1,10 +0,0 @@
|
|||||||
#!/bin/sh
|
|
||||||
libtoolize --copy --force || exit 1
|
|
||||||
aclocal || exit 1
|
|
||||||
autoheader || exit 1
|
|
||||||
autoconf || exit 1
|
|
||||||
automake -a -c || exit 1
|
|
||||||
if test -z "$NOCONFIGURE"; then
|
|
||||||
exec ./configure --enable-maintainer-mode --enable-examples-build \
|
|
||||||
--enable-x11-examples-build --enable-debug-log $*
|
|
||||||
fi
|
|
||||||
@@ -0,0 +1,347 @@
|
|||||||
|
#! /bin/sh
|
||||||
|
# Wrapper for compilers which do not understand '-c -o'.
|
||||||
|
|
||||||
|
scriptversion=2012-10-14.11; # UTC
|
||||||
|
|
||||||
|
# Copyright (C) 1999-2014 Free Software Foundation, Inc.
|
||||||
|
# Written by Tom Tromey <tromey@cygnus.com>.
|
||||||
|
#
|
||||||
|
# This program is free software; you can redistribute it and/or modify
|
||||||
|
# it under the terms of the GNU General Public License as published by
|
||||||
|
# the Free Software Foundation; either version 2, or (at your option)
|
||||||
|
# any later version.
|
||||||
|
#
|
||||||
|
# This program is distributed in the hope that it will be useful,
|
||||||
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
# GNU General Public License for more details.
|
||||||
|
#
|
||||||
|
# You should have received a copy of the GNU General Public License
|
||||||
|
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
# As a special exception to the GNU General Public License, if you
|
||||||
|
# distribute this file as part of a program that contains a
|
||||||
|
# configuration script generated by Autoconf, you may include it under
|
||||||
|
# the same distribution terms that you use for the rest of that program.
|
||||||
|
|
||||||
|
# This file is maintained in Automake, please report
|
||||||
|
# bugs to <bug-automake@gnu.org> or send patches to
|
||||||
|
# <automake-patches@gnu.org>.
|
||||||
|
|
||||||
|
nl='
|
||||||
|
'
|
||||||
|
|
||||||
|
# We need space, tab and new line, in precisely that order. Quoting is
|
||||||
|
# there to prevent tools from complaining about whitespace usage.
|
||||||
|
IFS=" "" $nl"
|
||||||
|
|
||||||
|
file_conv=
|
||||||
|
|
||||||
|
# func_file_conv build_file lazy
|
||||||
|
# Convert a $build file to $host form and store it in $file
|
||||||
|
# Currently only supports Windows hosts. If the determined conversion
|
||||||
|
# type is listed in (the comma separated) LAZY, no conversion will
|
||||||
|
# take place.
|
||||||
|
func_file_conv ()
|
||||||
|
{
|
||||||
|
file=$1
|
||||||
|
case $file in
|
||||||
|
/ | /[!/]*) # absolute file, and not a UNC file
|
||||||
|
if test -z "$file_conv"; then
|
||||||
|
# lazily determine how to convert abs files
|
||||||
|
case `uname -s` in
|
||||||
|
MINGW*)
|
||||||
|
file_conv=mingw
|
||||||
|
;;
|
||||||
|
CYGWIN*)
|
||||||
|
file_conv=cygwin
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
file_conv=wine
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
fi
|
||||||
|
case $file_conv/,$2, in
|
||||||
|
*,$file_conv,*)
|
||||||
|
;;
|
||||||
|
mingw/*)
|
||||||
|
file=`cmd //C echo "$file " | sed -e 's/"\(.*\) " *$/\1/'`
|
||||||
|
;;
|
||||||
|
cygwin/*)
|
||||||
|
file=`cygpath -m "$file" || echo "$file"`
|
||||||
|
;;
|
||||||
|
wine/*)
|
||||||
|
file=`winepath -w "$file" || echo "$file"`
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
}
|
||||||
|
|
||||||
|
# func_cl_dashL linkdir
|
||||||
|
# Make cl look for libraries in LINKDIR
|
||||||
|
func_cl_dashL ()
|
||||||
|
{
|
||||||
|
func_file_conv "$1"
|
||||||
|
if test -z "$lib_path"; then
|
||||||
|
lib_path=$file
|
||||||
|
else
|
||||||
|
lib_path="$lib_path;$file"
|
||||||
|
fi
|
||||||
|
linker_opts="$linker_opts -LIBPATH:$file"
|
||||||
|
}
|
||||||
|
|
||||||
|
# func_cl_dashl library
|
||||||
|
# Do a library search-path lookup for cl
|
||||||
|
func_cl_dashl ()
|
||||||
|
{
|
||||||
|
lib=$1
|
||||||
|
found=no
|
||||||
|
save_IFS=$IFS
|
||||||
|
IFS=';'
|
||||||
|
for dir in $lib_path $LIB
|
||||||
|
do
|
||||||
|
IFS=$save_IFS
|
||||||
|
if $shared && test -f "$dir/$lib.dll.lib"; then
|
||||||
|
found=yes
|
||||||
|
lib=$dir/$lib.dll.lib
|
||||||
|
break
|
||||||
|
fi
|
||||||
|
if test -f "$dir/$lib.lib"; then
|
||||||
|
found=yes
|
||||||
|
lib=$dir/$lib.lib
|
||||||
|
break
|
||||||
|
fi
|
||||||
|
if test -f "$dir/lib$lib.a"; then
|
||||||
|
found=yes
|
||||||
|
lib=$dir/lib$lib.a
|
||||||
|
break
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
IFS=$save_IFS
|
||||||
|
|
||||||
|
if test "$found" != yes; then
|
||||||
|
lib=$lib.lib
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
# func_cl_wrapper cl arg...
|
||||||
|
# Adjust compile command to suit cl
|
||||||
|
func_cl_wrapper ()
|
||||||
|
{
|
||||||
|
# Assume a capable shell
|
||||||
|
lib_path=
|
||||||
|
shared=:
|
||||||
|
linker_opts=
|
||||||
|
for arg
|
||||||
|
do
|
||||||
|
if test -n "$eat"; then
|
||||||
|
eat=
|
||||||
|
else
|
||||||
|
case $1 in
|
||||||
|
-o)
|
||||||
|
# configure might choose to run compile as 'compile cc -o foo foo.c'.
|
||||||
|
eat=1
|
||||||
|
case $2 in
|
||||||
|
*.o | *.[oO][bB][jJ])
|
||||||
|
func_file_conv "$2"
|
||||||
|
set x "$@" -Fo"$file"
|
||||||
|
shift
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
func_file_conv "$2"
|
||||||
|
set x "$@" -Fe"$file"
|
||||||
|
shift
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
;;
|
||||||
|
-I)
|
||||||
|
eat=1
|
||||||
|
func_file_conv "$2" mingw
|
||||||
|
set x "$@" -I"$file"
|
||||||
|
shift
|
||||||
|
;;
|
||||||
|
-I*)
|
||||||
|
func_file_conv "${1#-I}" mingw
|
||||||
|
set x "$@" -I"$file"
|
||||||
|
shift
|
||||||
|
;;
|
||||||
|
-l)
|
||||||
|
eat=1
|
||||||
|
func_cl_dashl "$2"
|
||||||
|
set x "$@" "$lib"
|
||||||
|
shift
|
||||||
|
;;
|
||||||
|
-l*)
|
||||||
|
func_cl_dashl "${1#-l}"
|
||||||
|
set x "$@" "$lib"
|
||||||
|
shift
|
||||||
|
;;
|
||||||
|
-L)
|
||||||
|
eat=1
|
||||||
|
func_cl_dashL "$2"
|
||||||
|
;;
|
||||||
|
-L*)
|
||||||
|
func_cl_dashL "${1#-L}"
|
||||||
|
;;
|
||||||
|
-static)
|
||||||
|
shared=false
|
||||||
|
;;
|
||||||
|
-Wl,*)
|
||||||
|
arg=${1#-Wl,}
|
||||||
|
save_ifs="$IFS"; IFS=','
|
||||||
|
for flag in $arg; do
|
||||||
|
IFS="$save_ifs"
|
||||||
|
linker_opts="$linker_opts $flag"
|
||||||
|
done
|
||||||
|
IFS="$save_ifs"
|
||||||
|
;;
|
||||||
|
-Xlinker)
|
||||||
|
eat=1
|
||||||
|
linker_opts="$linker_opts $2"
|
||||||
|
;;
|
||||||
|
-*)
|
||||||
|
set x "$@" "$1"
|
||||||
|
shift
|
||||||
|
;;
|
||||||
|
*.cc | *.CC | *.cxx | *.CXX | *.[cC]++)
|
||||||
|
func_file_conv "$1"
|
||||||
|
set x "$@" -Tp"$file"
|
||||||
|
shift
|
||||||
|
;;
|
||||||
|
*.c | *.cpp | *.CPP | *.lib | *.LIB | *.Lib | *.OBJ | *.obj | *.[oO])
|
||||||
|
func_file_conv "$1" mingw
|
||||||
|
set x "$@" "$file"
|
||||||
|
shift
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
set x "$@" "$1"
|
||||||
|
shift
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
fi
|
||||||
|
shift
|
||||||
|
done
|
||||||
|
if test -n "$linker_opts"; then
|
||||||
|
linker_opts="-link$linker_opts"
|
||||||
|
fi
|
||||||
|
exec "$@" $linker_opts
|
||||||
|
exit 1
|
||||||
|
}
|
||||||
|
|
||||||
|
eat=
|
||||||
|
|
||||||
|
case $1 in
|
||||||
|
'')
|
||||||
|
echo "$0: No command. Try '$0 --help' for more information." 1>&2
|
||||||
|
exit 1;
|
||||||
|
;;
|
||||||
|
-h | --h*)
|
||||||
|
cat <<\EOF
|
||||||
|
Usage: compile [--help] [--version] PROGRAM [ARGS]
|
||||||
|
|
||||||
|
Wrapper for compilers which do not understand '-c -o'.
|
||||||
|
Remove '-o dest.o' from ARGS, run PROGRAM with the remaining
|
||||||
|
arguments, and rename the output as expected.
|
||||||
|
|
||||||
|
If you are trying to build a whole package this is not the
|
||||||
|
right script to run: please start by reading the file 'INSTALL'.
|
||||||
|
|
||||||
|
Report bugs to <bug-automake@gnu.org>.
|
||||||
|
EOF
|
||||||
|
exit $?
|
||||||
|
;;
|
||||||
|
-v | --v*)
|
||||||
|
echo "compile $scriptversion"
|
||||||
|
exit $?
|
||||||
|
;;
|
||||||
|
cl | *[/\\]cl | cl.exe | *[/\\]cl.exe )
|
||||||
|
func_cl_wrapper "$@" # Doesn't return...
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
ofile=
|
||||||
|
cfile=
|
||||||
|
|
||||||
|
for arg
|
||||||
|
do
|
||||||
|
if test -n "$eat"; then
|
||||||
|
eat=
|
||||||
|
else
|
||||||
|
case $1 in
|
||||||
|
-o)
|
||||||
|
# configure might choose to run compile as 'compile cc -o foo foo.c'.
|
||||||
|
# So we strip '-o arg' only if arg is an object.
|
||||||
|
eat=1
|
||||||
|
case $2 in
|
||||||
|
*.o | *.obj)
|
||||||
|
ofile=$2
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
set x "$@" -o "$2"
|
||||||
|
shift
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
;;
|
||||||
|
*.c)
|
||||||
|
cfile=$1
|
||||||
|
set x "$@" "$1"
|
||||||
|
shift
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
set x "$@" "$1"
|
||||||
|
shift
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
fi
|
||||||
|
shift
|
||||||
|
done
|
||||||
|
|
||||||
|
if test -z "$ofile" || test -z "$cfile"; then
|
||||||
|
# If no '-o' option was seen then we might have been invoked from a
|
||||||
|
# pattern rule where we don't need one. That is ok -- this is a
|
||||||
|
# normal compilation that the losing compiler can handle. If no
|
||||||
|
# '.c' file was seen then we are probably linking. That is also
|
||||||
|
# ok.
|
||||||
|
exec "$@"
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Name of file we expect compiler to create.
|
||||||
|
cofile=`echo "$cfile" | sed 's|^.*[\\/]||; s|^[a-zA-Z]:||; s/\.c$/.o/'`
|
||||||
|
|
||||||
|
# Create the lock directory.
|
||||||
|
# Note: use '[/\\:.-]' here to ensure that we don't use the same name
|
||||||
|
# that we are using for the .o file. Also, base the name on the expected
|
||||||
|
# object file name, since that is what matters with a parallel build.
|
||||||
|
lockdir=`echo "$cofile" | sed -e 's|[/\\:.-]|_|g'`.d
|
||||||
|
while true; do
|
||||||
|
if mkdir "$lockdir" >/dev/null 2>&1; then
|
||||||
|
break
|
||||||
|
fi
|
||||||
|
sleep 1
|
||||||
|
done
|
||||||
|
# FIXME: race condition here if user kills between mkdir and trap.
|
||||||
|
trap "rmdir '$lockdir'; exit 1" 1 2 15
|
||||||
|
|
||||||
|
# Run the compile.
|
||||||
|
"$@"
|
||||||
|
ret=$?
|
||||||
|
|
||||||
|
if test -f "$cofile"; then
|
||||||
|
test "$cofile" = "$ofile" || mv "$cofile" "$ofile"
|
||||||
|
elif test -f "${cofile}bj"; then
|
||||||
|
test "${cofile}bj" = "$ofile" || mv "${cofile}bj" "$ofile"
|
||||||
|
fi
|
||||||
|
|
||||||
|
rmdir "$lockdir"
|
||||||
|
exit $ret
|
||||||
|
|
||||||
|
# Local Variables:
|
||||||
|
# mode: shell-script
|
||||||
|
# sh-indentation: 2
|
||||||
|
# eval: (add-hook 'write-file-hooks 'time-stamp)
|
||||||
|
# time-stamp-start: "scriptversion="
|
||||||
|
# time-stamp-format: "%:y-%02m-%02d.%02H"
|
||||||
|
# time-stamp-time-zone: "UTC"
|
||||||
|
# time-stamp-end: "; # UTC"
|
||||||
|
# End:
|
||||||
+1530
File diff suppressed because it is too large
Load Diff
+142
@@ -0,0 +1,142 @@
|
|||||||
|
/* config.h.in. Generated from configure.ac by autoheader. */
|
||||||
|
|
||||||
|
/* Default visibility */
|
||||||
|
#undef API_EXPORTED
|
||||||
|
|
||||||
|
/* Build AuthenTec AES1610 driver */
|
||||||
|
#undef ENABLE_AES1610
|
||||||
|
|
||||||
|
/* Build AuthenTec AES1660 driver */
|
||||||
|
#undef ENABLE_AES1660
|
||||||
|
|
||||||
|
/* Build AuthenTec AES2501 driver */
|
||||||
|
#undef ENABLE_AES2501
|
||||||
|
|
||||||
|
/* Build AuthenTec AES2550/AES2810 driver */
|
||||||
|
#undef ENABLE_AES2550
|
||||||
|
|
||||||
|
/* Build AuthenTec AES1660 driver */
|
||||||
|
#undef ENABLE_AES2660
|
||||||
|
|
||||||
|
/* Build AuthenTec AES3500 driver */
|
||||||
|
#undef ENABLE_AES3500
|
||||||
|
|
||||||
|
/* Build AuthenTec AES4000 driver */
|
||||||
|
#undef ENABLE_AES4000
|
||||||
|
|
||||||
|
/* Debug message logging */
|
||||||
|
#undef ENABLE_DEBUG_LOGGING
|
||||||
|
|
||||||
|
/* Build EgisTec ES603 driver */
|
||||||
|
#undef ENABLE_ETES603
|
||||||
|
|
||||||
|
/* Build Secugen FDU 2000 driver */
|
||||||
|
#undef ENABLE_FDU2000
|
||||||
|
|
||||||
|
/* Message logging */
|
||||||
|
#undef ENABLE_LOGGING
|
||||||
|
|
||||||
|
/* Build UPEK Eikon 2 */
|
||||||
|
#undef ENABLE_UPEKE2
|
||||||
|
|
||||||
|
/* Build UPEK TouchStrip sensor-only driver */
|
||||||
|
#undef ENABLE_UPEKSONLY
|
||||||
|
|
||||||
|
/* Build UPEK TouchChip driver */
|
||||||
|
#undef ENABLE_UPEKTC
|
||||||
|
|
||||||
|
/* Build Upek TouchChip Fingerprint Coprocessor driver */
|
||||||
|
#undef ENABLE_UPEKTC_IMG
|
||||||
|
|
||||||
|
/* Build UPEK TouchStrip driver */
|
||||||
|
#undef ENABLE_UPEKTS
|
||||||
|
|
||||||
|
/* Build Digital Persona U.are.U 4000 driver */
|
||||||
|
#undef ENABLE_URU4000
|
||||||
|
|
||||||
|
/* Build Veridicom 5thSense driver */
|
||||||
|
#undef ENABLE_VCOM5S
|
||||||
|
|
||||||
|
/* Build Validity VFS0050 driver */
|
||||||
|
#undef ENABLE_VFS0050
|
||||||
|
|
||||||
|
/* Build Validity VFS101 driver */
|
||||||
|
#undef ENABLE_VFS101
|
||||||
|
|
||||||
|
/* Build Validity VFS301/VFS300 driver */
|
||||||
|
#undef ENABLE_VFS301
|
||||||
|
|
||||||
|
/* Build Validity VFS5011 driver */
|
||||||
|
#undef ENABLE_VFS5011
|
||||||
|
|
||||||
|
/* Define to 1 if you have the <dlfcn.h> header file. */
|
||||||
|
#undef HAVE_DLFCN_H
|
||||||
|
|
||||||
|
/* Define to 1 if you have the <inttypes.h> header file. */
|
||||||
|
#undef HAVE_INTTYPES_H
|
||||||
|
|
||||||
|
/* Define to 1 if you have the <memory.h> header file. */
|
||||||
|
#undef HAVE_MEMORY_H
|
||||||
|
|
||||||
|
/* Define to 1 if you have the <stdint.h> header file. */
|
||||||
|
#undef HAVE_STDINT_H
|
||||||
|
|
||||||
|
/* Define to 1 if you have the <stdlib.h> header file. */
|
||||||
|
#undef HAVE_STDLIB_H
|
||||||
|
|
||||||
|
/* Define to 1 if you have the <strings.h> header file. */
|
||||||
|
#undef HAVE_STRINGS_H
|
||||||
|
|
||||||
|
/* Define to 1 if you have the <string.h> header file. */
|
||||||
|
#undef HAVE_STRING_H
|
||||||
|
|
||||||
|
/* Define to 1 if you have the <sys/stat.h> header file. */
|
||||||
|
#undef HAVE_SYS_STAT_H
|
||||||
|
|
||||||
|
/* Define to 1 if you have the <sys/types.h> header file. */
|
||||||
|
#undef HAVE_SYS_TYPES_H
|
||||||
|
|
||||||
|
/* Define to 1 if you have the <unistd.h> header file. */
|
||||||
|
#undef HAVE_UNISTD_H
|
||||||
|
|
||||||
|
/* defined if XV video overlay is available */
|
||||||
|
#undef HAVE_XV
|
||||||
|
|
||||||
|
/* Define to the sub-directory where libtool stores uninstalled libraries. */
|
||||||
|
#undef LT_OBJDIR
|
||||||
|
|
||||||
|
/* Name of package */
|
||||||
|
#undef PACKAGE
|
||||||
|
|
||||||
|
/* Define to the address where bug reports for this package should be sent. */
|
||||||
|
#undef PACKAGE_BUGREPORT
|
||||||
|
|
||||||
|
/* Define to the full name of this package. */
|
||||||
|
#undef PACKAGE_NAME
|
||||||
|
|
||||||
|
/* Define to the full name and version of this package. */
|
||||||
|
#undef PACKAGE_STRING
|
||||||
|
|
||||||
|
/* Define to the one symbol short name of this package. */
|
||||||
|
#undef PACKAGE_TARNAME
|
||||||
|
|
||||||
|
/* Define to the home page for this package. */
|
||||||
|
#undef PACKAGE_URL
|
||||||
|
|
||||||
|
/* Define to the version of this package. */
|
||||||
|
#undef PACKAGE_VERSION
|
||||||
|
|
||||||
|
/* Define to 1 if you have the ANSI C header files. */
|
||||||
|
#undef STDC_HEADERS
|
||||||
|
|
||||||
|
/* Version number of package */
|
||||||
|
#undef VERSION
|
||||||
|
|
||||||
|
/* Use GNU extensions */
|
||||||
|
#undef _GNU_SOURCE
|
||||||
|
|
||||||
|
/* Define to `__inline__' or `__inline' if that's what the C compiler
|
||||||
|
calls it, or to nothing if 'inline' is not supported under any name. */
|
||||||
|
#ifndef __cplusplus
|
||||||
|
#undef inline
|
||||||
|
#endif
|
||||||
+1782
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
+13
-2
@@ -1,4 +1,4 @@
|
|||||||
AC_INIT([libfprint], [0.6.0])
|
AC_INIT([libfprint], [0.7.0])
|
||||||
AM_INIT_AUTOMAKE([1.11 no-dist-gzip dist-xz check-news subdir-objects])
|
AM_INIT_AUTOMAKE([1.11 no-dist-gzip dist-xz check-news subdir-objects])
|
||||||
AC_CONFIG_MACRO_DIR([m4])
|
AC_CONFIG_MACRO_DIR([m4])
|
||||||
AC_CONFIG_SRCDIR([libfprint/core.c])
|
AC_CONFIG_SRCDIR([libfprint/core.c])
|
||||||
@@ -23,7 +23,7 @@ AC_SUBST(lt_major)
|
|||||||
AC_SUBST(lt_revision)
|
AC_SUBST(lt_revision)
|
||||||
AC_SUBST(lt_age)
|
AC_SUBST(lt_age)
|
||||||
|
|
||||||
all_drivers="upekts upektc upeksonly vcom5s uru4000 fdu2000 aes1610 aes1660 aes2501 aes2550 aes2660 aes3500 aes4000 vfs101 vfs301 vfs5011 upektc_img etes603"
|
all_drivers="upekts upektc upeksonly vcom5s uru4000 fdu2000 aes1610 aes1660 aes2501 aes2550 aes2660 aes3500 aes4000 vfs101 vfs301 vfs5011 upektc_img etes603 vfs0050"
|
||||||
|
|
||||||
require_imaging='no'
|
require_imaging='no'
|
||||||
require_aeslib='no'
|
require_aeslib='no'
|
||||||
@@ -48,6 +48,7 @@ enable_vfs301='no'
|
|||||||
enable_vfs5011='no'
|
enable_vfs5011='no'
|
||||||
enable_upektc_img='no'
|
enable_upektc_img='no'
|
||||||
enable_etes603='no'
|
enable_etes603='no'
|
||||||
|
enable_vfs0050='no'
|
||||||
|
|
||||||
AC_ARG_WITH([drivers],[AS_HELP_STRING([--with-drivers],
|
AC_ARG_WITH([drivers],[AS_HELP_STRING([--with-drivers],
|
||||||
[List of drivers to enable])],
|
[List of drivers to enable])],
|
||||||
@@ -150,6 +151,10 @@ for driver in `echo ${drivers} | sed -e 's/,/ /g' -e 's/,$//g'`; do
|
|||||||
AC_DEFINE([ENABLE_ETES603], [], [Build EgisTec ES603 driver])
|
AC_DEFINE([ENABLE_ETES603], [], [Build EgisTec ES603 driver])
|
||||||
enable_etes603="yes"
|
enable_etes603="yes"
|
||||||
;;
|
;;
|
||||||
|
vfs0050)
|
||||||
|
AC_DEFINE([ENABLE_VFS0050], [], [Build Validity VFS0050 driver])
|
||||||
|
enable_vfs0050="yes"
|
||||||
|
;;
|
||||||
esac
|
esac
|
||||||
done
|
done
|
||||||
|
|
||||||
@@ -175,6 +180,7 @@ AM_CONDITIONAL([ENABLE_VFS301], [test "$enable_vfs301" = "yes"])
|
|||||||
AM_CONDITIONAL([ENABLE_VFS5011], [test "$enable_vfs5011" = "yes"])
|
AM_CONDITIONAL([ENABLE_VFS5011], [test "$enable_vfs5011" = "yes"])
|
||||||
AM_CONDITIONAL([ENABLE_UPEKTC_IMG], [test "$enable_upektc_img" = "yes"])
|
AM_CONDITIONAL([ENABLE_UPEKTC_IMG], [test "$enable_upektc_img" = "yes"])
|
||||||
AM_CONDITIONAL([ENABLE_ETES603], [test "$enable_etes603" = "yes"])
|
AM_CONDITIONAL([ENABLE_ETES603], [test "$enable_etes603" = "yes"])
|
||||||
|
AM_CONDITIONAL([ENABLE_VFS0050], [test "$enable_vfs0050" = "yes"])
|
||||||
|
|
||||||
|
|
||||||
PKG_CHECK_MODULES(LIBUSB, [libusb-1.0 >= 0.9.1])
|
PKG_CHECK_MODULES(LIBUSB, [libusb-1.0 >= 0.9.1])
|
||||||
@@ -396,6 +402,11 @@ if test x$enable_etes603 != xno ; then
|
|||||||
else
|
else
|
||||||
AC_MSG_NOTICE([ etes603 driver disabled])
|
AC_MSG_NOTICE([ etes603 driver disabled])
|
||||||
fi
|
fi
|
||||||
|
if test x$enable_vfs0050 != xno ; then
|
||||||
|
AC_MSG_NOTICE([** vfs0050 driver enabled])
|
||||||
|
else
|
||||||
|
AC_MSG_NOTICE([ vfs0050 driver disabled])
|
||||||
|
fi
|
||||||
if test x$require_aeslib != xno ; then
|
if test x$require_aeslib != xno ; then
|
||||||
AC_MSG_NOTICE([** aeslib helper functions enabled])
|
AC_MSG_NOTICE([** aeslib helper functions enabled])
|
||||||
else
|
else
|
||||||
|
|||||||
@@ -0,0 +1,791 @@
|
|||||||
|
#! /bin/sh
|
||||||
|
# depcomp - compile a program generating dependencies as side-effects
|
||||||
|
|
||||||
|
scriptversion=2013-05-30.07; # UTC
|
||||||
|
|
||||||
|
# Copyright (C) 1999-2014 Free Software Foundation, Inc.
|
||||||
|
|
||||||
|
# This program is free software; you can redistribute it and/or modify
|
||||||
|
# it under the terms of the GNU General Public License as published by
|
||||||
|
# the Free Software Foundation; either version 2, or (at your option)
|
||||||
|
# any later version.
|
||||||
|
|
||||||
|
# This program is distributed in the hope that it will be useful,
|
||||||
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
# GNU General Public License for more details.
|
||||||
|
|
||||||
|
# You should have received a copy of the GNU General Public License
|
||||||
|
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
# As a special exception to the GNU General Public License, if you
|
||||||
|
# distribute this file as part of a program that contains a
|
||||||
|
# configuration script generated by Autoconf, you may include it under
|
||||||
|
# the same distribution terms that you use for the rest of that program.
|
||||||
|
|
||||||
|
# Originally written by Alexandre Oliva <oliva@dcc.unicamp.br>.
|
||||||
|
|
||||||
|
case $1 in
|
||||||
|
'')
|
||||||
|
echo "$0: No command. Try '$0 --help' for more information." 1>&2
|
||||||
|
exit 1;
|
||||||
|
;;
|
||||||
|
-h | --h*)
|
||||||
|
cat <<\EOF
|
||||||
|
Usage: depcomp [--help] [--version] PROGRAM [ARGS]
|
||||||
|
|
||||||
|
Run PROGRAMS ARGS to compile a file, generating dependencies
|
||||||
|
as side-effects.
|
||||||
|
|
||||||
|
Environment variables:
|
||||||
|
depmode Dependency tracking mode.
|
||||||
|
source Source file read by 'PROGRAMS ARGS'.
|
||||||
|
object Object file output by 'PROGRAMS ARGS'.
|
||||||
|
DEPDIR directory where to store dependencies.
|
||||||
|
depfile Dependency file to output.
|
||||||
|
tmpdepfile Temporary file to use when outputting dependencies.
|
||||||
|
libtool Whether libtool is used (yes/no).
|
||||||
|
|
||||||
|
Report bugs to <bug-automake@gnu.org>.
|
||||||
|
EOF
|
||||||
|
exit $?
|
||||||
|
;;
|
||||||
|
-v | --v*)
|
||||||
|
echo "depcomp $scriptversion"
|
||||||
|
exit $?
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
# Get the directory component of the given path, and save it in the
|
||||||
|
# global variables '$dir'. Note that this directory component will
|
||||||
|
# be either empty or ending with a '/' character. This is deliberate.
|
||||||
|
set_dir_from ()
|
||||||
|
{
|
||||||
|
case $1 in
|
||||||
|
*/*) dir=`echo "$1" | sed -e 's|/[^/]*$|/|'`;;
|
||||||
|
*) dir=;;
|
||||||
|
esac
|
||||||
|
}
|
||||||
|
|
||||||
|
# Get the suffix-stripped basename of the given path, and save it the
|
||||||
|
# global variable '$base'.
|
||||||
|
set_base_from ()
|
||||||
|
{
|
||||||
|
base=`echo "$1" | sed -e 's|^.*/||' -e 's/\.[^.]*$//'`
|
||||||
|
}
|
||||||
|
|
||||||
|
# If no dependency file was actually created by the compiler invocation,
|
||||||
|
# we still have to create a dummy depfile, to avoid errors with the
|
||||||
|
# Makefile "include basename.Plo" scheme.
|
||||||
|
make_dummy_depfile ()
|
||||||
|
{
|
||||||
|
echo "#dummy" > "$depfile"
|
||||||
|
}
|
||||||
|
|
||||||
|
# Factor out some common post-processing of the generated depfile.
|
||||||
|
# Requires the auxiliary global variable '$tmpdepfile' to be set.
|
||||||
|
aix_post_process_depfile ()
|
||||||
|
{
|
||||||
|
# If the compiler actually managed to produce a dependency file,
|
||||||
|
# post-process it.
|
||||||
|
if test -f "$tmpdepfile"; then
|
||||||
|
# Each line is of the form 'foo.o: dependency.h'.
|
||||||
|
# Do two passes, one to just change these to
|
||||||
|
# $object: dependency.h
|
||||||
|
# and one to simply output
|
||||||
|
# dependency.h:
|
||||||
|
# which is needed to avoid the deleted-header problem.
|
||||||
|
{ sed -e "s,^.*\.[$lower]*:,$object:," < "$tmpdepfile"
|
||||||
|
sed -e "s,^.*\.[$lower]*:[$tab ]*,," -e 's,$,:,' < "$tmpdepfile"
|
||||||
|
} > "$depfile"
|
||||||
|
rm -f "$tmpdepfile"
|
||||||
|
else
|
||||||
|
make_dummy_depfile
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
# A tabulation character.
|
||||||
|
tab=' '
|
||||||
|
# A newline character.
|
||||||
|
nl='
|
||||||
|
'
|
||||||
|
# Character ranges might be problematic outside the C locale.
|
||||||
|
# These definitions help.
|
||||||
|
upper=ABCDEFGHIJKLMNOPQRSTUVWXYZ
|
||||||
|
lower=abcdefghijklmnopqrstuvwxyz
|
||||||
|
digits=0123456789
|
||||||
|
alpha=${upper}${lower}
|
||||||
|
|
||||||
|
if test -z "$depmode" || test -z "$source" || test -z "$object"; then
|
||||||
|
echo "depcomp: Variables source, object and depmode must be set" 1>&2
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Dependencies for sub/bar.o or sub/bar.obj go into sub/.deps/bar.Po.
|
||||||
|
depfile=${depfile-`echo "$object" |
|
||||||
|
sed 's|[^\\/]*$|'${DEPDIR-.deps}'/&|;s|\.\([^.]*\)$|.P\1|;s|Pobj$|Po|'`}
|
||||||
|
tmpdepfile=${tmpdepfile-`echo "$depfile" | sed 's/\.\([^.]*\)$/.T\1/'`}
|
||||||
|
|
||||||
|
rm -f "$tmpdepfile"
|
||||||
|
|
||||||
|
# Avoid interferences from the environment.
|
||||||
|
gccflag= dashmflag=
|
||||||
|
|
||||||
|
# Some modes work just like other modes, but use different flags. We
|
||||||
|
# parameterize here, but still list the modes in the big case below,
|
||||||
|
# to make depend.m4 easier to write. Note that we *cannot* use a case
|
||||||
|
# here, because this file can only contain one case statement.
|
||||||
|
if test "$depmode" = hp; then
|
||||||
|
# HP compiler uses -M and no extra arg.
|
||||||
|
gccflag=-M
|
||||||
|
depmode=gcc
|
||||||
|
fi
|
||||||
|
|
||||||
|
if test "$depmode" = dashXmstdout; then
|
||||||
|
# This is just like dashmstdout with a different argument.
|
||||||
|
dashmflag=-xM
|
||||||
|
depmode=dashmstdout
|
||||||
|
fi
|
||||||
|
|
||||||
|
cygpath_u="cygpath -u -f -"
|
||||||
|
if test "$depmode" = msvcmsys; then
|
||||||
|
# This is just like msvisualcpp but w/o cygpath translation.
|
||||||
|
# Just convert the backslash-escaped backslashes to single forward
|
||||||
|
# slashes to satisfy depend.m4
|
||||||
|
cygpath_u='sed s,\\\\,/,g'
|
||||||
|
depmode=msvisualcpp
|
||||||
|
fi
|
||||||
|
|
||||||
|
if test "$depmode" = msvc7msys; then
|
||||||
|
# This is just like msvc7 but w/o cygpath translation.
|
||||||
|
# Just convert the backslash-escaped backslashes to single forward
|
||||||
|
# slashes to satisfy depend.m4
|
||||||
|
cygpath_u='sed s,\\\\,/,g'
|
||||||
|
depmode=msvc7
|
||||||
|
fi
|
||||||
|
|
||||||
|
if test "$depmode" = xlc; then
|
||||||
|
# IBM C/C++ Compilers xlc/xlC can output gcc-like dependency information.
|
||||||
|
gccflag=-qmakedep=gcc,-MF
|
||||||
|
depmode=gcc
|
||||||
|
fi
|
||||||
|
|
||||||
|
case "$depmode" in
|
||||||
|
gcc3)
|
||||||
|
## gcc 3 implements dependency tracking that does exactly what
|
||||||
|
## we want. Yay! Note: for some reason libtool 1.4 doesn't like
|
||||||
|
## it if -MD -MP comes after the -MF stuff. Hmm.
|
||||||
|
## Unfortunately, FreeBSD c89 acceptance of flags depends upon
|
||||||
|
## the command line argument order; so add the flags where they
|
||||||
|
## appear in depend2.am. Note that the slowdown incurred here
|
||||||
|
## affects only configure: in makefiles, %FASTDEP% shortcuts this.
|
||||||
|
for arg
|
||||||
|
do
|
||||||
|
case $arg in
|
||||||
|
-c) set fnord "$@" -MT "$object" -MD -MP -MF "$tmpdepfile" "$arg" ;;
|
||||||
|
*) set fnord "$@" "$arg" ;;
|
||||||
|
esac
|
||||||
|
shift # fnord
|
||||||
|
shift # $arg
|
||||||
|
done
|
||||||
|
"$@"
|
||||||
|
stat=$?
|
||||||
|
if test $stat -ne 0; then
|
||||||
|
rm -f "$tmpdepfile"
|
||||||
|
exit $stat
|
||||||
|
fi
|
||||||
|
mv "$tmpdepfile" "$depfile"
|
||||||
|
;;
|
||||||
|
|
||||||
|
gcc)
|
||||||
|
## Note that this doesn't just cater to obsosete pre-3.x GCC compilers.
|
||||||
|
## but also to in-use compilers like IMB xlc/xlC and the HP C compiler.
|
||||||
|
## (see the conditional assignment to $gccflag above).
|
||||||
|
## There are various ways to get dependency output from gcc. Here's
|
||||||
|
## why we pick this rather obscure method:
|
||||||
|
## - Don't want to use -MD because we'd like the dependencies to end
|
||||||
|
## up in a subdir. Having to rename by hand is ugly.
|
||||||
|
## (We might end up doing this anyway to support other compilers.)
|
||||||
|
## - The DEPENDENCIES_OUTPUT environment variable makes gcc act like
|
||||||
|
## -MM, not -M (despite what the docs say). Also, it might not be
|
||||||
|
## supported by the other compilers which use the 'gcc' depmode.
|
||||||
|
## - Using -M directly means running the compiler twice (even worse
|
||||||
|
## than renaming).
|
||||||
|
if test -z "$gccflag"; then
|
||||||
|
gccflag=-MD,
|
||||||
|
fi
|
||||||
|
"$@" -Wp,"$gccflag$tmpdepfile"
|
||||||
|
stat=$?
|
||||||
|
if test $stat -ne 0; then
|
||||||
|
rm -f "$tmpdepfile"
|
||||||
|
exit $stat
|
||||||
|
fi
|
||||||
|
rm -f "$depfile"
|
||||||
|
echo "$object : \\" > "$depfile"
|
||||||
|
# The second -e expression handles DOS-style file names with drive
|
||||||
|
# letters.
|
||||||
|
sed -e 's/^[^:]*: / /' \
|
||||||
|
-e 's/^['$alpha']:\/[^:]*: / /' < "$tmpdepfile" >> "$depfile"
|
||||||
|
## This next piece of magic avoids the "deleted header file" problem.
|
||||||
|
## The problem is that when a header file which appears in a .P file
|
||||||
|
## is deleted, the dependency causes make to die (because there is
|
||||||
|
## typically no way to rebuild the header). We avoid this by adding
|
||||||
|
## dummy dependencies for each header file. Too bad gcc doesn't do
|
||||||
|
## this for us directly.
|
||||||
|
## Some versions of gcc put a space before the ':'. On the theory
|
||||||
|
## that the space means something, we add a space to the output as
|
||||||
|
## well. hp depmode also adds that space, but also prefixes the VPATH
|
||||||
|
## to the object. Take care to not repeat it in the output.
|
||||||
|
## Some versions of the HPUX 10.20 sed can't process this invocation
|
||||||
|
## correctly. Breaking it into two sed invocations is a workaround.
|
||||||
|
tr ' ' "$nl" < "$tmpdepfile" \
|
||||||
|
| sed -e 's/^\\$//' -e '/^$/d' -e "s|.*$object$||" -e '/:$/d' \
|
||||||
|
| sed -e 's/$/ :/' >> "$depfile"
|
||||||
|
rm -f "$tmpdepfile"
|
||||||
|
;;
|
||||||
|
|
||||||
|
hp)
|
||||||
|
# This case exists only to let depend.m4 do its work. It works by
|
||||||
|
# looking at the text of this script. This case will never be run,
|
||||||
|
# since it is checked for above.
|
||||||
|
exit 1
|
||||||
|
;;
|
||||||
|
|
||||||
|
sgi)
|
||||||
|
if test "$libtool" = yes; then
|
||||||
|
"$@" "-Wp,-MDupdate,$tmpdepfile"
|
||||||
|
else
|
||||||
|
"$@" -MDupdate "$tmpdepfile"
|
||||||
|
fi
|
||||||
|
stat=$?
|
||||||
|
if test $stat -ne 0; then
|
||||||
|
rm -f "$tmpdepfile"
|
||||||
|
exit $stat
|
||||||
|
fi
|
||||||
|
rm -f "$depfile"
|
||||||
|
|
||||||
|
if test -f "$tmpdepfile"; then # yes, the sourcefile depend on other files
|
||||||
|
echo "$object : \\" > "$depfile"
|
||||||
|
# Clip off the initial element (the dependent). Don't try to be
|
||||||
|
# clever and replace this with sed code, as IRIX sed won't handle
|
||||||
|
# lines with more than a fixed number of characters (4096 in
|
||||||
|
# IRIX 6.2 sed, 8192 in IRIX 6.5). We also remove comment lines;
|
||||||
|
# the IRIX cc adds comments like '#:fec' to the end of the
|
||||||
|
# dependency line.
|
||||||
|
tr ' ' "$nl" < "$tmpdepfile" \
|
||||||
|
| sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' \
|
||||||
|
| tr "$nl" ' ' >> "$depfile"
|
||||||
|
echo >> "$depfile"
|
||||||
|
# The second pass generates a dummy entry for each header file.
|
||||||
|
tr ' ' "$nl" < "$tmpdepfile" \
|
||||||
|
| sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' -e 's/$/:/' \
|
||||||
|
>> "$depfile"
|
||||||
|
else
|
||||||
|
make_dummy_depfile
|
||||||
|
fi
|
||||||
|
rm -f "$tmpdepfile"
|
||||||
|
;;
|
||||||
|
|
||||||
|
xlc)
|
||||||
|
# This case exists only to let depend.m4 do its work. It works by
|
||||||
|
# looking at the text of this script. This case will never be run,
|
||||||
|
# since it is checked for above.
|
||||||
|
exit 1
|
||||||
|
;;
|
||||||
|
|
||||||
|
aix)
|
||||||
|
# The C for AIX Compiler uses -M and outputs the dependencies
|
||||||
|
# in a .u file. In older versions, this file always lives in the
|
||||||
|
# current directory. Also, the AIX compiler puts '$object:' at the
|
||||||
|
# start of each line; $object doesn't have directory information.
|
||||||
|
# Version 6 uses the directory in both cases.
|
||||||
|
set_dir_from "$object"
|
||||||
|
set_base_from "$object"
|
||||||
|
if test "$libtool" = yes; then
|
||||||
|
tmpdepfile1=$dir$base.u
|
||||||
|
tmpdepfile2=$base.u
|
||||||
|
tmpdepfile3=$dir.libs/$base.u
|
||||||
|
"$@" -Wc,-M
|
||||||
|
else
|
||||||
|
tmpdepfile1=$dir$base.u
|
||||||
|
tmpdepfile2=$dir$base.u
|
||||||
|
tmpdepfile3=$dir$base.u
|
||||||
|
"$@" -M
|
||||||
|
fi
|
||||||
|
stat=$?
|
||||||
|
if test $stat -ne 0; then
|
||||||
|
rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3"
|
||||||
|
exit $stat
|
||||||
|
fi
|
||||||
|
|
||||||
|
for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3"
|
||||||
|
do
|
||||||
|
test -f "$tmpdepfile" && break
|
||||||
|
done
|
||||||
|
aix_post_process_depfile
|
||||||
|
;;
|
||||||
|
|
||||||
|
tcc)
|
||||||
|
# tcc (Tiny C Compiler) understand '-MD -MF file' since version 0.9.26
|
||||||
|
# FIXME: That version still under development at the moment of writing.
|
||||||
|
# Make that this statement remains true also for stable, released
|
||||||
|
# versions.
|
||||||
|
# It will wrap lines (doesn't matter whether long or short) with a
|
||||||
|
# trailing '\', as in:
|
||||||
|
#
|
||||||
|
# foo.o : \
|
||||||
|
# foo.c \
|
||||||
|
# foo.h \
|
||||||
|
#
|
||||||
|
# It will put a trailing '\' even on the last line, and will use leading
|
||||||
|
# spaces rather than leading tabs (at least since its commit 0394caf7
|
||||||
|
# "Emit spaces for -MD").
|
||||||
|
"$@" -MD -MF "$tmpdepfile"
|
||||||
|
stat=$?
|
||||||
|
if test $stat -ne 0; then
|
||||||
|
rm -f "$tmpdepfile"
|
||||||
|
exit $stat
|
||||||
|
fi
|
||||||
|
rm -f "$depfile"
|
||||||
|
# Each non-empty line is of the form 'foo.o : \' or ' dep.h \'.
|
||||||
|
# We have to change lines of the first kind to '$object: \'.
|
||||||
|
sed -e "s|.*:|$object :|" < "$tmpdepfile" > "$depfile"
|
||||||
|
# And for each line of the second kind, we have to emit a 'dep.h:'
|
||||||
|
# dummy dependency, to avoid the deleted-header problem.
|
||||||
|
sed -n -e 's|^ *\(.*\) *\\$|\1:|p' < "$tmpdepfile" >> "$depfile"
|
||||||
|
rm -f "$tmpdepfile"
|
||||||
|
;;
|
||||||
|
|
||||||
|
## The order of this option in the case statement is important, since the
|
||||||
|
## shell code in configure will try each of these formats in the order
|
||||||
|
## listed in this file. A plain '-MD' option would be understood by many
|
||||||
|
## compilers, so we must ensure this comes after the gcc and icc options.
|
||||||
|
pgcc)
|
||||||
|
# Portland's C compiler understands '-MD'.
|
||||||
|
# Will always output deps to 'file.d' where file is the root name of the
|
||||||
|
# source file under compilation, even if file resides in a subdirectory.
|
||||||
|
# The object file name does not affect the name of the '.d' file.
|
||||||
|
# pgcc 10.2 will output
|
||||||
|
# foo.o: sub/foo.c sub/foo.h
|
||||||
|
# and will wrap long lines using '\' :
|
||||||
|
# foo.o: sub/foo.c ... \
|
||||||
|
# sub/foo.h ... \
|
||||||
|
# ...
|
||||||
|
set_dir_from "$object"
|
||||||
|
# Use the source, not the object, to determine the base name, since
|
||||||
|
# that's sadly what pgcc will do too.
|
||||||
|
set_base_from "$source"
|
||||||
|
tmpdepfile=$base.d
|
||||||
|
|
||||||
|
# For projects that build the same source file twice into different object
|
||||||
|
# files, the pgcc approach of using the *source* file root name can cause
|
||||||
|
# problems in parallel builds. Use a locking strategy to avoid stomping on
|
||||||
|
# the same $tmpdepfile.
|
||||||
|
lockdir=$base.d-lock
|
||||||
|
trap "
|
||||||
|
echo '$0: caught signal, cleaning up...' >&2
|
||||||
|
rmdir '$lockdir'
|
||||||
|
exit 1
|
||||||
|
" 1 2 13 15
|
||||||
|
numtries=100
|
||||||
|
i=$numtries
|
||||||
|
while test $i -gt 0; do
|
||||||
|
# mkdir is a portable test-and-set.
|
||||||
|
if mkdir "$lockdir" 2>/dev/null; then
|
||||||
|
# This process acquired the lock.
|
||||||
|
"$@" -MD
|
||||||
|
stat=$?
|
||||||
|
# Release the lock.
|
||||||
|
rmdir "$lockdir"
|
||||||
|
break
|
||||||
|
else
|
||||||
|
# If the lock is being held by a different process, wait
|
||||||
|
# until the winning process is done or we timeout.
|
||||||
|
while test -d "$lockdir" && test $i -gt 0; do
|
||||||
|
sleep 1
|
||||||
|
i=`expr $i - 1`
|
||||||
|
done
|
||||||
|
fi
|
||||||
|
i=`expr $i - 1`
|
||||||
|
done
|
||||||
|
trap - 1 2 13 15
|
||||||
|
if test $i -le 0; then
|
||||||
|
echo "$0: failed to acquire lock after $numtries attempts" >&2
|
||||||
|
echo "$0: check lockdir '$lockdir'" >&2
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
if test $stat -ne 0; then
|
||||||
|
rm -f "$tmpdepfile"
|
||||||
|
exit $stat
|
||||||
|
fi
|
||||||
|
rm -f "$depfile"
|
||||||
|
# Each line is of the form `foo.o: dependent.h',
|
||||||
|
# or `foo.o: dep1.h dep2.h \', or ` dep3.h dep4.h \'.
|
||||||
|
# Do two passes, one to just change these to
|
||||||
|
# `$object: dependent.h' and one to simply `dependent.h:'.
|
||||||
|
sed "s,^[^:]*:,$object :," < "$tmpdepfile" > "$depfile"
|
||||||
|
# Some versions of the HPUX 10.20 sed can't process this invocation
|
||||||
|
# correctly. Breaking it into two sed invocations is a workaround.
|
||||||
|
sed 's,^[^:]*: \(.*\)$,\1,;s/^\\$//;/^$/d;/:$/d' < "$tmpdepfile" \
|
||||||
|
| sed -e 's/$/ :/' >> "$depfile"
|
||||||
|
rm -f "$tmpdepfile"
|
||||||
|
;;
|
||||||
|
|
||||||
|
hp2)
|
||||||
|
# The "hp" stanza above does not work with aCC (C++) and HP's ia64
|
||||||
|
# compilers, which have integrated preprocessors. The correct option
|
||||||
|
# to use with these is +Maked; it writes dependencies to a file named
|
||||||
|
# 'foo.d', which lands next to the object file, wherever that
|
||||||
|
# happens to be.
|
||||||
|
# Much of this is similar to the tru64 case; see comments there.
|
||||||
|
set_dir_from "$object"
|
||||||
|
set_base_from "$object"
|
||||||
|
if test "$libtool" = yes; then
|
||||||
|
tmpdepfile1=$dir$base.d
|
||||||
|
tmpdepfile2=$dir.libs/$base.d
|
||||||
|
"$@" -Wc,+Maked
|
||||||
|
else
|
||||||
|
tmpdepfile1=$dir$base.d
|
||||||
|
tmpdepfile2=$dir$base.d
|
||||||
|
"$@" +Maked
|
||||||
|
fi
|
||||||
|
stat=$?
|
||||||
|
if test $stat -ne 0; then
|
||||||
|
rm -f "$tmpdepfile1" "$tmpdepfile2"
|
||||||
|
exit $stat
|
||||||
|
fi
|
||||||
|
|
||||||
|
for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2"
|
||||||
|
do
|
||||||
|
test -f "$tmpdepfile" && break
|
||||||
|
done
|
||||||
|
if test -f "$tmpdepfile"; then
|
||||||
|
sed -e "s,^.*\.[$lower]*:,$object:," "$tmpdepfile" > "$depfile"
|
||||||
|
# Add 'dependent.h:' lines.
|
||||||
|
sed -ne '2,${
|
||||||
|
s/^ *//
|
||||||
|
s/ \\*$//
|
||||||
|
s/$/:/
|
||||||
|
p
|
||||||
|
}' "$tmpdepfile" >> "$depfile"
|
||||||
|
else
|
||||||
|
make_dummy_depfile
|
||||||
|
fi
|
||||||
|
rm -f "$tmpdepfile" "$tmpdepfile2"
|
||||||
|
;;
|
||||||
|
|
||||||
|
tru64)
|
||||||
|
# The Tru64 compiler uses -MD to generate dependencies as a side
|
||||||
|
# effect. 'cc -MD -o foo.o ...' puts the dependencies into 'foo.o.d'.
|
||||||
|
# At least on Alpha/Redhat 6.1, Compaq CCC V6.2-504 seems to put
|
||||||
|
# dependencies in 'foo.d' instead, so we check for that too.
|
||||||
|
# Subdirectories are respected.
|
||||||
|
set_dir_from "$object"
|
||||||
|
set_base_from "$object"
|
||||||
|
|
||||||
|
if test "$libtool" = yes; then
|
||||||
|
# Libtool generates 2 separate objects for the 2 libraries. These
|
||||||
|
# two compilations output dependencies in $dir.libs/$base.o.d and
|
||||||
|
# in $dir$base.o.d. We have to check for both files, because
|
||||||
|
# one of the two compilations can be disabled. We should prefer
|
||||||
|
# $dir$base.o.d over $dir.libs/$base.o.d because the latter is
|
||||||
|
# automatically cleaned when .libs/ is deleted, while ignoring
|
||||||
|
# the former would cause a distcleancheck panic.
|
||||||
|
tmpdepfile1=$dir$base.o.d # libtool 1.5
|
||||||
|
tmpdepfile2=$dir.libs/$base.o.d # Likewise.
|
||||||
|
tmpdepfile3=$dir.libs/$base.d # Compaq CCC V6.2-504
|
||||||
|
"$@" -Wc,-MD
|
||||||
|
else
|
||||||
|
tmpdepfile1=$dir$base.d
|
||||||
|
tmpdepfile2=$dir$base.d
|
||||||
|
tmpdepfile3=$dir$base.d
|
||||||
|
"$@" -MD
|
||||||
|
fi
|
||||||
|
|
||||||
|
stat=$?
|
||||||
|
if test $stat -ne 0; then
|
||||||
|
rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3"
|
||||||
|
exit $stat
|
||||||
|
fi
|
||||||
|
|
||||||
|
for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3"
|
||||||
|
do
|
||||||
|
test -f "$tmpdepfile" && break
|
||||||
|
done
|
||||||
|
# Same post-processing that is required for AIX mode.
|
||||||
|
aix_post_process_depfile
|
||||||
|
;;
|
||||||
|
|
||||||
|
msvc7)
|
||||||
|
if test "$libtool" = yes; then
|
||||||
|
showIncludes=-Wc,-showIncludes
|
||||||
|
else
|
||||||
|
showIncludes=-showIncludes
|
||||||
|
fi
|
||||||
|
"$@" $showIncludes > "$tmpdepfile"
|
||||||
|
stat=$?
|
||||||
|
grep -v '^Note: including file: ' "$tmpdepfile"
|
||||||
|
if test $stat -ne 0; then
|
||||||
|
rm -f "$tmpdepfile"
|
||||||
|
exit $stat
|
||||||
|
fi
|
||||||
|
rm -f "$depfile"
|
||||||
|
echo "$object : \\" > "$depfile"
|
||||||
|
# The first sed program below extracts the file names and escapes
|
||||||
|
# backslashes for cygpath. The second sed program outputs the file
|
||||||
|
# name when reading, but also accumulates all include files in the
|
||||||
|
# hold buffer in order to output them again at the end. This only
|
||||||
|
# works with sed implementations that can handle large buffers.
|
||||||
|
sed < "$tmpdepfile" -n '
|
||||||
|
/^Note: including file: *\(.*\)/ {
|
||||||
|
s//\1/
|
||||||
|
s/\\/\\\\/g
|
||||||
|
p
|
||||||
|
}' | $cygpath_u | sort -u | sed -n '
|
||||||
|
s/ /\\ /g
|
||||||
|
s/\(.*\)/'"$tab"'\1 \\/p
|
||||||
|
s/.\(.*\) \\/\1:/
|
||||||
|
H
|
||||||
|
$ {
|
||||||
|
s/.*/'"$tab"'/
|
||||||
|
G
|
||||||
|
p
|
||||||
|
}' >> "$depfile"
|
||||||
|
echo >> "$depfile" # make sure the fragment doesn't end with a backslash
|
||||||
|
rm -f "$tmpdepfile"
|
||||||
|
;;
|
||||||
|
|
||||||
|
msvc7msys)
|
||||||
|
# This case exists only to let depend.m4 do its work. It works by
|
||||||
|
# looking at the text of this script. This case will never be run,
|
||||||
|
# since it is checked for above.
|
||||||
|
exit 1
|
||||||
|
;;
|
||||||
|
|
||||||
|
#nosideeffect)
|
||||||
|
# This comment above is used by automake to tell side-effect
|
||||||
|
# dependency tracking mechanisms from slower ones.
|
||||||
|
|
||||||
|
dashmstdout)
|
||||||
|
# Important note: in order to support this mode, a compiler *must*
|
||||||
|
# always write the preprocessed file to stdout, regardless of -o.
|
||||||
|
"$@" || exit $?
|
||||||
|
|
||||||
|
# Remove the call to Libtool.
|
||||||
|
if test "$libtool" = yes; then
|
||||||
|
while test "X$1" != 'X--mode=compile'; do
|
||||||
|
shift
|
||||||
|
done
|
||||||
|
shift
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Remove '-o $object'.
|
||||||
|
IFS=" "
|
||||||
|
for arg
|
||||||
|
do
|
||||||
|
case $arg in
|
||||||
|
-o)
|
||||||
|
shift
|
||||||
|
;;
|
||||||
|
$object)
|
||||||
|
shift
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
set fnord "$@" "$arg"
|
||||||
|
shift # fnord
|
||||||
|
shift # $arg
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
done
|
||||||
|
|
||||||
|
test -z "$dashmflag" && dashmflag=-M
|
||||||
|
# Require at least two characters before searching for ':'
|
||||||
|
# in the target name. This is to cope with DOS-style filenames:
|
||||||
|
# a dependency such as 'c:/foo/bar' could be seen as target 'c' otherwise.
|
||||||
|
"$@" $dashmflag |
|
||||||
|
sed "s|^[$tab ]*[^:$tab ][^:][^:]*:[$tab ]*|$object: |" > "$tmpdepfile"
|
||||||
|
rm -f "$depfile"
|
||||||
|
cat < "$tmpdepfile" > "$depfile"
|
||||||
|
# Some versions of the HPUX 10.20 sed can't process this sed invocation
|
||||||
|
# correctly. Breaking it into two sed invocations is a workaround.
|
||||||
|
tr ' ' "$nl" < "$tmpdepfile" \
|
||||||
|
| sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' \
|
||||||
|
| sed -e 's/$/ :/' >> "$depfile"
|
||||||
|
rm -f "$tmpdepfile"
|
||||||
|
;;
|
||||||
|
|
||||||
|
dashXmstdout)
|
||||||
|
# This case only exists to satisfy depend.m4. It is never actually
|
||||||
|
# run, as this mode is specially recognized in the preamble.
|
||||||
|
exit 1
|
||||||
|
;;
|
||||||
|
|
||||||
|
makedepend)
|
||||||
|
"$@" || exit $?
|
||||||
|
# Remove any Libtool call
|
||||||
|
if test "$libtool" = yes; then
|
||||||
|
while test "X$1" != 'X--mode=compile'; do
|
||||||
|
shift
|
||||||
|
done
|
||||||
|
shift
|
||||||
|
fi
|
||||||
|
# X makedepend
|
||||||
|
shift
|
||||||
|
cleared=no eat=no
|
||||||
|
for arg
|
||||||
|
do
|
||||||
|
case $cleared in
|
||||||
|
no)
|
||||||
|
set ""; shift
|
||||||
|
cleared=yes ;;
|
||||||
|
esac
|
||||||
|
if test $eat = yes; then
|
||||||
|
eat=no
|
||||||
|
continue
|
||||||
|
fi
|
||||||
|
case "$arg" in
|
||||||
|
-D*|-I*)
|
||||||
|
set fnord "$@" "$arg"; shift ;;
|
||||||
|
# Strip any option that makedepend may not understand. Remove
|
||||||
|
# the object too, otherwise makedepend will parse it as a source file.
|
||||||
|
-arch)
|
||||||
|
eat=yes ;;
|
||||||
|
-*|$object)
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
set fnord "$@" "$arg"; shift ;;
|
||||||
|
esac
|
||||||
|
done
|
||||||
|
obj_suffix=`echo "$object" | sed 's/^.*\././'`
|
||||||
|
touch "$tmpdepfile"
|
||||||
|
${MAKEDEPEND-makedepend} -o"$obj_suffix" -f"$tmpdepfile" "$@"
|
||||||
|
rm -f "$depfile"
|
||||||
|
# makedepend may prepend the VPATH from the source file name to the object.
|
||||||
|
# No need to regex-escape $object, excess matching of '.' is harmless.
|
||||||
|
sed "s|^.*\($object *:\)|\1|" "$tmpdepfile" > "$depfile"
|
||||||
|
# Some versions of the HPUX 10.20 sed can't process the last invocation
|
||||||
|
# correctly. Breaking it into two sed invocations is a workaround.
|
||||||
|
sed '1,2d' "$tmpdepfile" \
|
||||||
|
| tr ' ' "$nl" \
|
||||||
|
| sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' \
|
||||||
|
| sed -e 's/$/ :/' >> "$depfile"
|
||||||
|
rm -f "$tmpdepfile" "$tmpdepfile".bak
|
||||||
|
;;
|
||||||
|
|
||||||
|
cpp)
|
||||||
|
# Important note: in order to support this mode, a compiler *must*
|
||||||
|
# always write the preprocessed file to stdout.
|
||||||
|
"$@" || exit $?
|
||||||
|
|
||||||
|
# Remove the call to Libtool.
|
||||||
|
if test "$libtool" = yes; then
|
||||||
|
while test "X$1" != 'X--mode=compile'; do
|
||||||
|
shift
|
||||||
|
done
|
||||||
|
shift
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Remove '-o $object'.
|
||||||
|
IFS=" "
|
||||||
|
for arg
|
||||||
|
do
|
||||||
|
case $arg in
|
||||||
|
-o)
|
||||||
|
shift
|
||||||
|
;;
|
||||||
|
$object)
|
||||||
|
shift
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
set fnord "$@" "$arg"
|
||||||
|
shift # fnord
|
||||||
|
shift # $arg
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
done
|
||||||
|
|
||||||
|
"$@" -E \
|
||||||
|
| sed -n -e '/^# [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' \
|
||||||
|
-e '/^#line [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' \
|
||||||
|
| sed '$ s: \\$::' > "$tmpdepfile"
|
||||||
|
rm -f "$depfile"
|
||||||
|
echo "$object : \\" > "$depfile"
|
||||||
|
cat < "$tmpdepfile" >> "$depfile"
|
||||||
|
sed < "$tmpdepfile" '/^$/d;s/^ //;s/ \\$//;s/$/ :/' >> "$depfile"
|
||||||
|
rm -f "$tmpdepfile"
|
||||||
|
;;
|
||||||
|
|
||||||
|
msvisualcpp)
|
||||||
|
# Important note: in order to support this mode, a compiler *must*
|
||||||
|
# always write the preprocessed file to stdout.
|
||||||
|
"$@" || exit $?
|
||||||
|
|
||||||
|
# Remove the call to Libtool.
|
||||||
|
if test "$libtool" = yes; then
|
||||||
|
while test "X$1" != 'X--mode=compile'; do
|
||||||
|
shift
|
||||||
|
done
|
||||||
|
shift
|
||||||
|
fi
|
||||||
|
|
||||||
|
IFS=" "
|
||||||
|
for arg
|
||||||
|
do
|
||||||
|
case "$arg" in
|
||||||
|
-o)
|
||||||
|
shift
|
||||||
|
;;
|
||||||
|
$object)
|
||||||
|
shift
|
||||||
|
;;
|
||||||
|
"-Gm"|"/Gm"|"-Gi"|"/Gi"|"-ZI"|"/ZI")
|
||||||
|
set fnord "$@"
|
||||||
|
shift
|
||||||
|
shift
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
set fnord "$@" "$arg"
|
||||||
|
shift
|
||||||
|
shift
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
done
|
||||||
|
"$@" -E 2>/dev/null |
|
||||||
|
sed -n '/^#line [0-9][0-9]* "\([^"]*\)"/ s::\1:p' | $cygpath_u | sort -u > "$tmpdepfile"
|
||||||
|
rm -f "$depfile"
|
||||||
|
echo "$object : \\" > "$depfile"
|
||||||
|
sed < "$tmpdepfile" -n -e 's% %\\ %g' -e '/^\(.*\)$/ s::'"$tab"'\1 \\:p' >> "$depfile"
|
||||||
|
echo "$tab" >> "$depfile"
|
||||||
|
sed < "$tmpdepfile" -n -e 's% %\\ %g' -e '/^\(.*\)$/ s::\1\::p' >> "$depfile"
|
||||||
|
rm -f "$tmpdepfile"
|
||||||
|
;;
|
||||||
|
|
||||||
|
msvcmsys)
|
||||||
|
# This case exists only to let depend.m4 do its work. It works by
|
||||||
|
# looking at the text of this script. This case will never be run,
|
||||||
|
# since it is checked for above.
|
||||||
|
exit 1
|
||||||
|
;;
|
||||||
|
|
||||||
|
none)
|
||||||
|
exec "$@"
|
||||||
|
;;
|
||||||
|
|
||||||
|
*)
|
||||||
|
echo "Unknown depmode $depmode" 1>&2
|
||||||
|
exit 1
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
exit 0
|
||||||
|
|
||||||
|
# Local Variables:
|
||||||
|
# mode: shell-script
|
||||||
|
# sh-indentation: 2
|
||||||
|
# eval: (add-hook 'write-file-hooks 'time-stamp)
|
||||||
|
# time-stamp-start: "scriptversion="
|
||||||
|
# time-stamp-format: "%:y-%02m-%02d.%02H"
|
||||||
|
# time-stamp-time-zone: "UTC"
|
||||||
|
# time-stamp-end: "; # UTC"
|
||||||
|
# End:
|
||||||
+466
@@ -0,0 +1,466 @@
|
|||||||
|
# Makefile.in generated by automake 1.15 from Makefile.am.
|
||||||
|
# @configure_input@
|
||||||
|
|
||||||
|
# Copyright (C) 1994-2014 Free Software Foundation, Inc.
|
||||||
|
|
||||||
|
# This Makefile.in is free software; the Free Software Foundation
|
||||||
|
# gives unlimited permission to copy and/or distribute it,
|
||||||
|
# with or without modifications, as long as this notice is preserved.
|
||||||
|
|
||||||
|
# This program is distributed in the hope that it will be useful,
|
||||||
|
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
|
||||||
|
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
|
||||||
|
# PARTICULAR PURPOSE.
|
||||||
|
|
||||||
|
@SET_MAKE@
|
||||||
|
VPATH = @srcdir@
|
||||||
|
am__is_gnu_make = { \
|
||||||
|
if test -z '$(MAKELEVEL)'; then \
|
||||||
|
false; \
|
||||||
|
elif test -n '$(MAKE_HOST)'; then \
|
||||||
|
true; \
|
||||||
|
elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
|
||||||
|
true; \
|
||||||
|
else \
|
||||||
|
false; \
|
||||||
|
fi; \
|
||||||
|
}
|
||||||
|
am__make_running_with_option = \
|
||||||
|
case $${target_option-} in \
|
||||||
|
?) ;; \
|
||||||
|
*) echo "am__make_running_with_option: internal error: invalid" \
|
||||||
|
"target option '$${target_option-}' specified" >&2; \
|
||||||
|
exit 1;; \
|
||||||
|
esac; \
|
||||||
|
has_opt=no; \
|
||||||
|
sane_makeflags=$$MAKEFLAGS; \
|
||||||
|
if $(am__is_gnu_make); then \
|
||||||
|
sane_makeflags=$$MFLAGS; \
|
||||||
|
else \
|
||||||
|
case $$MAKEFLAGS in \
|
||||||
|
*\\[\ \ ]*) \
|
||||||
|
bs=\\; \
|
||||||
|
sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \
|
||||||
|
| sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \
|
||||||
|
esac; \
|
||||||
|
fi; \
|
||||||
|
skip_next=no; \
|
||||||
|
strip_trailopt () \
|
||||||
|
{ \
|
||||||
|
flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \
|
||||||
|
}; \
|
||||||
|
for flg in $$sane_makeflags; do \
|
||||||
|
test $$skip_next = yes && { skip_next=no; continue; }; \
|
||||||
|
case $$flg in \
|
||||||
|
*=*|--*) continue;; \
|
||||||
|
-*I) strip_trailopt 'I'; skip_next=yes;; \
|
||||||
|
-*I?*) strip_trailopt 'I';; \
|
||||||
|
-*O) strip_trailopt 'O'; skip_next=yes;; \
|
||||||
|
-*O?*) strip_trailopt 'O';; \
|
||||||
|
-*l) strip_trailopt 'l'; skip_next=yes;; \
|
||||||
|
-*l?*) strip_trailopt 'l';; \
|
||||||
|
-[dEDm]) skip_next=yes;; \
|
||||||
|
-[JT]) skip_next=yes;; \
|
||||||
|
esac; \
|
||||||
|
case $$flg in \
|
||||||
|
*$$target_option*) has_opt=yes; break;; \
|
||||||
|
esac; \
|
||||||
|
done; \
|
||||||
|
test $$has_opt = yes
|
||||||
|
am__make_dryrun = (target_option=n; $(am__make_running_with_option))
|
||||||
|
am__make_keepgoing = (target_option=k; $(am__make_running_with_option))
|
||||||
|
pkgdatadir = $(datadir)/@PACKAGE@
|
||||||
|
pkgincludedir = $(includedir)/@PACKAGE@
|
||||||
|
pkglibdir = $(libdir)/@PACKAGE@
|
||||||
|
pkglibexecdir = $(libexecdir)/@PACKAGE@
|
||||||
|
am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
|
||||||
|
install_sh_DATA = $(install_sh) -c -m 644
|
||||||
|
install_sh_PROGRAM = $(install_sh) -c
|
||||||
|
install_sh_SCRIPT = $(install_sh) -c
|
||||||
|
INSTALL_HEADER = $(INSTALL_DATA)
|
||||||
|
transform = $(program_transform_name)
|
||||||
|
NORMAL_INSTALL = :
|
||||||
|
PRE_INSTALL = :
|
||||||
|
POST_INSTALL = :
|
||||||
|
NORMAL_UNINSTALL = :
|
||||||
|
PRE_UNINSTALL = :
|
||||||
|
POST_UNINSTALL = :
|
||||||
|
build_triplet = @build@
|
||||||
|
host_triplet = @host@
|
||||||
|
subdir = doc
|
||||||
|
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
|
||||||
|
am__aclocal_m4_deps = $(top_srcdir)/m4/libtool.m4 \
|
||||||
|
$(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \
|
||||||
|
$(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \
|
||||||
|
$(top_srcdir)/configure.ac
|
||||||
|
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
|
||||||
|
$(ACLOCAL_M4)
|
||||||
|
DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON)
|
||||||
|
mkinstalldirs = $(install_sh) -d
|
||||||
|
CONFIG_HEADER = $(top_builddir)/config.h
|
||||||
|
CONFIG_CLEAN_FILES =
|
||||||
|
CONFIG_CLEAN_VPATH_FILES =
|
||||||
|
AM_V_P = $(am__v_P_@AM_V@)
|
||||||
|
am__v_P_ = $(am__v_P_@AM_DEFAULT_V@)
|
||||||
|
am__v_P_0 = false
|
||||||
|
am__v_P_1 = :
|
||||||
|
AM_V_GEN = $(am__v_GEN_@AM_V@)
|
||||||
|
am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@)
|
||||||
|
am__v_GEN_0 = @echo " GEN " $@;
|
||||||
|
am__v_GEN_1 =
|
||||||
|
AM_V_at = $(am__v_at_@AM_V@)
|
||||||
|
am__v_at_ = $(am__v_at_@AM_DEFAULT_V@)
|
||||||
|
am__v_at_0 = @
|
||||||
|
am__v_at_1 =
|
||||||
|
SOURCES =
|
||||||
|
DIST_SOURCES =
|
||||||
|
am__can_run_installinfo = \
|
||||||
|
case $$AM_UPDATE_INFO_DIR in \
|
||||||
|
n|no|NO) false;; \
|
||||||
|
*) (install-info --version) >/dev/null 2>&1;; \
|
||||||
|
esac
|
||||||
|
am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)
|
||||||
|
am__DIST_COMMON = $(srcdir)/Makefile.in
|
||||||
|
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
|
||||||
|
ACLOCAL = @ACLOCAL@
|
||||||
|
AMTAR = @AMTAR@
|
||||||
|
AM_CFLAGS = @AM_CFLAGS@
|
||||||
|
AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
|
||||||
|
AR = @AR@
|
||||||
|
AUTOCONF = @AUTOCONF@
|
||||||
|
AUTOHEADER = @AUTOHEADER@
|
||||||
|
AUTOMAKE = @AUTOMAKE@
|
||||||
|
AWK = @AWK@
|
||||||
|
CC = @CC@
|
||||||
|
CCDEPMODE = @CCDEPMODE@
|
||||||
|
CFLAGS = @CFLAGS@
|
||||||
|
CPP = @CPP@
|
||||||
|
CPPFLAGS = @CPPFLAGS@
|
||||||
|
CRYPTO_CFLAGS = @CRYPTO_CFLAGS@
|
||||||
|
CRYPTO_LIBS = @CRYPTO_LIBS@
|
||||||
|
CXX = @CXX@
|
||||||
|
CXXCPP = @CXXCPP@
|
||||||
|
CXXDEPMODE = @CXXDEPMODE@
|
||||||
|
CXXFLAGS = @CXXFLAGS@
|
||||||
|
CYGPATH_W = @CYGPATH_W@
|
||||||
|
DEFS = @DEFS@
|
||||||
|
DEPDIR = @DEPDIR@
|
||||||
|
DLLTOOL = @DLLTOOL@
|
||||||
|
DSYMUTIL = @DSYMUTIL@
|
||||||
|
DUMPBIN = @DUMPBIN@
|
||||||
|
ECHO_C = @ECHO_C@
|
||||||
|
ECHO_N = @ECHO_N@
|
||||||
|
ECHO_T = @ECHO_T@
|
||||||
|
EGREP = @EGREP@
|
||||||
|
EXEEXT = @EXEEXT@
|
||||||
|
FGREP = @FGREP@
|
||||||
|
GLIB_CFLAGS = @GLIB_CFLAGS@
|
||||||
|
GLIB_LIBS = @GLIB_LIBS@
|
||||||
|
GREP = @GREP@
|
||||||
|
IMAGING_CFLAGS = @IMAGING_CFLAGS@
|
||||||
|
IMAGING_LIBS = @IMAGING_LIBS@
|
||||||
|
INSTALL = @INSTALL@
|
||||||
|
INSTALL_DATA = @INSTALL_DATA@
|
||||||
|
INSTALL_PROGRAM = @INSTALL_PROGRAM@
|
||||||
|
INSTALL_SCRIPT = @INSTALL_SCRIPT@
|
||||||
|
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
|
||||||
|
LD = @LD@
|
||||||
|
LDFLAGS = @LDFLAGS@
|
||||||
|
LIBOBJS = @LIBOBJS@
|
||||||
|
LIBS = @LIBS@
|
||||||
|
LIBTOOL = @LIBTOOL@
|
||||||
|
LIBUSB_CFLAGS = @LIBUSB_CFLAGS@
|
||||||
|
LIBUSB_LIBS = @LIBUSB_LIBS@
|
||||||
|
LIPO = @LIPO@
|
||||||
|
LN_S = @LN_S@
|
||||||
|
LTLIBOBJS = @LTLIBOBJS@
|
||||||
|
LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@
|
||||||
|
MAKEINFO = @MAKEINFO@
|
||||||
|
MANIFEST_TOOL = @MANIFEST_TOOL@
|
||||||
|
MKDIR_P = @MKDIR_P@
|
||||||
|
NM = @NM@
|
||||||
|
NMEDIT = @NMEDIT@
|
||||||
|
OBJDUMP = @OBJDUMP@
|
||||||
|
OBJEXT = @OBJEXT@
|
||||||
|
OTOOL = @OTOOL@
|
||||||
|
OTOOL64 = @OTOOL64@
|
||||||
|
PACKAGE = @PACKAGE@
|
||||||
|
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
|
||||||
|
PACKAGE_NAME = @PACKAGE_NAME@
|
||||||
|
PACKAGE_STRING = @PACKAGE_STRING@
|
||||||
|
PACKAGE_TARNAME = @PACKAGE_TARNAME@
|
||||||
|
PACKAGE_URL = @PACKAGE_URL@
|
||||||
|
PACKAGE_VERSION = @PACKAGE_VERSION@
|
||||||
|
PATH_SEPARATOR = @PATH_SEPARATOR@
|
||||||
|
PKG_CONFIG = @PKG_CONFIG@
|
||||||
|
PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@
|
||||||
|
PKG_CONFIG_PATH = @PKG_CONFIG_PATH@
|
||||||
|
RANLIB = @RANLIB@
|
||||||
|
SED = @SED@
|
||||||
|
SET_MAKE = @SET_MAKE@
|
||||||
|
SHELL = @SHELL@
|
||||||
|
STRIP = @STRIP@
|
||||||
|
VERSION = @VERSION@
|
||||||
|
XV_CFLAGS = @XV_CFLAGS@
|
||||||
|
XV_LIBS = @XV_LIBS@
|
||||||
|
abs_builddir = @abs_builddir@
|
||||||
|
abs_srcdir = @abs_srcdir@
|
||||||
|
abs_top_builddir = @abs_top_builddir@
|
||||||
|
abs_top_srcdir = @abs_top_srcdir@
|
||||||
|
ac_ct_AR = @ac_ct_AR@
|
||||||
|
ac_ct_CC = @ac_ct_CC@
|
||||||
|
ac_ct_CXX = @ac_ct_CXX@
|
||||||
|
ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
|
||||||
|
am__include = @am__include@
|
||||||
|
am__leading_dot = @am__leading_dot@
|
||||||
|
am__quote = @am__quote@
|
||||||
|
am__tar = @am__tar@
|
||||||
|
am__untar = @am__untar@
|
||||||
|
bindir = @bindir@
|
||||||
|
build = @build@
|
||||||
|
build_alias = @build_alias@
|
||||||
|
build_cpu = @build_cpu@
|
||||||
|
build_os = @build_os@
|
||||||
|
build_vendor = @build_vendor@
|
||||||
|
builddir = @builddir@
|
||||||
|
datadir = @datadir@
|
||||||
|
datarootdir = @datarootdir@
|
||||||
|
docdir = @docdir@
|
||||||
|
dvidir = @dvidir@
|
||||||
|
exec_prefix = @exec_prefix@
|
||||||
|
host = @host@
|
||||||
|
host_alias = @host_alias@
|
||||||
|
host_cpu = @host_cpu@
|
||||||
|
host_os = @host_os@
|
||||||
|
host_vendor = @host_vendor@
|
||||||
|
htmldir = @htmldir@
|
||||||
|
includedir = @includedir@
|
||||||
|
infodir = @infodir@
|
||||||
|
install_sh = @install_sh@
|
||||||
|
libdir = @libdir@
|
||||||
|
libexecdir = @libexecdir@
|
||||||
|
localedir = @localedir@
|
||||||
|
localstatedir = @localstatedir@
|
||||||
|
lt_age = @lt_age@
|
||||||
|
lt_major = @lt_major@
|
||||||
|
lt_revision = @lt_revision@
|
||||||
|
mandir = @mandir@
|
||||||
|
mkdir_p = @mkdir_p@
|
||||||
|
oldincludedir = @oldincludedir@
|
||||||
|
pdfdir = @pdfdir@
|
||||||
|
prefix = @prefix@
|
||||||
|
program_transform_name = @program_transform_name@
|
||||||
|
psdir = @psdir@
|
||||||
|
sbindir = @sbindir@
|
||||||
|
sharedstatedir = @sharedstatedir@
|
||||||
|
srcdir = @srcdir@
|
||||||
|
sysconfdir = @sysconfdir@
|
||||||
|
target_alias = @target_alias@
|
||||||
|
top_build_prefix = @top_build_prefix@
|
||||||
|
top_builddir = @top_builddir@
|
||||||
|
top_srcdir = @top_srcdir@
|
||||||
|
udev_rulesdir = @udev_rulesdir@
|
||||||
|
EXTRA_DIST = doxygen.cfg
|
||||||
|
all: all-am
|
||||||
|
|
||||||
|
.SUFFIXES:
|
||||||
|
$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
|
||||||
|
@for dep in $?; do \
|
||||||
|
case '$(am__configure_deps)' in \
|
||||||
|
*$$dep*) \
|
||||||
|
( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
|
||||||
|
&& { if test -f $@; then exit 0; else break; fi; }; \
|
||||||
|
exit 1;; \
|
||||||
|
esac; \
|
||||||
|
done; \
|
||||||
|
echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu doc/Makefile'; \
|
||||||
|
$(am__cd) $(top_srcdir) && \
|
||||||
|
$(AUTOMAKE) --gnu doc/Makefile
|
||||||
|
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
|
||||||
|
@case '$?' in \
|
||||||
|
*config.status*) \
|
||||||
|
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
|
||||||
|
*) \
|
||||||
|
echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
|
||||||
|
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
|
||||||
|
esac;
|
||||||
|
|
||||||
|
$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
|
||||||
|
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
|
||||||
|
|
||||||
|
$(top_srcdir)/configure: $(am__configure_deps)
|
||||||
|
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
|
||||||
|
$(ACLOCAL_M4): $(am__aclocal_m4_deps)
|
||||||
|
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
|
||||||
|
$(am__aclocal_m4_deps):
|
||||||
|
|
||||||
|
mostlyclean-libtool:
|
||||||
|
-rm -f *.lo
|
||||||
|
|
||||||
|
clean-libtool:
|
||||||
|
-rm -rf .libs _libs
|
||||||
|
tags TAGS:
|
||||||
|
|
||||||
|
ctags CTAGS:
|
||||||
|
|
||||||
|
cscope cscopelist:
|
||||||
|
|
||||||
|
|
||||||
|
distdir: $(DISTFILES)
|
||||||
|
@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
|
||||||
|
topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
|
||||||
|
list='$(DISTFILES)'; \
|
||||||
|
dist_files=`for file in $$list; do echo $$file; done | \
|
||||||
|
sed -e "s|^$$srcdirstrip/||;t" \
|
||||||
|
-e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
|
||||||
|
case $$dist_files in \
|
||||||
|
*/*) $(MKDIR_P) `echo "$$dist_files" | \
|
||||||
|
sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
|
||||||
|
sort -u` ;; \
|
||||||
|
esac; \
|
||||||
|
for file in $$dist_files; do \
|
||||||
|
if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
|
||||||
|
if test -d $$d/$$file; then \
|
||||||
|
dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
|
||||||
|
if test -d "$(distdir)/$$file"; then \
|
||||||
|
find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
|
||||||
|
fi; \
|
||||||
|
if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
|
||||||
|
cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
|
||||||
|
find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
|
||||||
|
fi; \
|
||||||
|
cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
|
||||||
|
else \
|
||||||
|
test -f "$(distdir)/$$file" \
|
||||||
|
|| cp -p $$d/$$file "$(distdir)/$$file" \
|
||||||
|
|| exit 1; \
|
||||||
|
fi; \
|
||||||
|
done
|
||||||
|
check-am: all-am
|
||||||
|
check: check-am
|
||||||
|
all-am: Makefile
|
||||||
|
installdirs:
|
||||||
|
install: install-am
|
||||||
|
install-exec: install-exec-am
|
||||||
|
install-data: install-data-am
|
||||||
|
uninstall: uninstall-am
|
||||||
|
|
||||||
|
install-am: all-am
|
||||||
|
@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
|
||||||
|
|
||||||
|
installcheck: installcheck-am
|
||||||
|
install-strip:
|
||||||
|
if test -z '$(STRIP)'; then \
|
||||||
|
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
|
||||||
|
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
|
||||||
|
install; \
|
||||||
|
else \
|
||||||
|
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
|
||||||
|
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
|
||||||
|
"INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
|
||||||
|
fi
|
||||||
|
mostlyclean-generic:
|
||||||
|
|
||||||
|
clean-generic:
|
||||||
|
|
||||||
|
distclean-generic:
|
||||||
|
-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
|
||||||
|
-test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
|
||||||
|
|
||||||
|
maintainer-clean-generic:
|
||||||
|
@echo "This command is intended for maintainers to use"
|
||||||
|
@echo "it deletes files that may require special tools to rebuild."
|
||||||
|
clean: clean-am
|
||||||
|
|
||||||
|
clean-am: clean-generic clean-libtool mostlyclean-am
|
||||||
|
|
||||||
|
distclean: distclean-am
|
||||||
|
-rm -f Makefile
|
||||||
|
distclean-am: clean-am distclean-generic
|
||||||
|
|
||||||
|
dvi: dvi-am
|
||||||
|
|
||||||
|
dvi-am:
|
||||||
|
|
||||||
|
html: html-am
|
||||||
|
|
||||||
|
html-am:
|
||||||
|
|
||||||
|
info: info-am
|
||||||
|
|
||||||
|
info-am:
|
||||||
|
|
||||||
|
install-data-am:
|
||||||
|
|
||||||
|
install-dvi: install-dvi-am
|
||||||
|
|
||||||
|
install-dvi-am:
|
||||||
|
|
||||||
|
install-exec-am:
|
||||||
|
|
||||||
|
install-html: install-html-am
|
||||||
|
|
||||||
|
install-html-am:
|
||||||
|
|
||||||
|
install-info: install-info-am
|
||||||
|
|
||||||
|
install-info-am:
|
||||||
|
|
||||||
|
install-man:
|
||||||
|
|
||||||
|
install-pdf: install-pdf-am
|
||||||
|
|
||||||
|
install-pdf-am:
|
||||||
|
|
||||||
|
install-ps: install-ps-am
|
||||||
|
|
||||||
|
install-ps-am:
|
||||||
|
|
||||||
|
installcheck-am:
|
||||||
|
|
||||||
|
maintainer-clean: maintainer-clean-am
|
||||||
|
-rm -f Makefile
|
||||||
|
maintainer-clean-am: distclean-am maintainer-clean-generic
|
||||||
|
|
||||||
|
mostlyclean: mostlyclean-am
|
||||||
|
|
||||||
|
mostlyclean-am: mostlyclean-generic mostlyclean-libtool
|
||||||
|
|
||||||
|
pdf: pdf-am
|
||||||
|
|
||||||
|
pdf-am:
|
||||||
|
|
||||||
|
ps: ps-am
|
||||||
|
|
||||||
|
ps-am:
|
||||||
|
|
||||||
|
uninstall-am:
|
||||||
|
|
||||||
|
.MAKE: install-am install-strip
|
||||||
|
|
||||||
|
.PHONY: all all-am check check-am clean clean-generic clean-libtool \
|
||||||
|
cscopelist-am ctags-am distclean distclean-generic \
|
||||||
|
distclean-libtool distdir dvi dvi-am html html-am info info-am \
|
||||||
|
install install-am install-data install-data-am install-dvi \
|
||||||
|
install-dvi-am install-exec install-exec-am install-html \
|
||||||
|
install-html-am install-info install-info-am install-man \
|
||||||
|
install-pdf install-pdf-am install-ps install-ps-am \
|
||||||
|
install-strip installcheck installcheck-am installdirs \
|
||||||
|
maintainer-clean maintainer-clean-generic mostlyclean \
|
||||||
|
mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
|
||||||
|
tags-am uninstall uninstall-am
|
||||||
|
|
||||||
|
.PRECIOUS: Makefile
|
||||||
|
|
||||||
|
|
||||||
|
docs: doxygen.cfg
|
||||||
|
doxygen $^
|
||||||
|
|
||||||
|
docs-upload: docs
|
||||||
|
ln -s html api
|
||||||
|
ncftpput -f ~/.ncftp/reactivated -m -R httpdocs/fprint api/
|
||||||
|
rm -f api
|
||||||
|
|
||||||
|
# Tell versions [3.59,3.63) of GNU make to not export all variables.
|
||||||
|
# Otherwise a system limit (for SysV at least) may be exceeded.
|
||||||
|
.NOEXPORT:
|
||||||
@@ -0,0 +1,733 @@
|
|||||||
|
# Makefile.in generated by automake 1.15 from Makefile.am.
|
||||||
|
# @configure_input@
|
||||||
|
|
||||||
|
# Copyright (C) 1994-2014 Free Software Foundation, Inc.
|
||||||
|
|
||||||
|
# This Makefile.in is free software; the Free Software Foundation
|
||||||
|
# gives unlimited permission to copy and/or distribute it,
|
||||||
|
# with or without modifications, as long as this notice is preserved.
|
||||||
|
|
||||||
|
# This program is distributed in the hope that it will be useful,
|
||||||
|
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
|
||||||
|
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
|
||||||
|
# PARTICULAR PURPOSE.
|
||||||
|
|
||||||
|
@SET_MAKE@
|
||||||
|
|
||||||
|
VPATH = @srcdir@
|
||||||
|
am__is_gnu_make = { \
|
||||||
|
if test -z '$(MAKELEVEL)'; then \
|
||||||
|
false; \
|
||||||
|
elif test -n '$(MAKE_HOST)'; then \
|
||||||
|
true; \
|
||||||
|
elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
|
||||||
|
true; \
|
||||||
|
else \
|
||||||
|
false; \
|
||||||
|
fi; \
|
||||||
|
}
|
||||||
|
am__make_running_with_option = \
|
||||||
|
case $${target_option-} in \
|
||||||
|
?) ;; \
|
||||||
|
*) echo "am__make_running_with_option: internal error: invalid" \
|
||||||
|
"target option '$${target_option-}' specified" >&2; \
|
||||||
|
exit 1;; \
|
||||||
|
esac; \
|
||||||
|
has_opt=no; \
|
||||||
|
sane_makeflags=$$MAKEFLAGS; \
|
||||||
|
if $(am__is_gnu_make); then \
|
||||||
|
sane_makeflags=$$MFLAGS; \
|
||||||
|
else \
|
||||||
|
case $$MAKEFLAGS in \
|
||||||
|
*\\[\ \ ]*) \
|
||||||
|
bs=\\; \
|
||||||
|
sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \
|
||||||
|
| sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \
|
||||||
|
esac; \
|
||||||
|
fi; \
|
||||||
|
skip_next=no; \
|
||||||
|
strip_trailopt () \
|
||||||
|
{ \
|
||||||
|
flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \
|
||||||
|
}; \
|
||||||
|
for flg in $$sane_makeflags; do \
|
||||||
|
test $$skip_next = yes && { skip_next=no; continue; }; \
|
||||||
|
case $$flg in \
|
||||||
|
*=*|--*) continue;; \
|
||||||
|
-*I) strip_trailopt 'I'; skip_next=yes;; \
|
||||||
|
-*I?*) strip_trailopt 'I';; \
|
||||||
|
-*O) strip_trailopt 'O'; skip_next=yes;; \
|
||||||
|
-*O?*) strip_trailopt 'O';; \
|
||||||
|
-*l) strip_trailopt 'l'; skip_next=yes;; \
|
||||||
|
-*l?*) strip_trailopt 'l';; \
|
||||||
|
-[dEDm]) skip_next=yes;; \
|
||||||
|
-[JT]) skip_next=yes;; \
|
||||||
|
esac; \
|
||||||
|
case $$flg in \
|
||||||
|
*$$target_option*) has_opt=yes; break;; \
|
||||||
|
esac; \
|
||||||
|
done; \
|
||||||
|
test $$has_opt = yes
|
||||||
|
am__make_dryrun = (target_option=n; $(am__make_running_with_option))
|
||||||
|
am__make_keepgoing = (target_option=k; $(am__make_running_with_option))
|
||||||
|
pkgdatadir = $(datadir)/@PACKAGE@
|
||||||
|
pkgincludedir = $(includedir)/@PACKAGE@
|
||||||
|
pkglibdir = $(libdir)/@PACKAGE@
|
||||||
|
pkglibexecdir = $(libexecdir)/@PACKAGE@
|
||||||
|
am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
|
||||||
|
install_sh_DATA = $(install_sh) -c -m 644
|
||||||
|
install_sh_PROGRAM = $(install_sh) -c
|
||||||
|
install_sh_SCRIPT = $(install_sh) -c
|
||||||
|
INSTALL_HEADER = $(INSTALL_DATA)
|
||||||
|
transform = $(program_transform_name)
|
||||||
|
NORMAL_INSTALL = :
|
||||||
|
PRE_INSTALL = :
|
||||||
|
POST_INSTALL = :
|
||||||
|
NORMAL_UNINSTALL = :
|
||||||
|
PRE_UNINSTALL = :
|
||||||
|
POST_UNINSTALL = :
|
||||||
|
build_triplet = @build@
|
||||||
|
host_triplet = @host@
|
||||||
|
noinst_PROGRAMS = verify_live$(EXEEXT) enroll$(EXEEXT) verify$(EXEEXT) \
|
||||||
|
img_capture$(EXEEXT) cpp-test$(EXEEXT) $(am__EXEEXT_1)
|
||||||
|
@BUILD_X11_EXAMPLES_TRUE@am__append_1 = img_capture_continuous
|
||||||
|
subdir = examples
|
||||||
|
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
|
||||||
|
am__aclocal_m4_deps = $(top_srcdir)/m4/libtool.m4 \
|
||||||
|
$(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \
|
||||||
|
$(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \
|
||||||
|
$(top_srcdir)/configure.ac
|
||||||
|
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
|
||||||
|
$(ACLOCAL_M4)
|
||||||
|
DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON)
|
||||||
|
mkinstalldirs = $(install_sh) -d
|
||||||
|
CONFIG_HEADER = $(top_builddir)/config.h
|
||||||
|
CONFIG_CLEAN_FILES =
|
||||||
|
CONFIG_CLEAN_VPATH_FILES =
|
||||||
|
@BUILD_X11_EXAMPLES_TRUE@am__EXEEXT_1 = \
|
||||||
|
@BUILD_X11_EXAMPLES_TRUE@ img_capture_continuous$(EXEEXT)
|
||||||
|
PROGRAMS = $(noinst_PROGRAMS)
|
||||||
|
am_cpp_test_OBJECTS = cpp-test.$(OBJEXT)
|
||||||
|
cpp_test_OBJECTS = $(am_cpp_test_OBJECTS)
|
||||||
|
cpp_test_DEPENDENCIES = ../libfprint/libfprint.la
|
||||||
|
AM_V_lt = $(am__v_lt_@AM_V@)
|
||||||
|
am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@)
|
||||||
|
am__v_lt_0 = --silent
|
||||||
|
am__v_lt_1 =
|
||||||
|
am_enroll_OBJECTS = enroll.$(OBJEXT)
|
||||||
|
enroll_OBJECTS = $(am_enroll_OBJECTS)
|
||||||
|
enroll_DEPENDENCIES = ../libfprint/libfprint.la
|
||||||
|
am_img_capture_OBJECTS = img_capture.$(OBJEXT)
|
||||||
|
img_capture_OBJECTS = $(am_img_capture_OBJECTS)
|
||||||
|
img_capture_DEPENDENCIES = ../libfprint/libfprint.la
|
||||||
|
am__img_capture_continuous_SOURCES_DIST = img_capture_continuous.c
|
||||||
|
@BUILD_X11_EXAMPLES_TRUE@am_img_capture_continuous_OBJECTS = img_capture_continuous-img_capture_continuous.$(OBJEXT)
|
||||||
|
img_capture_continuous_OBJECTS = $(am_img_capture_continuous_OBJECTS)
|
||||||
|
am__DEPENDENCIES_1 =
|
||||||
|
@BUILD_X11_EXAMPLES_TRUE@img_capture_continuous_DEPENDENCIES = \
|
||||||
|
@BUILD_X11_EXAMPLES_TRUE@ ../libfprint/libfprint.la \
|
||||||
|
@BUILD_X11_EXAMPLES_TRUE@ $(am__DEPENDENCIES_1) \
|
||||||
|
@BUILD_X11_EXAMPLES_TRUE@ $(X_EXTRA_LIBS);
|
||||||
|
img_capture_continuous_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \
|
||||||
|
$(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \
|
||||||
|
$(img_capture_continuous_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \
|
||||||
|
$(LDFLAGS) -o $@
|
||||||
|
am_verify_OBJECTS = verify.$(OBJEXT)
|
||||||
|
verify_OBJECTS = $(am_verify_OBJECTS)
|
||||||
|
verify_DEPENDENCIES = ../libfprint/libfprint.la
|
||||||
|
am_verify_live_OBJECTS = verify_live.$(OBJEXT)
|
||||||
|
verify_live_OBJECTS = $(am_verify_live_OBJECTS)
|
||||||
|
verify_live_DEPENDENCIES = ../libfprint/libfprint.la
|
||||||
|
AM_V_P = $(am__v_P_@AM_V@)
|
||||||
|
am__v_P_ = $(am__v_P_@AM_DEFAULT_V@)
|
||||||
|
am__v_P_0 = false
|
||||||
|
am__v_P_1 = :
|
||||||
|
AM_V_GEN = $(am__v_GEN_@AM_V@)
|
||||||
|
am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@)
|
||||||
|
am__v_GEN_0 = @echo " GEN " $@;
|
||||||
|
am__v_GEN_1 =
|
||||||
|
AM_V_at = $(am__v_at_@AM_V@)
|
||||||
|
am__v_at_ = $(am__v_at_@AM_DEFAULT_V@)
|
||||||
|
am__v_at_0 = @
|
||||||
|
am__v_at_1 =
|
||||||
|
DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)
|
||||||
|
depcomp = $(SHELL) $(top_srcdir)/depcomp
|
||||||
|
am__depfiles_maybe = depfiles
|
||||||
|
am__mv = mv -f
|
||||||
|
COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
|
||||||
|
$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
|
||||||
|
LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
|
||||||
|
$(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \
|
||||||
|
$(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
|
||||||
|
$(AM_CFLAGS) $(CFLAGS)
|
||||||
|
AM_V_CC = $(am__v_CC_@AM_V@)
|
||||||
|
am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@)
|
||||||
|
am__v_CC_0 = @echo " CC " $@;
|
||||||
|
am__v_CC_1 =
|
||||||
|
CCLD = $(CC)
|
||||||
|
LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
|
||||||
|
$(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
|
||||||
|
$(AM_LDFLAGS) $(LDFLAGS) -o $@
|
||||||
|
AM_V_CCLD = $(am__v_CCLD_@AM_V@)
|
||||||
|
am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@)
|
||||||
|
am__v_CCLD_0 = @echo " CCLD " $@;
|
||||||
|
am__v_CCLD_1 =
|
||||||
|
CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
|
||||||
|
$(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS)
|
||||||
|
LTCXXCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \
|
||||||
|
$(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) \
|
||||||
|
$(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
|
||||||
|
$(AM_CXXFLAGS) $(CXXFLAGS)
|
||||||
|
AM_V_CXX = $(am__v_CXX_@AM_V@)
|
||||||
|
am__v_CXX_ = $(am__v_CXX_@AM_DEFAULT_V@)
|
||||||
|
am__v_CXX_0 = @echo " CXX " $@;
|
||||||
|
am__v_CXX_1 =
|
||||||
|
CXXLD = $(CXX)
|
||||||
|
CXXLINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \
|
||||||
|
$(LIBTOOLFLAGS) --mode=link $(CXXLD) $(AM_CXXFLAGS) \
|
||||||
|
$(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
|
||||||
|
AM_V_CXXLD = $(am__v_CXXLD_@AM_V@)
|
||||||
|
am__v_CXXLD_ = $(am__v_CXXLD_@AM_DEFAULT_V@)
|
||||||
|
am__v_CXXLD_0 = @echo " CXXLD " $@;
|
||||||
|
am__v_CXXLD_1 =
|
||||||
|
SOURCES = $(cpp_test_SOURCES) $(enroll_SOURCES) $(img_capture_SOURCES) \
|
||||||
|
$(img_capture_continuous_SOURCES) $(verify_SOURCES) \
|
||||||
|
$(verify_live_SOURCES)
|
||||||
|
DIST_SOURCES = $(cpp_test_SOURCES) $(enroll_SOURCES) \
|
||||||
|
$(img_capture_SOURCES) \
|
||||||
|
$(am__img_capture_continuous_SOURCES_DIST) $(verify_SOURCES) \
|
||||||
|
$(verify_live_SOURCES)
|
||||||
|
am__can_run_installinfo = \
|
||||||
|
case $$AM_UPDATE_INFO_DIR in \
|
||||||
|
n|no|NO) false;; \
|
||||||
|
*) (install-info --version) >/dev/null 2>&1;; \
|
||||||
|
esac
|
||||||
|
am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)
|
||||||
|
# Read a list of newline-separated strings from the standard input,
|
||||||
|
# and print each of them once, without duplicates. Input order is
|
||||||
|
# *not* preserved.
|
||||||
|
am__uniquify_input = $(AWK) '\
|
||||||
|
BEGIN { nonempty = 0; } \
|
||||||
|
{ items[$$0] = 1; nonempty = 1; } \
|
||||||
|
END { if (nonempty) { for (i in items) print i; }; } \
|
||||||
|
'
|
||||||
|
# Make sure the list of sources is unique. This is necessary because,
|
||||||
|
# e.g., the same source file might be shared among _SOURCES variables
|
||||||
|
# for different programs/libraries.
|
||||||
|
am__define_uniq_tagged_files = \
|
||||||
|
list='$(am__tagged_files)'; \
|
||||||
|
unique=`for i in $$list; do \
|
||||||
|
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
|
||||||
|
done | $(am__uniquify_input)`
|
||||||
|
ETAGS = etags
|
||||||
|
CTAGS = ctags
|
||||||
|
am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp
|
||||||
|
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
|
||||||
|
ACLOCAL = @ACLOCAL@
|
||||||
|
AMTAR = @AMTAR@
|
||||||
|
AM_CFLAGS = -I$(top_srcdir)
|
||||||
|
AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
|
||||||
|
AR = @AR@
|
||||||
|
AUTOCONF = @AUTOCONF@
|
||||||
|
AUTOHEADER = @AUTOHEADER@
|
||||||
|
AUTOMAKE = @AUTOMAKE@
|
||||||
|
AWK = @AWK@
|
||||||
|
CC = @CC@
|
||||||
|
CCDEPMODE = @CCDEPMODE@
|
||||||
|
CFLAGS = @CFLAGS@
|
||||||
|
CPP = @CPP@
|
||||||
|
CPPFLAGS = @CPPFLAGS@
|
||||||
|
CRYPTO_CFLAGS = @CRYPTO_CFLAGS@
|
||||||
|
CRYPTO_LIBS = @CRYPTO_LIBS@
|
||||||
|
CXX = @CXX@
|
||||||
|
CXXCPP = @CXXCPP@
|
||||||
|
CXXDEPMODE = @CXXDEPMODE@
|
||||||
|
CXXFLAGS = @CXXFLAGS@
|
||||||
|
CYGPATH_W = @CYGPATH_W@
|
||||||
|
DEFS = @DEFS@
|
||||||
|
DEPDIR = @DEPDIR@
|
||||||
|
DLLTOOL = @DLLTOOL@
|
||||||
|
DSYMUTIL = @DSYMUTIL@
|
||||||
|
DUMPBIN = @DUMPBIN@
|
||||||
|
ECHO_C = @ECHO_C@
|
||||||
|
ECHO_N = @ECHO_N@
|
||||||
|
ECHO_T = @ECHO_T@
|
||||||
|
EGREP = @EGREP@
|
||||||
|
EXEEXT = @EXEEXT@
|
||||||
|
FGREP = @FGREP@
|
||||||
|
GLIB_CFLAGS = @GLIB_CFLAGS@
|
||||||
|
GLIB_LIBS = @GLIB_LIBS@
|
||||||
|
GREP = @GREP@
|
||||||
|
IMAGING_CFLAGS = @IMAGING_CFLAGS@
|
||||||
|
IMAGING_LIBS = @IMAGING_LIBS@
|
||||||
|
INSTALL = @INSTALL@
|
||||||
|
INSTALL_DATA = @INSTALL_DATA@
|
||||||
|
INSTALL_PROGRAM = @INSTALL_PROGRAM@
|
||||||
|
INSTALL_SCRIPT = @INSTALL_SCRIPT@
|
||||||
|
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
|
||||||
|
LD = @LD@
|
||||||
|
LDFLAGS = @LDFLAGS@
|
||||||
|
LIBOBJS = @LIBOBJS@
|
||||||
|
LIBS = @LIBS@
|
||||||
|
LIBTOOL = @LIBTOOL@
|
||||||
|
LIBUSB_CFLAGS = @LIBUSB_CFLAGS@
|
||||||
|
LIBUSB_LIBS = @LIBUSB_LIBS@
|
||||||
|
LIPO = @LIPO@
|
||||||
|
LN_S = @LN_S@
|
||||||
|
LTLIBOBJS = @LTLIBOBJS@
|
||||||
|
LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@
|
||||||
|
MAKEINFO = @MAKEINFO@
|
||||||
|
MANIFEST_TOOL = @MANIFEST_TOOL@
|
||||||
|
MKDIR_P = @MKDIR_P@
|
||||||
|
NM = @NM@
|
||||||
|
NMEDIT = @NMEDIT@
|
||||||
|
OBJDUMP = @OBJDUMP@
|
||||||
|
OBJEXT = @OBJEXT@
|
||||||
|
OTOOL = @OTOOL@
|
||||||
|
OTOOL64 = @OTOOL64@
|
||||||
|
PACKAGE = @PACKAGE@
|
||||||
|
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
|
||||||
|
PACKAGE_NAME = @PACKAGE_NAME@
|
||||||
|
PACKAGE_STRING = @PACKAGE_STRING@
|
||||||
|
PACKAGE_TARNAME = @PACKAGE_TARNAME@
|
||||||
|
PACKAGE_URL = @PACKAGE_URL@
|
||||||
|
PACKAGE_VERSION = @PACKAGE_VERSION@
|
||||||
|
PATH_SEPARATOR = @PATH_SEPARATOR@
|
||||||
|
PKG_CONFIG = @PKG_CONFIG@
|
||||||
|
PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@
|
||||||
|
PKG_CONFIG_PATH = @PKG_CONFIG_PATH@
|
||||||
|
RANLIB = @RANLIB@
|
||||||
|
SED = @SED@
|
||||||
|
SET_MAKE = @SET_MAKE@
|
||||||
|
SHELL = @SHELL@
|
||||||
|
STRIP = @STRIP@
|
||||||
|
VERSION = @VERSION@
|
||||||
|
XV_CFLAGS = @XV_CFLAGS@
|
||||||
|
XV_LIBS = @XV_LIBS@
|
||||||
|
abs_builddir = @abs_builddir@
|
||||||
|
abs_srcdir = @abs_srcdir@
|
||||||
|
abs_top_builddir = @abs_top_builddir@
|
||||||
|
abs_top_srcdir = @abs_top_srcdir@
|
||||||
|
ac_ct_AR = @ac_ct_AR@
|
||||||
|
ac_ct_CC = @ac_ct_CC@
|
||||||
|
ac_ct_CXX = @ac_ct_CXX@
|
||||||
|
ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
|
||||||
|
am__include = @am__include@
|
||||||
|
am__leading_dot = @am__leading_dot@
|
||||||
|
am__quote = @am__quote@
|
||||||
|
am__tar = @am__tar@
|
||||||
|
am__untar = @am__untar@
|
||||||
|
bindir = @bindir@
|
||||||
|
build = @build@
|
||||||
|
build_alias = @build_alias@
|
||||||
|
build_cpu = @build_cpu@
|
||||||
|
build_os = @build_os@
|
||||||
|
build_vendor = @build_vendor@
|
||||||
|
builddir = @builddir@
|
||||||
|
datadir = @datadir@
|
||||||
|
datarootdir = @datarootdir@
|
||||||
|
docdir = @docdir@
|
||||||
|
dvidir = @dvidir@
|
||||||
|
exec_prefix = @exec_prefix@
|
||||||
|
host = @host@
|
||||||
|
host_alias = @host_alias@
|
||||||
|
host_cpu = @host_cpu@
|
||||||
|
host_os = @host_os@
|
||||||
|
host_vendor = @host_vendor@
|
||||||
|
htmldir = @htmldir@
|
||||||
|
includedir = @includedir@
|
||||||
|
infodir = @infodir@
|
||||||
|
install_sh = @install_sh@
|
||||||
|
libdir = @libdir@
|
||||||
|
libexecdir = @libexecdir@
|
||||||
|
localedir = @localedir@
|
||||||
|
localstatedir = @localstatedir@
|
||||||
|
lt_age = @lt_age@
|
||||||
|
lt_major = @lt_major@
|
||||||
|
lt_revision = @lt_revision@
|
||||||
|
mandir = @mandir@
|
||||||
|
mkdir_p = @mkdir_p@
|
||||||
|
oldincludedir = @oldincludedir@
|
||||||
|
pdfdir = @pdfdir@
|
||||||
|
prefix = @prefix@
|
||||||
|
program_transform_name = @program_transform_name@
|
||||||
|
psdir = @psdir@
|
||||||
|
sbindir = @sbindir@
|
||||||
|
sharedstatedir = @sharedstatedir@
|
||||||
|
srcdir = @srcdir@
|
||||||
|
sysconfdir = @sysconfdir@
|
||||||
|
target_alias = @target_alias@
|
||||||
|
top_build_prefix = @top_build_prefix@
|
||||||
|
top_builddir = @top_builddir@
|
||||||
|
top_srcdir = @top_srcdir@
|
||||||
|
udev_rulesdir = @udev_rulesdir@
|
||||||
|
verify_live_SOURCES = verify_live.c
|
||||||
|
verify_live_LDADD = ../libfprint/libfprint.la
|
||||||
|
enroll_SOURCES = enroll.c
|
||||||
|
enroll_LDADD = ../libfprint/libfprint.la
|
||||||
|
verify_SOURCES = verify.c
|
||||||
|
verify_LDADD = ../libfprint/libfprint.la
|
||||||
|
img_capture_SOURCES = img_capture.c
|
||||||
|
img_capture_LDADD = ../libfprint/libfprint.la
|
||||||
|
cpp_test_SOURCES = cpp-test.cpp
|
||||||
|
cpp_test_LDADD = ../libfprint/libfprint.la
|
||||||
|
@BUILD_X11_EXAMPLES_TRUE@img_capture_continuous_CFLAGS = $(X_CFLAGS) $(XV_CFLAGS)
|
||||||
|
@BUILD_X11_EXAMPLES_TRUE@img_capture_continuous_SOURCES = img_capture_continuous.c
|
||||||
|
@BUILD_X11_EXAMPLES_TRUE@img_capture_continuous_LDADD = ../libfprint/libfprint.la $(X_LIBS) $(X_PRE_LIBS) $(XV_LIBS) -lX11 $(X_EXTRA_LIBS);
|
||||||
|
all: all-am
|
||||||
|
|
||||||
|
.SUFFIXES:
|
||||||
|
.SUFFIXES: .c .cpp .lo .o .obj
|
||||||
|
$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
|
||||||
|
@for dep in $?; do \
|
||||||
|
case '$(am__configure_deps)' in \
|
||||||
|
*$$dep*) \
|
||||||
|
( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
|
||||||
|
&& { if test -f $@; then exit 0; else break; fi; }; \
|
||||||
|
exit 1;; \
|
||||||
|
esac; \
|
||||||
|
done; \
|
||||||
|
echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu examples/Makefile'; \
|
||||||
|
$(am__cd) $(top_srcdir) && \
|
||||||
|
$(AUTOMAKE) --gnu examples/Makefile
|
||||||
|
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
|
||||||
|
@case '$?' in \
|
||||||
|
*config.status*) \
|
||||||
|
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
|
||||||
|
*) \
|
||||||
|
echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
|
||||||
|
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
|
||||||
|
esac;
|
||||||
|
|
||||||
|
$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
|
||||||
|
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
|
||||||
|
|
||||||
|
$(top_srcdir)/configure: $(am__configure_deps)
|
||||||
|
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
|
||||||
|
$(ACLOCAL_M4): $(am__aclocal_m4_deps)
|
||||||
|
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
|
||||||
|
$(am__aclocal_m4_deps):
|
||||||
|
|
||||||
|
clean-noinstPROGRAMS:
|
||||||
|
@list='$(noinst_PROGRAMS)'; test -n "$$list" || exit 0; \
|
||||||
|
echo " rm -f" $$list; \
|
||||||
|
rm -f $$list || exit $$?; \
|
||||||
|
test -n "$(EXEEXT)" || exit 0; \
|
||||||
|
list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \
|
||||||
|
echo " rm -f" $$list; \
|
||||||
|
rm -f $$list
|
||||||
|
|
||||||
|
cpp-test$(EXEEXT): $(cpp_test_OBJECTS) $(cpp_test_DEPENDENCIES) $(EXTRA_cpp_test_DEPENDENCIES)
|
||||||
|
@rm -f cpp-test$(EXEEXT)
|
||||||
|
$(AM_V_CXXLD)$(CXXLINK) $(cpp_test_OBJECTS) $(cpp_test_LDADD) $(LIBS)
|
||||||
|
|
||||||
|
enroll$(EXEEXT): $(enroll_OBJECTS) $(enroll_DEPENDENCIES) $(EXTRA_enroll_DEPENDENCIES)
|
||||||
|
@rm -f enroll$(EXEEXT)
|
||||||
|
$(AM_V_CCLD)$(LINK) $(enroll_OBJECTS) $(enroll_LDADD) $(LIBS)
|
||||||
|
|
||||||
|
img_capture$(EXEEXT): $(img_capture_OBJECTS) $(img_capture_DEPENDENCIES) $(EXTRA_img_capture_DEPENDENCIES)
|
||||||
|
@rm -f img_capture$(EXEEXT)
|
||||||
|
$(AM_V_CCLD)$(LINK) $(img_capture_OBJECTS) $(img_capture_LDADD) $(LIBS)
|
||||||
|
|
||||||
|
img_capture_continuous$(EXEEXT): $(img_capture_continuous_OBJECTS) $(img_capture_continuous_DEPENDENCIES) $(EXTRA_img_capture_continuous_DEPENDENCIES)
|
||||||
|
@rm -f img_capture_continuous$(EXEEXT)
|
||||||
|
$(AM_V_CCLD)$(img_capture_continuous_LINK) $(img_capture_continuous_OBJECTS) $(img_capture_continuous_LDADD) $(LIBS)
|
||||||
|
|
||||||
|
verify$(EXEEXT): $(verify_OBJECTS) $(verify_DEPENDENCIES) $(EXTRA_verify_DEPENDENCIES)
|
||||||
|
@rm -f verify$(EXEEXT)
|
||||||
|
$(AM_V_CCLD)$(LINK) $(verify_OBJECTS) $(verify_LDADD) $(LIBS)
|
||||||
|
|
||||||
|
verify_live$(EXEEXT): $(verify_live_OBJECTS) $(verify_live_DEPENDENCIES) $(EXTRA_verify_live_DEPENDENCIES)
|
||||||
|
@rm -f verify_live$(EXEEXT)
|
||||||
|
$(AM_V_CCLD)$(LINK) $(verify_live_OBJECTS) $(verify_live_LDADD) $(LIBS)
|
||||||
|
|
||||||
|
mostlyclean-compile:
|
||||||
|
-rm -f *.$(OBJEXT)
|
||||||
|
|
||||||
|
distclean-compile:
|
||||||
|
-rm -f *.tab.c
|
||||||
|
|
||||||
|
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cpp-test.Po@am__quote@
|
||||||
|
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/enroll.Po@am__quote@
|
||||||
|
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/img_capture.Po@am__quote@
|
||||||
|
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/img_capture_continuous-img_capture_continuous.Po@am__quote@
|
||||||
|
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/verify.Po@am__quote@
|
||||||
|
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/verify_live.Po@am__quote@
|
||||||
|
|
||||||
|
.c.o:
|
||||||
|
@am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.o$$||'`;\
|
||||||
|
@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\
|
||||||
|
@am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po
|
||||||
|
@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
|
||||||
|
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||||
|
@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $<
|
||||||
|
|
||||||
|
.c.obj:
|
||||||
|
@am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.obj$$||'`;\
|
||||||
|
@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ `$(CYGPATH_W) '$<'` &&\
|
||||||
|
@am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po
|
||||||
|
@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
|
||||||
|
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||||
|
@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'`
|
||||||
|
|
||||||
|
.c.lo:
|
||||||
|
@am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.lo$$||'`;\
|
||||||
|
@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\
|
||||||
|
@am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Plo
|
||||||
|
@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
|
||||||
|
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||||
|
@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $<
|
||||||
|
|
||||||
|
img_capture_continuous-img_capture_continuous.o: img_capture_continuous.c
|
||||||
|
@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(img_capture_continuous_CFLAGS) $(CFLAGS) -MT img_capture_continuous-img_capture_continuous.o -MD -MP -MF $(DEPDIR)/img_capture_continuous-img_capture_continuous.Tpo -c -o img_capture_continuous-img_capture_continuous.o `test -f 'img_capture_continuous.c' || echo '$(srcdir)/'`img_capture_continuous.c
|
||||||
|
@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/img_capture_continuous-img_capture_continuous.Tpo $(DEPDIR)/img_capture_continuous-img_capture_continuous.Po
|
||||||
|
@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='img_capture_continuous.c' object='img_capture_continuous-img_capture_continuous.o' libtool=no @AMDEPBACKSLASH@
|
||||||
|
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||||
|
@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(img_capture_continuous_CFLAGS) $(CFLAGS) -c -o img_capture_continuous-img_capture_continuous.o `test -f 'img_capture_continuous.c' || echo '$(srcdir)/'`img_capture_continuous.c
|
||||||
|
|
||||||
|
img_capture_continuous-img_capture_continuous.obj: img_capture_continuous.c
|
||||||
|
@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(img_capture_continuous_CFLAGS) $(CFLAGS) -MT img_capture_continuous-img_capture_continuous.obj -MD -MP -MF $(DEPDIR)/img_capture_continuous-img_capture_continuous.Tpo -c -o img_capture_continuous-img_capture_continuous.obj `if test -f 'img_capture_continuous.c'; then $(CYGPATH_W) 'img_capture_continuous.c'; else $(CYGPATH_W) '$(srcdir)/img_capture_continuous.c'; fi`
|
||||||
|
@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/img_capture_continuous-img_capture_continuous.Tpo $(DEPDIR)/img_capture_continuous-img_capture_continuous.Po
|
||||||
|
@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='img_capture_continuous.c' object='img_capture_continuous-img_capture_continuous.obj' libtool=no @AMDEPBACKSLASH@
|
||||||
|
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||||
|
@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(img_capture_continuous_CFLAGS) $(CFLAGS) -c -o img_capture_continuous-img_capture_continuous.obj `if test -f 'img_capture_continuous.c'; then $(CYGPATH_W) 'img_capture_continuous.c'; else $(CYGPATH_W) '$(srcdir)/img_capture_continuous.c'; fi`
|
||||||
|
|
||||||
|
.cpp.o:
|
||||||
|
@am__fastdepCXX_TRUE@ $(AM_V_CXX)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.o$$||'`;\
|
||||||
|
@am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\
|
||||||
|
@am__fastdepCXX_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po
|
||||||
|
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
|
||||||
|
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||||
|
@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXXCOMPILE) -c -o $@ $<
|
||||||
|
|
||||||
|
.cpp.obj:
|
||||||
|
@am__fastdepCXX_TRUE@ $(AM_V_CXX)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.obj$$||'`;\
|
||||||
|
@am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ `$(CYGPATH_W) '$<'` &&\
|
||||||
|
@am__fastdepCXX_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po
|
||||||
|
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
|
||||||
|
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||||
|
@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'`
|
||||||
|
|
||||||
|
.cpp.lo:
|
||||||
|
@am__fastdepCXX_TRUE@ $(AM_V_CXX)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.lo$$||'`;\
|
||||||
|
@am__fastdepCXX_TRUE@ $(LTCXXCOMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\
|
||||||
|
@am__fastdepCXX_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Plo
|
||||||
|
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
|
||||||
|
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||||
|
@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LTCXXCOMPILE) -c -o $@ $<
|
||||||
|
|
||||||
|
mostlyclean-libtool:
|
||||||
|
-rm -f *.lo
|
||||||
|
|
||||||
|
clean-libtool:
|
||||||
|
-rm -rf .libs _libs
|
||||||
|
|
||||||
|
ID: $(am__tagged_files)
|
||||||
|
$(am__define_uniq_tagged_files); mkid -fID $$unique
|
||||||
|
tags: tags-am
|
||||||
|
TAGS: tags
|
||||||
|
|
||||||
|
tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
|
||||||
|
set x; \
|
||||||
|
here=`pwd`; \
|
||||||
|
$(am__define_uniq_tagged_files); \
|
||||||
|
shift; \
|
||||||
|
if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
|
||||||
|
test -n "$$unique" || unique=$$empty_fix; \
|
||||||
|
if test $$# -gt 0; then \
|
||||||
|
$(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
|
||||||
|
"$$@" $$unique; \
|
||||||
|
else \
|
||||||
|
$(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
|
||||||
|
$$unique; \
|
||||||
|
fi; \
|
||||||
|
fi
|
||||||
|
ctags: ctags-am
|
||||||
|
|
||||||
|
CTAGS: ctags
|
||||||
|
ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
|
||||||
|
$(am__define_uniq_tagged_files); \
|
||||||
|
test -z "$(CTAGS_ARGS)$$unique" \
|
||||||
|
|| $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
|
||||||
|
$$unique
|
||||||
|
|
||||||
|
GTAGS:
|
||||||
|
here=`$(am__cd) $(top_builddir) && pwd` \
|
||||||
|
&& $(am__cd) $(top_srcdir) \
|
||||||
|
&& gtags -i $(GTAGS_ARGS) "$$here"
|
||||||
|
cscopelist: cscopelist-am
|
||||||
|
|
||||||
|
cscopelist-am: $(am__tagged_files)
|
||||||
|
list='$(am__tagged_files)'; \
|
||||||
|
case "$(srcdir)" in \
|
||||||
|
[\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \
|
||||||
|
*) sdir=$(subdir)/$(srcdir) ;; \
|
||||||
|
esac; \
|
||||||
|
for i in $$list; do \
|
||||||
|
if test -f "$$i"; then \
|
||||||
|
echo "$(subdir)/$$i"; \
|
||||||
|
else \
|
||||||
|
echo "$$sdir/$$i"; \
|
||||||
|
fi; \
|
||||||
|
done >> $(top_builddir)/cscope.files
|
||||||
|
|
||||||
|
distclean-tags:
|
||||||
|
-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
|
||||||
|
|
||||||
|
distdir: $(DISTFILES)
|
||||||
|
@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
|
||||||
|
topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
|
||||||
|
list='$(DISTFILES)'; \
|
||||||
|
dist_files=`for file in $$list; do echo $$file; done | \
|
||||||
|
sed -e "s|^$$srcdirstrip/||;t" \
|
||||||
|
-e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
|
||||||
|
case $$dist_files in \
|
||||||
|
*/*) $(MKDIR_P) `echo "$$dist_files" | \
|
||||||
|
sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
|
||||||
|
sort -u` ;; \
|
||||||
|
esac; \
|
||||||
|
for file in $$dist_files; do \
|
||||||
|
if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
|
||||||
|
if test -d $$d/$$file; then \
|
||||||
|
dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
|
||||||
|
if test -d "$(distdir)/$$file"; then \
|
||||||
|
find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
|
||||||
|
fi; \
|
||||||
|
if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
|
||||||
|
cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
|
||||||
|
find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
|
||||||
|
fi; \
|
||||||
|
cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
|
||||||
|
else \
|
||||||
|
test -f "$(distdir)/$$file" \
|
||||||
|
|| cp -p $$d/$$file "$(distdir)/$$file" \
|
||||||
|
|| exit 1; \
|
||||||
|
fi; \
|
||||||
|
done
|
||||||
|
check-am: all-am
|
||||||
|
check: check-am
|
||||||
|
all-am: Makefile $(PROGRAMS)
|
||||||
|
installdirs:
|
||||||
|
install: install-am
|
||||||
|
install-exec: install-exec-am
|
||||||
|
install-data: install-data-am
|
||||||
|
uninstall: uninstall-am
|
||||||
|
|
||||||
|
install-am: all-am
|
||||||
|
@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
|
||||||
|
|
||||||
|
installcheck: installcheck-am
|
||||||
|
install-strip:
|
||||||
|
if test -z '$(STRIP)'; then \
|
||||||
|
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
|
||||||
|
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
|
||||||
|
install; \
|
||||||
|
else \
|
||||||
|
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
|
||||||
|
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
|
||||||
|
"INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
|
||||||
|
fi
|
||||||
|
mostlyclean-generic:
|
||||||
|
|
||||||
|
clean-generic:
|
||||||
|
|
||||||
|
distclean-generic:
|
||||||
|
-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
|
||||||
|
-test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
|
||||||
|
|
||||||
|
maintainer-clean-generic:
|
||||||
|
@echo "This command is intended for maintainers to use"
|
||||||
|
@echo "it deletes files that may require special tools to rebuild."
|
||||||
|
clean: clean-am
|
||||||
|
|
||||||
|
clean-am: clean-generic clean-libtool clean-noinstPROGRAMS \
|
||||||
|
mostlyclean-am
|
||||||
|
|
||||||
|
distclean: distclean-am
|
||||||
|
-rm -rf ./$(DEPDIR)
|
||||||
|
-rm -f Makefile
|
||||||
|
distclean-am: clean-am distclean-compile distclean-generic \
|
||||||
|
distclean-tags
|
||||||
|
|
||||||
|
dvi: dvi-am
|
||||||
|
|
||||||
|
dvi-am:
|
||||||
|
|
||||||
|
html: html-am
|
||||||
|
|
||||||
|
html-am:
|
||||||
|
|
||||||
|
info: info-am
|
||||||
|
|
||||||
|
info-am:
|
||||||
|
|
||||||
|
install-data-am:
|
||||||
|
|
||||||
|
install-dvi: install-dvi-am
|
||||||
|
|
||||||
|
install-dvi-am:
|
||||||
|
|
||||||
|
install-exec-am:
|
||||||
|
|
||||||
|
install-html: install-html-am
|
||||||
|
|
||||||
|
install-html-am:
|
||||||
|
|
||||||
|
install-info: install-info-am
|
||||||
|
|
||||||
|
install-info-am:
|
||||||
|
|
||||||
|
install-man:
|
||||||
|
|
||||||
|
install-pdf: install-pdf-am
|
||||||
|
|
||||||
|
install-pdf-am:
|
||||||
|
|
||||||
|
install-ps: install-ps-am
|
||||||
|
|
||||||
|
install-ps-am:
|
||||||
|
|
||||||
|
installcheck-am:
|
||||||
|
|
||||||
|
maintainer-clean: maintainer-clean-am
|
||||||
|
-rm -rf ./$(DEPDIR)
|
||||||
|
-rm -f Makefile
|
||||||
|
maintainer-clean-am: distclean-am maintainer-clean-generic
|
||||||
|
|
||||||
|
mostlyclean: mostlyclean-am
|
||||||
|
|
||||||
|
mostlyclean-am: mostlyclean-compile mostlyclean-generic \
|
||||||
|
mostlyclean-libtool
|
||||||
|
|
||||||
|
pdf: pdf-am
|
||||||
|
|
||||||
|
pdf-am:
|
||||||
|
|
||||||
|
ps: ps-am
|
||||||
|
|
||||||
|
ps-am:
|
||||||
|
|
||||||
|
uninstall-am:
|
||||||
|
|
||||||
|
.MAKE: install-am install-strip
|
||||||
|
|
||||||
|
.PHONY: CTAGS GTAGS TAGS all all-am check check-am clean clean-generic \
|
||||||
|
clean-libtool clean-noinstPROGRAMS cscopelist-am ctags \
|
||||||
|
ctags-am distclean distclean-compile distclean-generic \
|
||||||
|
distclean-libtool distclean-tags distdir dvi dvi-am html \
|
||||||
|
html-am info info-am install install-am install-data \
|
||||||
|
install-data-am install-dvi install-dvi-am install-exec \
|
||||||
|
install-exec-am install-html install-html-am install-info \
|
||||||
|
install-info-am install-man install-pdf install-pdf-am \
|
||||||
|
install-ps install-ps-am install-strip installcheck \
|
||||||
|
installcheck-am installdirs maintainer-clean \
|
||||||
|
maintainer-clean-generic mostlyclean mostlyclean-compile \
|
||||||
|
mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
|
||||||
|
tags tags-am uninstall uninstall-am
|
||||||
|
|
||||||
|
.PRECIOUS: Makefile
|
||||||
|
|
||||||
|
|
||||||
|
# Tell versions [3.59,3.63) of GNU make to not export all variables.
|
||||||
|
# Otherwise a system limit (for SysV at least) may be exceeded.
|
||||||
|
.NOEXPORT:
|
||||||
Executable
+527
@@ -0,0 +1,527 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
# install - install a program, script, or datafile
|
||||||
|
|
||||||
|
scriptversion=2011-11-20.07; # UTC
|
||||||
|
|
||||||
|
# This originates from X11R5 (mit/util/scripts/install.sh), which was
|
||||||
|
# later released in X11R6 (xc/config/util/install.sh) with the
|
||||||
|
# following copyright and license.
|
||||||
|
#
|
||||||
|
# Copyright (C) 1994 X Consortium
|
||||||
|
#
|
||||||
|
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
|
# of this software and associated documentation files (the "Software"), to
|
||||||
|
# deal in the Software without restriction, including without limitation the
|
||||||
|
# rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
|
||||||
|
# sell copies of the Software, and to permit persons to whom the Software is
|
||||||
|
# furnished to do so, subject to the following conditions:
|
||||||
|
#
|
||||||
|
# The above copyright notice and this permission notice shall be included in
|
||||||
|
# all copies or substantial portions of the Software.
|
||||||
|
#
|
||||||
|
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||||
|
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||||
|
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||||
|
# X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
|
||||||
|
# AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNEC-
|
||||||
|
# TION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||||
|
#
|
||||||
|
# Except as contained in this notice, the name of the X Consortium shall not
|
||||||
|
# be used in advertising or otherwise to promote the sale, use or other deal-
|
||||||
|
# ings in this Software without prior written authorization from the X Consor-
|
||||||
|
# tium.
|
||||||
|
#
|
||||||
|
#
|
||||||
|
# FSF changes to this file are in the public domain.
|
||||||
|
#
|
||||||
|
# Calling this script install-sh is preferred over install.sh, to prevent
|
||||||
|
# 'make' implicit rules from creating a file called install from it
|
||||||
|
# when there is no Makefile.
|
||||||
|
#
|
||||||
|
# This script is compatible with the BSD install script, but was written
|
||||||
|
# from scratch.
|
||||||
|
|
||||||
|
nl='
|
||||||
|
'
|
||||||
|
IFS=" "" $nl"
|
||||||
|
|
||||||
|
# set DOITPROG to echo to test this script
|
||||||
|
|
||||||
|
# Don't use :- since 4.3BSD and earlier shells don't like it.
|
||||||
|
doit=${DOITPROG-}
|
||||||
|
if test -z "$doit"; then
|
||||||
|
doit_exec=exec
|
||||||
|
else
|
||||||
|
doit_exec=$doit
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Put in absolute file names if you don't have them in your path;
|
||||||
|
# or use environment vars.
|
||||||
|
|
||||||
|
chgrpprog=${CHGRPPROG-chgrp}
|
||||||
|
chmodprog=${CHMODPROG-chmod}
|
||||||
|
chownprog=${CHOWNPROG-chown}
|
||||||
|
cmpprog=${CMPPROG-cmp}
|
||||||
|
cpprog=${CPPROG-cp}
|
||||||
|
mkdirprog=${MKDIRPROG-mkdir}
|
||||||
|
mvprog=${MVPROG-mv}
|
||||||
|
rmprog=${RMPROG-rm}
|
||||||
|
stripprog=${STRIPPROG-strip}
|
||||||
|
|
||||||
|
posix_glob='?'
|
||||||
|
initialize_posix_glob='
|
||||||
|
test "$posix_glob" != "?" || {
|
||||||
|
if (set -f) 2>/dev/null; then
|
||||||
|
posix_glob=
|
||||||
|
else
|
||||||
|
posix_glob=:
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
'
|
||||||
|
|
||||||
|
posix_mkdir=
|
||||||
|
|
||||||
|
# Desired mode of installed file.
|
||||||
|
mode=0755
|
||||||
|
|
||||||
|
chgrpcmd=
|
||||||
|
chmodcmd=$chmodprog
|
||||||
|
chowncmd=
|
||||||
|
mvcmd=$mvprog
|
||||||
|
rmcmd="$rmprog -f"
|
||||||
|
stripcmd=
|
||||||
|
|
||||||
|
src=
|
||||||
|
dst=
|
||||||
|
dir_arg=
|
||||||
|
dst_arg=
|
||||||
|
|
||||||
|
copy_on_change=false
|
||||||
|
no_target_directory=
|
||||||
|
|
||||||
|
usage="\
|
||||||
|
Usage: $0 [OPTION]... [-T] SRCFILE DSTFILE
|
||||||
|
or: $0 [OPTION]... SRCFILES... DIRECTORY
|
||||||
|
or: $0 [OPTION]... -t DIRECTORY SRCFILES...
|
||||||
|
or: $0 [OPTION]... -d DIRECTORIES...
|
||||||
|
|
||||||
|
In the 1st form, copy SRCFILE to DSTFILE.
|
||||||
|
In the 2nd and 3rd, copy all SRCFILES to DIRECTORY.
|
||||||
|
In the 4th, create DIRECTORIES.
|
||||||
|
|
||||||
|
Options:
|
||||||
|
--help display this help and exit.
|
||||||
|
--version display version info and exit.
|
||||||
|
|
||||||
|
-c (ignored)
|
||||||
|
-C install only if different (preserve the last data modification time)
|
||||||
|
-d create directories instead of installing files.
|
||||||
|
-g GROUP $chgrpprog installed files to GROUP.
|
||||||
|
-m MODE $chmodprog installed files to MODE.
|
||||||
|
-o USER $chownprog installed files to USER.
|
||||||
|
-s $stripprog installed files.
|
||||||
|
-t DIRECTORY install into DIRECTORY.
|
||||||
|
-T report an error if DSTFILE is a directory.
|
||||||
|
|
||||||
|
Environment variables override the default commands:
|
||||||
|
CHGRPPROG CHMODPROG CHOWNPROG CMPPROG CPPROG MKDIRPROG MVPROG
|
||||||
|
RMPROG STRIPPROG
|
||||||
|
"
|
||||||
|
|
||||||
|
while test $# -ne 0; do
|
||||||
|
case $1 in
|
||||||
|
-c) ;;
|
||||||
|
|
||||||
|
-C) copy_on_change=true;;
|
||||||
|
|
||||||
|
-d) dir_arg=true;;
|
||||||
|
|
||||||
|
-g) chgrpcmd="$chgrpprog $2"
|
||||||
|
shift;;
|
||||||
|
|
||||||
|
--help) echo "$usage"; exit $?;;
|
||||||
|
|
||||||
|
-m) mode=$2
|
||||||
|
case $mode in
|
||||||
|
*' '* | *' '* | *'
|
||||||
|
'* | *'*'* | *'?'* | *'['*)
|
||||||
|
echo "$0: invalid mode: $mode" >&2
|
||||||
|
exit 1;;
|
||||||
|
esac
|
||||||
|
shift;;
|
||||||
|
|
||||||
|
-o) chowncmd="$chownprog $2"
|
||||||
|
shift;;
|
||||||
|
|
||||||
|
-s) stripcmd=$stripprog;;
|
||||||
|
|
||||||
|
-t) dst_arg=$2
|
||||||
|
# Protect names problematic for 'test' and other utilities.
|
||||||
|
case $dst_arg in
|
||||||
|
-* | [=\(\)!]) dst_arg=./$dst_arg;;
|
||||||
|
esac
|
||||||
|
shift;;
|
||||||
|
|
||||||
|
-T) no_target_directory=true;;
|
||||||
|
|
||||||
|
--version) echo "$0 $scriptversion"; exit $?;;
|
||||||
|
|
||||||
|
--) shift
|
||||||
|
break;;
|
||||||
|
|
||||||
|
-*) echo "$0: invalid option: $1" >&2
|
||||||
|
exit 1;;
|
||||||
|
|
||||||
|
*) break;;
|
||||||
|
esac
|
||||||
|
shift
|
||||||
|
done
|
||||||
|
|
||||||
|
if test $# -ne 0 && test -z "$dir_arg$dst_arg"; then
|
||||||
|
# When -d is used, all remaining arguments are directories to create.
|
||||||
|
# When -t is used, the destination is already specified.
|
||||||
|
# Otherwise, the last argument is the destination. Remove it from $@.
|
||||||
|
for arg
|
||||||
|
do
|
||||||
|
if test -n "$dst_arg"; then
|
||||||
|
# $@ is not empty: it contains at least $arg.
|
||||||
|
set fnord "$@" "$dst_arg"
|
||||||
|
shift # fnord
|
||||||
|
fi
|
||||||
|
shift # arg
|
||||||
|
dst_arg=$arg
|
||||||
|
# Protect names problematic for 'test' and other utilities.
|
||||||
|
case $dst_arg in
|
||||||
|
-* | [=\(\)!]) dst_arg=./$dst_arg;;
|
||||||
|
esac
|
||||||
|
done
|
||||||
|
fi
|
||||||
|
|
||||||
|
if test $# -eq 0; then
|
||||||
|
if test -z "$dir_arg"; then
|
||||||
|
echo "$0: no input file specified." >&2
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
# It's OK to call 'install-sh -d' without argument.
|
||||||
|
# This can happen when creating conditional directories.
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
|
||||||
|
if test -z "$dir_arg"; then
|
||||||
|
do_exit='(exit $ret); exit $ret'
|
||||||
|
trap "ret=129; $do_exit" 1
|
||||||
|
trap "ret=130; $do_exit" 2
|
||||||
|
trap "ret=141; $do_exit" 13
|
||||||
|
trap "ret=143; $do_exit" 15
|
||||||
|
|
||||||
|
# Set umask so as not to create temps with too-generous modes.
|
||||||
|
# However, 'strip' requires both read and write access to temps.
|
||||||
|
case $mode in
|
||||||
|
# Optimize common cases.
|
||||||
|
*644) cp_umask=133;;
|
||||||
|
*755) cp_umask=22;;
|
||||||
|
|
||||||
|
*[0-7])
|
||||||
|
if test -z "$stripcmd"; then
|
||||||
|
u_plus_rw=
|
||||||
|
else
|
||||||
|
u_plus_rw='% 200'
|
||||||
|
fi
|
||||||
|
cp_umask=`expr '(' 777 - $mode % 1000 ')' $u_plus_rw`;;
|
||||||
|
*)
|
||||||
|
if test -z "$stripcmd"; then
|
||||||
|
u_plus_rw=
|
||||||
|
else
|
||||||
|
u_plus_rw=,u+rw
|
||||||
|
fi
|
||||||
|
cp_umask=$mode$u_plus_rw;;
|
||||||
|
esac
|
||||||
|
fi
|
||||||
|
|
||||||
|
for src
|
||||||
|
do
|
||||||
|
# Protect names problematic for 'test' and other utilities.
|
||||||
|
case $src in
|
||||||
|
-* | [=\(\)!]) src=./$src;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
if test -n "$dir_arg"; then
|
||||||
|
dst=$src
|
||||||
|
dstdir=$dst
|
||||||
|
test -d "$dstdir"
|
||||||
|
dstdir_status=$?
|
||||||
|
else
|
||||||
|
|
||||||
|
# Waiting for this to be detected by the "$cpprog $src $dsttmp" command
|
||||||
|
# might cause directories to be created, which would be especially bad
|
||||||
|
# if $src (and thus $dsttmp) contains '*'.
|
||||||
|
if test ! -f "$src" && test ! -d "$src"; then
|
||||||
|
echo "$0: $src does not exist." >&2
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
if test -z "$dst_arg"; then
|
||||||
|
echo "$0: no destination specified." >&2
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
dst=$dst_arg
|
||||||
|
|
||||||
|
# If destination is a directory, append the input filename; won't work
|
||||||
|
# if double slashes aren't ignored.
|
||||||
|
if test -d "$dst"; then
|
||||||
|
if test -n "$no_target_directory"; then
|
||||||
|
echo "$0: $dst_arg: Is a directory" >&2
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
dstdir=$dst
|
||||||
|
dst=$dstdir/`basename "$src"`
|
||||||
|
dstdir_status=0
|
||||||
|
else
|
||||||
|
# Prefer dirname, but fall back on a substitute if dirname fails.
|
||||||
|
dstdir=`
|
||||||
|
(dirname "$dst") 2>/dev/null ||
|
||||||
|
expr X"$dst" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
|
||||||
|
X"$dst" : 'X\(//\)[^/]' \| \
|
||||||
|
X"$dst" : 'X\(//\)$' \| \
|
||||||
|
X"$dst" : 'X\(/\)' \| . 2>/dev/null ||
|
||||||
|
echo X"$dst" |
|
||||||
|
sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
|
||||||
|
s//\1/
|
||||||
|
q
|
||||||
|
}
|
||||||
|
/^X\(\/\/\)[^/].*/{
|
||||||
|
s//\1/
|
||||||
|
q
|
||||||
|
}
|
||||||
|
/^X\(\/\/\)$/{
|
||||||
|
s//\1/
|
||||||
|
q
|
||||||
|
}
|
||||||
|
/^X\(\/\).*/{
|
||||||
|
s//\1/
|
||||||
|
q
|
||||||
|
}
|
||||||
|
s/.*/./; q'
|
||||||
|
`
|
||||||
|
|
||||||
|
test -d "$dstdir"
|
||||||
|
dstdir_status=$?
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
obsolete_mkdir_used=false
|
||||||
|
|
||||||
|
if test $dstdir_status != 0; then
|
||||||
|
case $posix_mkdir in
|
||||||
|
'')
|
||||||
|
# Create intermediate dirs using mode 755 as modified by the umask.
|
||||||
|
# This is like FreeBSD 'install' as of 1997-10-28.
|
||||||
|
umask=`umask`
|
||||||
|
case $stripcmd.$umask in
|
||||||
|
# Optimize common cases.
|
||||||
|
*[2367][2367]) mkdir_umask=$umask;;
|
||||||
|
.*0[02][02] | .[02][02] | .[02]) mkdir_umask=22;;
|
||||||
|
|
||||||
|
*[0-7])
|
||||||
|
mkdir_umask=`expr $umask + 22 \
|
||||||
|
- $umask % 100 % 40 + $umask % 20 \
|
||||||
|
- $umask % 10 % 4 + $umask % 2
|
||||||
|
`;;
|
||||||
|
*) mkdir_umask=$umask,go-w;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
# With -d, create the new directory with the user-specified mode.
|
||||||
|
# Otherwise, rely on $mkdir_umask.
|
||||||
|
if test -n "$dir_arg"; then
|
||||||
|
mkdir_mode=-m$mode
|
||||||
|
else
|
||||||
|
mkdir_mode=
|
||||||
|
fi
|
||||||
|
|
||||||
|
posix_mkdir=false
|
||||||
|
case $umask in
|
||||||
|
*[123567][0-7][0-7])
|
||||||
|
# POSIX mkdir -p sets u+wx bits regardless of umask, which
|
||||||
|
# is incompatible with FreeBSD 'install' when (umask & 300) != 0.
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
tmpdir=${TMPDIR-/tmp}/ins$RANDOM-$$
|
||||||
|
trap 'ret=$?; rmdir "$tmpdir/d" "$tmpdir" 2>/dev/null; exit $ret' 0
|
||||||
|
|
||||||
|
if (umask $mkdir_umask &&
|
||||||
|
exec $mkdirprog $mkdir_mode -p -- "$tmpdir/d") >/dev/null 2>&1
|
||||||
|
then
|
||||||
|
if test -z "$dir_arg" || {
|
||||||
|
# Check for POSIX incompatibilities with -m.
|
||||||
|
# HP-UX 11.23 and IRIX 6.5 mkdir -m -p sets group- or
|
||||||
|
# other-writable bit of parent directory when it shouldn't.
|
||||||
|
# FreeBSD 6.1 mkdir -m -p sets mode of existing directory.
|
||||||
|
ls_ld_tmpdir=`ls -ld "$tmpdir"`
|
||||||
|
case $ls_ld_tmpdir in
|
||||||
|
d????-?r-*) different_mode=700;;
|
||||||
|
d????-?--*) different_mode=755;;
|
||||||
|
*) false;;
|
||||||
|
esac &&
|
||||||
|
$mkdirprog -m$different_mode -p -- "$tmpdir" && {
|
||||||
|
ls_ld_tmpdir_1=`ls -ld "$tmpdir"`
|
||||||
|
test "$ls_ld_tmpdir" = "$ls_ld_tmpdir_1"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
then posix_mkdir=:
|
||||||
|
fi
|
||||||
|
rmdir "$tmpdir/d" "$tmpdir"
|
||||||
|
else
|
||||||
|
# Remove any dirs left behind by ancient mkdir implementations.
|
||||||
|
rmdir ./$mkdir_mode ./-p ./-- 2>/dev/null
|
||||||
|
fi
|
||||||
|
trap '' 0;;
|
||||||
|
esac;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
if
|
||||||
|
$posix_mkdir && (
|
||||||
|
umask $mkdir_umask &&
|
||||||
|
$doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir"
|
||||||
|
)
|
||||||
|
then :
|
||||||
|
else
|
||||||
|
|
||||||
|
# The umask is ridiculous, or mkdir does not conform to POSIX,
|
||||||
|
# or it failed possibly due to a race condition. Create the
|
||||||
|
# directory the slow way, step by step, checking for races as we go.
|
||||||
|
|
||||||
|
case $dstdir in
|
||||||
|
/*) prefix='/';;
|
||||||
|
[-=\(\)!]*) prefix='./';;
|
||||||
|
*) prefix='';;
|
||||||
|
esac
|
||||||
|
|
||||||
|
eval "$initialize_posix_glob"
|
||||||
|
|
||||||
|
oIFS=$IFS
|
||||||
|
IFS=/
|
||||||
|
$posix_glob set -f
|
||||||
|
set fnord $dstdir
|
||||||
|
shift
|
||||||
|
$posix_glob set +f
|
||||||
|
IFS=$oIFS
|
||||||
|
|
||||||
|
prefixes=
|
||||||
|
|
||||||
|
for d
|
||||||
|
do
|
||||||
|
test X"$d" = X && continue
|
||||||
|
|
||||||
|
prefix=$prefix$d
|
||||||
|
if test -d "$prefix"; then
|
||||||
|
prefixes=
|
||||||
|
else
|
||||||
|
if $posix_mkdir; then
|
||||||
|
(umask=$mkdir_umask &&
|
||||||
|
$doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir") && break
|
||||||
|
# Don't fail if two instances are running concurrently.
|
||||||
|
test -d "$prefix" || exit 1
|
||||||
|
else
|
||||||
|
case $prefix in
|
||||||
|
*\'*) qprefix=`echo "$prefix" | sed "s/'/'\\\\\\\\''/g"`;;
|
||||||
|
*) qprefix=$prefix;;
|
||||||
|
esac
|
||||||
|
prefixes="$prefixes '$qprefix'"
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
prefix=$prefix/
|
||||||
|
done
|
||||||
|
|
||||||
|
if test -n "$prefixes"; then
|
||||||
|
# Don't fail if two instances are running concurrently.
|
||||||
|
(umask $mkdir_umask &&
|
||||||
|
eval "\$doit_exec \$mkdirprog $prefixes") ||
|
||||||
|
test -d "$dstdir" || exit 1
|
||||||
|
obsolete_mkdir_used=true
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
if test -n "$dir_arg"; then
|
||||||
|
{ test -z "$chowncmd" || $doit $chowncmd "$dst"; } &&
|
||||||
|
{ test -z "$chgrpcmd" || $doit $chgrpcmd "$dst"; } &&
|
||||||
|
{ test "$obsolete_mkdir_used$chowncmd$chgrpcmd" = false ||
|
||||||
|
test -z "$chmodcmd" || $doit $chmodcmd $mode "$dst"; } || exit 1
|
||||||
|
else
|
||||||
|
|
||||||
|
# Make a couple of temp file names in the proper directory.
|
||||||
|
dsttmp=$dstdir/_inst.$$_
|
||||||
|
rmtmp=$dstdir/_rm.$$_
|
||||||
|
|
||||||
|
# Trap to clean up those temp files at exit.
|
||||||
|
trap 'ret=$?; rm -f "$dsttmp" "$rmtmp" && exit $ret' 0
|
||||||
|
|
||||||
|
# Copy the file name to the temp name.
|
||||||
|
(umask $cp_umask && $doit_exec $cpprog "$src" "$dsttmp") &&
|
||||||
|
|
||||||
|
# and set any options; do chmod last to preserve setuid bits.
|
||||||
|
#
|
||||||
|
# If any of these fail, we abort the whole thing. If we want to
|
||||||
|
# ignore errors from any of these, just make sure not to ignore
|
||||||
|
# errors from the above "$doit $cpprog $src $dsttmp" command.
|
||||||
|
#
|
||||||
|
{ test -z "$chowncmd" || $doit $chowncmd "$dsttmp"; } &&
|
||||||
|
{ test -z "$chgrpcmd" || $doit $chgrpcmd "$dsttmp"; } &&
|
||||||
|
{ test -z "$stripcmd" || $doit $stripcmd "$dsttmp"; } &&
|
||||||
|
{ test -z "$chmodcmd" || $doit $chmodcmd $mode "$dsttmp"; } &&
|
||||||
|
|
||||||
|
# If -C, don't bother to copy if it wouldn't change the file.
|
||||||
|
if $copy_on_change &&
|
||||||
|
old=`LC_ALL=C ls -dlL "$dst" 2>/dev/null` &&
|
||||||
|
new=`LC_ALL=C ls -dlL "$dsttmp" 2>/dev/null` &&
|
||||||
|
|
||||||
|
eval "$initialize_posix_glob" &&
|
||||||
|
$posix_glob set -f &&
|
||||||
|
set X $old && old=:$2:$4:$5:$6 &&
|
||||||
|
set X $new && new=:$2:$4:$5:$6 &&
|
||||||
|
$posix_glob set +f &&
|
||||||
|
|
||||||
|
test "$old" = "$new" &&
|
||||||
|
$cmpprog "$dst" "$dsttmp" >/dev/null 2>&1
|
||||||
|
then
|
||||||
|
rm -f "$dsttmp"
|
||||||
|
else
|
||||||
|
# Rename the file to the real destination.
|
||||||
|
$doit $mvcmd -f "$dsttmp" "$dst" 2>/dev/null ||
|
||||||
|
|
||||||
|
# The rename failed, perhaps because mv can't rename something else
|
||||||
|
# to itself, or perhaps because mv is so ancient that it does not
|
||||||
|
# support -f.
|
||||||
|
{
|
||||||
|
# Now remove or move aside any old file at destination location.
|
||||||
|
# We try this two ways since rm can't unlink itself on some
|
||||||
|
# systems and the destination file might be busy for other
|
||||||
|
# reasons. In this case, the final cleanup might fail but the new
|
||||||
|
# file should still install successfully.
|
||||||
|
{
|
||||||
|
test ! -f "$dst" ||
|
||||||
|
$doit $rmcmd -f "$dst" 2>/dev/null ||
|
||||||
|
{ $doit $mvcmd -f "$dst" "$rmtmp" 2>/dev/null &&
|
||||||
|
{ $doit $rmcmd -f "$rmtmp" 2>/dev/null; :; }
|
||||||
|
} ||
|
||||||
|
{ echo "$0: cannot unlink or rename $dst" >&2
|
||||||
|
(exit 1); exit 1
|
||||||
|
}
|
||||||
|
} &&
|
||||||
|
|
||||||
|
# Now rename the file to the real destination.
|
||||||
|
$doit $mvcmd "$dsttmp" "$dst"
|
||||||
|
}
|
||||||
|
fi || exit 1
|
||||||
|
|
||||||
|
trap '' 0
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
|
||||||
|
# Local variables:
|
||||||
|
# eval: (add-hook 'write-file-hooks 'time-stamp)
|
||||||
|
# time-stamp-start: "scriptversion="
|
||||||
|
# time-stamp-format: "%:y-%02m-%02d.%02H"
|
||||||
|
# time-stamp-time-zone: "UTC"
|
||||||
|
# time-stamp-end: "; # UTC"
|
||||||
|
# End:
|
||||||
@@ -0,0 +1,162 @@
|
|||||||
|
# AuthenTec AES3500
|
||||||
|
SUBSYSTEM=="usb", ATTRS{idVendor}=="08ff", ATTRS{idProduct}=="5731", ATTRS{dev}=="*", TEST=="power/control", ATTR{power/control}="auto"
|
||||||
|
SUBSYSTEM=="usb", ATTRS{idVendor}=="08ff", ATTRS{idProduct}=="5731", ENV{LIBFPRINT_DRIVER}="AuthenTec AES3500"
|
||||||
|
|
||||||
|
# AuthenTec AES4000
|
||||||
|
SUBSYSTEM=="usb", ATTRS{idVendor}=="08ff", ATTRS{idProduct}=="5501", ATTRS{dev}=="*", TEST=="power/control", ATTR{power/control}="auto"
|
||||||
|
SUBSYSTEM=="usb", ATTRS{idVendor}=="08ff", ATTRS{idProduct}=="5501", ENV{LIBFPRINT_DRIVER}="AuthenTec AES4000"
|
||||||
|
|
||||||
|
# AuthenTec AES2501
|
||||||
|
SUBSYSTEM=="usb", ATTRS{idVendor}=="08ff", ATTRS{idProduct}=="2500", ATTRS{dev}=="*", TEST=="power/control", ATTR{power/control}="auto"
|
||||||
|
SUBSYSTEM=="usb", ATTRS{idVendor}=="08ff", ATTRS{idProduct}=="2500", ENV{LIBFPRINT_DRIVER}="AuthenTec AES2501"
|
||||||
|
SUBSYSTEM=="usb", ATTRS{idVendor}=="08ff", ATTRS{idProduct}=="2580", ATTRS{dev}=="*", TEST=="power/control", ATTR{power/control}="auto"
|
||||||
|
SUBSYSTEM=="usb", ATTRS{idVendor}=="08ff", ATTRS{idProduct}=="2580", ENV{LIBFPRINT_DRIVER}="AuthenTec AES2501"
|
||||||
|
|
||||||
|
# AuthenTec AES2550/AES2810
|
||||||
|
SUBSYSTEM=="usb", ATTRS{idVendor}=="08ff", ATTRS{idProduct}=="2550", ATTRS{dev}=="*", TEST=="power/control", ATTR{power/control}="auto"
|
||||||
|
SUBSYSTEM=="usb", ATTRS{idVendor}=="08ff", ATTRS{idProduct}=="2550", ENV{LIBFPRINT_DRIVER}="AuthenTec AES2550/AES2810"
|
||||||
|
SUBSYSTEM=="usb", ATTRS{idVendor}=="08ff", ATTRS{idProduct}=="2810", ATTRS{dev}=="*", TEST=="power/control", ATTR{power/control}="auto"
|
||||||
|
SUBSYSTEM=="usb", ATTRS{idVendor}=="08ff", ATTRS{idProduct}=="2810", ENV{LIBFPRINT_DRIVER}="AuthenTec AES2550/AES2810"
|
||||||
|
|
||||||
|
# Digital Persona U.are.U 4000/4000B/4500
|
||||||
|
SUBSYSTEM=="usb", ATTRS{idVendor}=="045e", ATTRS{idProduct}=="00bc", ATTRS{dev}=="*", TEST=="power/control", ATTR{power/control}="auto"
|
||||||
|
SUBSYSTEM=="usb", ATTRS{idVendor}=="045e", ATTRS{idProduct}=="00bc", ENV{LIBFPRINT_DRIVER}="Digital Persona U.are.U 4000/4000B/4500"
|
||||||
|
SUBSYSTEM=="usb", ATTRS{idVendor}=="045e", ATTRS{idProduct}=="00bd", ATTRS{dev}=="*", TEST=="power/control", ATTR{power/control}="auto"
|
||||||
|
SUBSYSTEM=="usb", ATTRS{idVendor}=="045e", ATTRS{idProduct}=="00bd", ENV{LIBFPRINT_DRIVER}="Digital Persona U.are.U 4000/4000B/4500"
|
||||||
|
SUBSYSTEM=="usb", ATTRS{idVendor}=="045e", ATTRS{idProduct}=="00ca", ATTRS{dev}=="*", TEST=="power/control", ATTR{power/control}="auto"
|
||||||
|
SUBSYSTEM=="usb", ATTRS{idVendor}=="045e", ATTRS{idProduct}=="00ca", ENV{LIBFPRINT_DRIVER}="Digital Persona U.are.U 4000/4000B/4500"
|
||||||
|
SUBSYSTEM=="usb", ATTRS{idVendor}=="05ba", ATTRS{idProduct}=="0007", ATTRS{dev}=="*", TEST=="power/control", ATTR{power/control}="auto"
|
||||||
|
SUBSYSTEM=="usb", ATTRS{idVendor}=="05ba", ATTRS{idProduct}=="0007", ENV{LIBFPRINT_DRIVER}="Digital Persona U.are.U 4000/4000B/4500"
|
||||||
|
SUBSYSTEM=="usb", ATTRS{idVendor}=="05ba", ATTRS{idProduct}=="0008", ATTRS{dev}=="*", TEST=="power/control", ATTR{power/control}="auto"
|
||||||
|
SUBSYSTEM=="usb", ATTRS{idVendor}=="05ba", ATTRS{idProduct}=="0008", ENV{LIBFPRINT_DRIVER}="Digital Persona U.are.U 4000/4000B/4500"
|
||||||
|
SUBSYSTEM=="usb", ATTRS{idVendor}=="05ba", ATTRS{idProduct}=="000a", ATTRS{dev}=="*", TEST=="power/control", ATTR{power/control}="auto"
|
||||||
|
SUBSYSTEM=="usb", ATTRS{idVendor}=="05ba", ATTRS{idProduct}=="000a", ENV{LIBFPRINT_DRIVER}="Digital Persona U.are.U 4000/4000B/4500"
|
||||||
|
|
||||||
|
# Veridicom 5thSense
|
||||||
|
SUBSYSTEM=="usb", ATTRS{idVendor}=="061a", ATTRS{idProduct}=="0110", ATTRS{dev}=="*", TEST=="power/control", ATTR{power/control}="auto"
|
||||||
|
SUBSYSTEM=="usb", ATTRS{idVendor}=="061a", ATTRS{idProduct}=="0110", ENV{LIBFPRINT_DRIVER}="Veridicom 5thSense"
|
||||||
|
|
||||||
|
# UPEK TouchStrip Sensor-Only
|
||||||
|
SUBSYSTEM=="usb", ATTRS{idVendor}=="147e", ATTRS{idProduct}=="2016", ATTRS{dev}=="*", TEST=="power/control", ATTR{power/control}="auto"
|
||||||
|
SUBSYSTEM=="usb", ATTRS{idVendor}=="147e", ATTRS{idProduct}=="2016", ENV{LIBFPRINT_DRIVER}="UPEK TouchStrip Sensor-Only"
|
||||||
|
SUBSYSTEM=="usb", ATTRS{idVendor}=="147e", ATTRS{idProduct}=="1000", ATTRS{dev}=="*", TEST=="power/control", ATTR{power/control}="auto"
|
||||||
|
SUBSYSTEM=="usb", ATTRS{idVendor}=="147e", ATTRS{idProduct}=="1000", ENV{LIBFPRINT_DRIVER}="UPEK TouchStrip Sensor-Only"
|
||||||
|
SUBSYSTEM=="usb", ATTRS{idVendor}=="147e", ATTRS{idProduct}=="1001", ATTRS{dev}=="*", TEST=="power/control", ATTR{power/control}="auto"
|
||||||
|
SUBSYSTEM=="usb", ATTRS{idVendor}=="147e", ATTRS{idProduct}=="1001", ENV{LIBFPRINT_DRIVER}="UPEK TouchStrip Sensor-Only"
|
||||||
|
|
||||||
|
# AuthenTec AES1610
|
||||||
|
SUBSYSTEM=="usb", ATTRS{idVendor}=="08ff", ATTRS{idProduct}=="1600", ATTRS{dev}=="*", TEST=="power/control", ATTR{power/control}="auto"
|
||||||
|
SUBSYSTEM=="usb", ATTRS{idVendor}=="08ff", ATTRS{idProduct}=="1600", ENV{LIBFPRINT_DRIVER}="AuthenTec AES1610"
|
||||||
|
|
||||||
|
# AuthenTec AES1660
|
||||||
|
SUBSYSTEM=="usb", ATTRS{idVendor}=="08ff", ATTRS{idProduct}=="1660", ATTRS{dev}=="*", TEST=="power/control", ATTR{power/control}="auto"
|
||||||
|
SUBSYSTEM=="usb", ATTRS{idVendor}=="08ff", ATTRS{idProduct}=="1660", ENV{LIBFPRINT_DRIVER}="AuthenTec AES1660"
|
||||||
|
SUBSYSTEM=="usb", ATTRS{idVendor}=="08ff", ATTRS{idProduct}=="1680", ATTRS{dev}=="*", TEST=="power/control", ATTR{power/control}="auto"
|
||||||
|
SUBSYSTEM=="usb", ATTRS{idVendor}=="08ff", ATTRS{idProduct}=="1680", ENV{LIBFPRINT_DRIVER}="AuthenTec AES1660"
|
||||||
|
SUBSYSTEM=="usb", ATTRS{idVendor}=="08ff", ATTRS{idProduct}=="1681", ATTRS{dev}=="*", TEST=="power/control", ATTR{power/control}="auto"
|
||||||
|
SUBSYSTEM=="usb", ATTRS{idVendor}=="08ff", ATTRS{idProduct}=="1681", ENV{LIBFPRINT_DRIVER}="AuthenTec AES1660"
|
||||||
|
SUBSYSTEM=="usb", ATTRS{idVendor}=="08ff", ATTRS{idProduct}=="1682", ATTRS{dev}=="*", TEST=="power/control", ATTR{power/control}="auto"
|
||||||
|
SUBSYSTEM=="usb", ATTRS{idVendor}=="08ff", ATTRS{idProduct}=="1682", ENV{LIBFPRINT_DRIVER}="AuthenTec AES1660"
|
||||||
|
SUBSYSTEM=="usb", ATTRS{idVendor}=="08ff", ATTRS{idProduct}=="1683", ATTRS{dev}=="*", TEST=="power/control", ATTR{power/control}="auto"
|
||||||
|
SUBSYSTEM=="usb", ATTRS{idVendor}=="08ff", ATTRS{idProduct}=="1683", ENV{LIBFPRINT_DRIVER}="AuthenTec AES1660"
|
||||||
|
SUBSYSTEM=="usb", ATTRS{idVendor}=="08ff", ATTRS{idProduct}=="1684", ATTRS{dev}=="*", TEST=="power/control", ATTR{power/control}="auto"
|
||||||
|
SUBSYSTEM=="usb", ATTRS{idVendor}=="08ff", ATTRS{idProduct}=="1684", ENV{LIBFPRINT_DRIVER}="AuthenTec AES1660"
|
||||||
|
SUBSYSTEM=="usb", ATTRS{idVendor}=="08ff", ATTRS{idProduct}=="1685", ATTRS{dev}=="*", TEST=="power/control", ATTR{power/control}="auto"
|
||||||
|
SUBSYSTEM=="usb", ATTRS{idVendor}=="08ff", ATTRS{idProduct}=="1685", ENV{LIBFPRINT_DRIVER}="AuthenTec AES1660"
|
||||||
|
SUBSYSTEM=="usb", ATTRS{idVendor}=="08ff", ATTRS{idProduct}=="1686", ATTRS{dev}=="*", TEST=="power/control", ATTR{power/control}="auto"
|
||||||
|
SUBSYSTEM=="usb", ATTRS{idVendor}=="08ff", ATTRS{idProduct}=="1686", ENV{LIBFPRINT_DRIVER}="AuthenTec AES1660"
|
||||||
|
SUBSYSTEM=="usb", ATTRS{idVendor}=="08ff", ATTRS{idProduct}=="1687", ATTRS{dev}=="*", TEST=="power/control", ATTR{power/control}="auto"
|
||||||
|
SUBSYSTEM=="usb", ATTRS{idVendor}=="08ff", ATTRS{idProduct}=="1687", ENV{LIBFPRINT_DRIVER}="AuthenTec AES1660"
|
||||||
|
SUBSYSTEM=="usb", ATTRS{idVendor}=="08ff", ATTRS{idProduct}=="1688", ATTRS{dev}=="*", TEST=="power/control", ATTR{power/control}="auto"
|
||||||
|
SUBSYSTEM=="usb", ATTRS{idVendor}=="08ff", ATTRS{idProduct}=="1688", ENV{LIBFPRINT_DRIVER}="AuthenTec AES1660"
|
||||||
|
SUBSYSTEM=="usb", ATTRS{idVendor}=="08ff", ATTRS{idProduct}=="1689", ATTRS{dev}=="*", TEST=="power/control", ATTR{power/control}="auto"
|
||||||
|
SUBSYSTEM=="usb", ATTRS{idVendor}=="08ff", ATTRS{idProduct}=="1689", ENV{LIBFPRINT_DRIVER}="AuthenTec AES1660"
|
||||||
|
SUBSYSTEM=="usb", ATTRS{idVendor}=="08ff", ATTRS{idProduct}=="168a", ATTRS{dev}=="*", TEST=="power/control", ATTR{power/control}="auto"
|
||||||
|
SUBSYSTEM=="usb", ATTRS{idVendor}=="08ff", ATTRS{idProduct}=="168a", ENV{LIBFPRINT_DRIVER}="AuthenTec AES1660"
|
||||||
|
SUBSYSTEM=="usb", ATTRS{idVendor}=="08ff", ATTRS{idProduct}=="168b", ATTRS{dev}=="*", TEST=="power/control", ATTR{power/control}="auto"
|
||||||
|
SUBSYSTEM=="usb", ATTRS{idVendor}=="08ff", ATTRS{idProduct}=="168b", ENV{LIBFPRINT_DRIVER}="AuthenTec AES1660"
|
||||||
|
SUBSYSTEM=="usb", ATTRS{idVendor}=="08ff", ATTRS{idProduct}=="168c", ATTRS{dev}=="*", TEST=="power/control", ATTR{power/control}="auto"
|
||||||
|
SUBSYSTEM=="usb", ATTRS{idVendor}=="08ff", ATTRS{idProduct}=="168c", ENV{LIBFPRINT_DRIVER}="AuthenTec AES1660"
|
||||||
|
SUBSYSTEM=="usb", ATTRS{idVendor}=="08ff", ATTRS{idProduct}=="168d", ATTRS{dev}=="*", TEST=="power/control", ATTR{power/control}="auto"
|
||||||
|
SUBSYSTEM=="usb", ATTRS{idVendor}=="08ff", ATTRS{idProduct}=="168d", ENV{LIBFPRINT_DRIVER}="AuthenTec AES1660"
|
||||||
|
SUBSYSTEM=="usb", ATTRS{idVendor}=="08ff", ATTRS{idProduct}=="168e", ATTRS{dev}=="*", TEST=="power/control", ATTR{power/control}="auto"
|
||||||
|
SUBSYSTEM=="usb", ATTRS{idVendor}=="08ff", ATTRS{idProduct}=="168e", ENV{LIBFPRINT_DRIVER}="AuthenTec AES1660"
|
||||||
|
SUBSYSTEM=="usb", ATTRS{idVendor}=="08ff", ATTRS{idProduct}=="168f", ATTRS{dev}=="*", TEST=="power/control", ATTR{power/control}="auto"
|
||||||
|
SUBSYSTEM=="usb", ATTRS{idVendor}=="08ff", ATTRS{idProduct}=="168f", ENV{LIBFPRINT_DRIVER}="AuthenTec AES1660"
|
||||||
|
|
||||||
|
# AuthenTec AES2660
|
||||||
|
SUBSYSTEM=="usb", ATTRS{idVendor}=="08ff", ATTRS{idProduct}=="2660", ATTRS{dev}=="*", TEST=="power/control", ATTR{power/control}="auto"
|
||||||
|
SUBSYSTEM=="usb", ATTRS{idVendor}=="08ff", ATTRS{idProduct}=="2660", ENV{LIBFPRINT_DRIVER}="AuthenTec AES2660"
|
||||||
|
SUBSYSTEM=="usb", ATTRS{idVendor}=="08ff", ATTRS{idProduct}=="2680", ATTRS{dev}=="*", TEST=="power/control", ATTR{power/control}="auto"
|
||||||
|
SUBSYSTEM=="usb", ATTRS{idVendor}=="08ff", ATTRS{idProduct}=="2680", ENV{LIBFPRINT_DRIVER}="AuthenTec AES2660"
|
||||||
|
SUBSYSTEM=="usb", ATTRS{idVendor}=="08ff", ATTRS{idProduct}=="2681", ATTRS{dev}=="*", TEST=="power/control", ATTR{power/control}="auto"
|
||||||
|
SUBSYSTEM=="usb", ATTRS{idVendor}=="08ff", ATTRS{idProduct}=="2681", ENV{LIBFPRINT_DRIVER}="AuthenTec AES2660"
|
||||||
|
SUBSYSTEM=="usb", ATTRS{idVendor}=="08ff", ATTRS{idProduct}=="2682", ATTRS{dev}=="*", TEST=="power/control", ATTR{power/control}="auto"
|
||||||
|
SUBSYSTEM=="usb", ATTRS{idVendor}=="08ff", ATTRS{idProduct}=="2682", ENV{LIBFPRINT_DRIVER}="AuthenTec AES2660"
|
||||||
|
SUBSYSTEM=="usb", ATTRS{idVendor}=="08ff", ATTRS{idProduct}=="2683", ATTRS{dev}=="*", TEST=="power/control", ATTR{power/control}="auto"
|
||||||
|
SUBSYSTEM=="usb", ATTRS{idVendor}=="08ff", ATTRS{idProduct}=="2683", ENV{LIBFPRINT_DRIVER}="AuthenTec AES2660"
|
||||||
|
SUBSYSTEM=="usb", ATTRS{idVendor}=="08ff", ATTRS{idProduct}=="2684", ATTRS{dev}=="*", TEST=="power/control", ATTR{power/control}="auto"
|
||||||
|
SUBSYSTEM=="usb", ATTRS{idVendor}=="08ff", ATTRS{idProduct}=="2684", ENV{LIBFPRINT_DRIVER}="AuthenTec AES2660"
|
||||||
|
SUBSYSTEM=="usb", ATTRS{idVendor}=="08ff", ATTRS{idProduct}=="2685", ATTRS{dev}=="*", TEST=="power/control", ATTR{power/control}="auto"
|
||||||
|
SUBSYSTEM=="usb", ATTRS{idVendor}=="08ff", ATTRS{idProduct}=="2685", ENV{LIBFPRINT_DRIVER}="AuthenTec AES2660"
|
||||||
|
SUBSYSTEM=="usb", ATTRS{idVendor}=="08ff", ATTRS{idProduct}=="2686", ATTRS{dev}=="*", TEST=="power/control", ATTR{power/control}="auto"
|
||||||
|
SUBSYSTEM=="usb", ATTRS{idVendor}=="08ff", ATTRS{idProduct}=="2686", ENV{LIBFPRINT_DRIVER}="AuthenTec AES2660"
|
||||||
|
SUBSYSTEM=="usb", ATTRS{idVendor}=="08ff", ATTRS{idProduct}=="2687", ATTRS{dev}=="*", TEST=="power/control", ATTR{power/control}="auto"
|
||||||
|
SUBSYSTEM=="usb", ATTRS{idVendor}=="08ff", ATTRS{idProduct}=="2687", ENV{LIBFPRINT_DRIVER}="AuthenTec AES2660"
|
||||||
|
SUBSYSTEM=="usb", ATTRS{idVendor}=="08ff", ATTRS{idProduct}=="2688", ATTRS{dev}=="*", TEST=="power/control", ATTR{power/control}="auto"
|
||||||
|
SUBSYSTEM=="usb", ATTRS{idVendor}=="08ff", ATTRS{idProduct}=="2688", ENV{LIBFPRINT_DRIVER}="AuthenTec AES2660"
|
||||||
|
SUBSYSTEM=="usb", ATTRS{idVendor}=="08ff", ATTRS{idProduct}=="2689", ATTRS{dev}=="*", TEST=="power/control", ATTR{power/control}="auto"
|
||||||
|
SUBSYSTEM=="usb", ATTRS{idVendor}=="08ff", ATTRS{idProduct}=="2689", ENV{LIBFPRINT_DRIVER}="AuthenTec AES2660"
|
||||||
|
SUBSYSTEM=="usb", ATTRS{idVendor}=="08ff", ATTRS{idProduct}=="268a", ATTRS{dev}=="*", TEST=="power/control", ATTR{power/control}="auto"
|
||||||
|
SUBSYSTEM=="usb", ATTRS{idVendor}=="08ff", ATTRS{idProduct}=="268a", ENV{LIBFPRINT_DRIVER}="AuthenTec AES2660"
|
||||||
|
SUBSYSTEM=="usb", ATTRS{idVendor}=="08ff", ATTRS{idProduct}=="268b", ATTRS{dev}=="*", TEST=="power/control", ATTR{power/control}="auto"
|
||||||
|
SUBSYSTEM=="usb", ATTRS{idVendor}=="08ff", ATTRS{idProduct}=="268b", ENV{LIBFPRINT_DRIVER}="AuthenTec AES2660"
|
||||||
|
SUBSYSTEM=="usb", ATTRS{idVendor}=="08ff", ATTRS{idProduct}=="268c", ATTRS{dev}=="*", TEST=="power/control", ATTR{power/control}="auto"
|
||||||
|
SUBSYSTEM=="usb", ATTRS{idVendor}=="08ff", ATTRS{idProduct}=="268c", ENV{LIBFPRINT_DRIVER}="AuthenTec AES2660"
|
||||||
|
SUBSYSTEM=="usb", ATTRS{idVendor}=="08ff", ATTRS{idProduct}=="268d", ATTRS{dev}=="*", TEST=="power/control", ATTR{power/control}="auto"
|
||||||
|
SUBSYSTEM=="usb", ATTRS{idVendor}=="08ff", ATTRS{idProduct}=="268d", ENV{LIBFPRINT_DRIVER}="AuthenTec AES2660"
|
||||||
|
SUBSYSTEM=="usb", ATTRS{idVendor}=="08ff", ATTRS{idProduct}=="268e", ATTRS{dev}=="*", TEST=="power/control", ATTR{power/control}="auto"
|
||||||
|
SUBSYSTEM=="usb", ATTRS{idVendor}=="08ff", ATTRS{idProduct}=="268e", ENV{LIBFPRINT_DRIVER}="AuthenTec AES2660"
|
||||||
|
SUBSYSTEM=="usb", ATTRS{idVendor}=="08ff", ATTRS{idProduct}=="268f", ATTRS{dev}=="*", TEST=="power/control", ATTR{power/control}="auto"
|
||||||
|
SUBSYSTEM=="usb", ATTRS{idVendor}=="08ff", ATTRS{idProduct}=="268f", ENV{LIBFPRINT_DRIVER}="AuthenTec AES2660"
|
||||||
|
SUBSYSTEM=="usb", ATTRS{idVendor}=="08ff", ATTRS{idProduct}=="2691", ATTRS{dev}=="*", TEST=="power/control", ATTR{power/control}="auto"
|
||||||
|
SUBSYSTEM=="usb", ATTRS{idVendor}=="08ff", ATTRS{idProduct}=="2691", ENV{LIBFPRINT_DRIVER}="AuthenTec AES2660"
|
||||||
|
|
||||||
|
# Validity VFS101
|
||||||
|
SUBSYSTEM=="usb", ATTRS{idVendor}=="138a", ATTRS{idProduct}=="0001", ATTRS{dev}=="*", TEST=="power/control", ATTR{power/control}="auto"
|
||||||
|
SUBSYSTEM=="usb", ATTRS{idVendor}=="138a", ATTRS{idProduct}=="0001", ENV{LIBFPRINT_DRIVER}="Validity VFS101"
|
||||||
|
|
||||||
|
# Validity VFS301
|
||||||
|
SUBSYSTEM=="usb", ATTRS{idVendor}=="138a", ATTRS{idProduct}=="0005", ATTRS{dev}=="*", TEST=="power/control", ATTR{power/control}="auto"
|
||||||
|
SUBSYSTEM=="usb", ATTRS{idVendor}=="138a", ATTRS{idProduct}=="0005", ENV{LIBFPRINT_DRIVER}="Validity VFS301"
|
||||||
|
SUBSYSTEM=="usb", ATTRS{idVendor}=="138a", ATTRS{idProduct}=="0008", ATTRS{dev}=="*", TEST=="power/control", ATTR{power/control}="auto"
|
||||||
|
SUBSYSTEM=="usb", ATTRS{idVendor}=="138a", ATTRS{idProduct}=="0008", ENV{LIBFPRINT_DRIVER}="Validity VFS301"
|
||||||
|
|
||||||
|
# Validity VFS5011
|
||||||
|
SUBSYSTEM=="usb", ATTRS{idVendor}=="138a", ATTRS{idProduct}=="0010", ATTRS{dev}=="*", TEST=="power/control", ATTR{power/control}="auto"
|
||||||
|
SUBSYSTEM=="usb", ATTRS{idVendor}=="138a", ATTRS{idProduct}=="0010", ENV{LIBFPRINT_DRIVER}="Validity VFS5011"
|
||||||
|
SUBSYSTEM=="usb", ATTRS{idVendor}=="138a", ATTRS{idProduct}=="0011", ATTRS{dev}=="*", TEST=="power/control", ATTR{power/control}="auto"
|
||||||
|
SUBSYSTEM=="usb", ATTRS{idVendor}=="138a", ATTRS{idProduct}=="0011", ENV{LIBFPRINT_DRIVER}="Validity VFS5011"
|
||||||
|
SUBSYSTEM=="usb", ATTRS{idVendor}=="138a", ATTRS{idProduct}=="0017", ATTRS{dev}=="*", TEST=="power/control", ATTR{power/control}="auto"
|
||||||
|
SUBSYSTEM=="usb", ATTRS{idVendor}=="138a", ATTRS{idProduct}=="0017", ENV{LIBFPRINT_DRIVER}="Validity VFS5011"
|
||||||
|
SUBSYSTEM=="usb", ATTRS{idVendor}=="138a", ATTRS{idProduct}=="0018", ATTRS{dev}=="*", TEST=="power/control", ATTR{power/control}="auto"
|
||||||
|
SUBSYSTEM=="usb", ATTRS{idVendor}=="138a", ATTRS{idProduct}=="0018", ENV{LIBFPRINT_DRIVER}="Validity VFS5011"
|
||||||
|
|
||||||
|
# UPEK TouchChip/Eikon Touch 300
|
||||||
|
SUBSYSTEM=="usb", ATTRS{idVendor}=="0483", ATTRS{idProduct}=="2015", ATTRS{dev}=="*", TEST=="power/control", ATTR{power/control}="auto"
|
||||||
|
SUBSYSTEM=="usb", ATTRS{idVendor}=="0483", ATTRS{idProduct}=="2015", ENV{LIBFPRINT_DRIVER}="UPEK TouchChip/Eikon Touch 300"
|
||||||
|
SUBSYSTEM=="usb", ATTRS{idVendor}=="147e", ATTRS{idProduct}=="3001", ATTRS{dev}=="*", TEST=="power/control", ATTR{power/control}="auto"
|
||||||
|
SUBSYSTEM=="usb", ATTRS{idVendor}=="147e", ATTRS{idProduct}=="3001", ENV{LIBFPRINT_DRIVER}="UPEK TouchChip/Eikon Touch 300"
|
||||||
|
|
||||||
|
# Upek TouchChip Fingerprint Coprocessor
|
||||||
|
SUBSYSTEM=="usb", ATTRS{idVendor}=="147e", ATTRS{idProduct}=="2020", ATTRS{dev}=="*", TEST=="power/control", ATTR{power/control}="auto"
|
||||||
|
SUBSYSTEM=="usb", ATTRS{idVendor}=="147e", ATTRS{idProduct}=="2020", ENV{LIBFPRINT_DRIVER}="Upek TouchChip Fingerprint Coprocessor"
|
||||||
|
|
||||||
|
# EgisTec ES603
|
||||||
|
SUBSYSTEM=="usb", ATTRS{idVendor}=="1c7a", ATTRS{idProduct}=="0603", ATTRS{dev}=="*", TEST=="power/control", ATTR{power/control}="auto"
|
||||||
|
SUBSYSTEM=="usb", ATTRS{idVendor}=="1c7a", ATTRS{idProduct}=="0603", ENV{LIBFPRINT_DRIVER}="EgisTec ES603"
|
||||||
|
|
||||||
|
# Validity VFS0050
|
||||||
|
SUBSYSTEM=="usb", ATTRS{idVendor}=="138a", ATTRS{idProduct}=="0050", ATTRS{dev}=="*", TEST=="power/control", ATTR{power/control}="auto"
|
||||||
|
SUBSYSTEM=="usb", ATTRS{idVendor}=="138a", ATTRS{idProduct}=="0050", ENV{LIBFPRINT_DRIVER}="Validity VFS0050"
|
||||||
|
|
||||||
+11
-1
@@ -5,7 +5,7 @@ MOSTLYCLEANFILES = $(udev_rules_DATA)
|
|||||||
UPEKE2_SRC = drivers/upeke2.c
|
UPEKE2_SRC = drivers/upeke2.c
|
||||||
UPEKTS_SRC = drivers/upekts.c
|
UPEKTS_SRC = drivers/upekts.c
|
||||||
UPEKTC_SRC = drivers/upektc.c drivers/upektc.h
|
UPEKTC_SRC = drivers/upektc.c drivers/upektc.h
|
||||||
UPEKSONLY_SRC = drivers/upeksonly.c
|
UPEKSONLY_SRC = drivers/upeksonly.c drivers/upeksonly.h
|
||||||
URU4000_SRC = drivers/uru4000.c
|
URU4000_SRC = drivers/uru4000.c
|
||||||
AES1610_SRC = drivers/aes1610.c
|
AES1610_SRC = drivers/aes1610.c
|
||||||
AES1660_SRC = drivers/aes1660.c drivers/aes1660.h
|
AES1660_SRC = drivers/aes1660.c drivers/aes1660.h
|
||||||
@@ -21,6 +21,7 @@ VFS301_SRC = drivers/vfs301.c drivers/vfs301_proto.c drivers/vfs301_proto.h dri
|
|||||||
VFS5011_SRC = drivers/vfs5011.c drivers/vfs5011_proto.h
|
VFS5011_SRC = drivers/vfs5011.c drivers/vfs5011_proto.h
|
||||||
UPEKTC_IMG_SRC = drivers/upektc_img.c drivers/upektc_img.h
|
UPEKTC_IMG_SRC = drivers/upektc_img.c drivers/upektc_img.h
|
||||||
ETES603_SRC = drivers/etes603.c
|
ETES603_SRC = drivers/etes603.c
|
||||||
|
VFS0050_SRC = drivers/vfs0050.c drivers/vfs0050.h
|
||||||
|
|
||||||
EXTRA_DIST = \
|
EXTRA_DIST = \
|
||||||
$(UPEKE2_SRC) \
|
$(UPEKE2_SRC) \
|
||||||
@@ -42,12 +43,15 @@ EXTRA_DIST = \
|
|||||||
$(VFS5011_SRC) \
|
$(VFS5011_SRC) \
|
||||||
$(UPEKTC_IMG_SRC) \
|
$(UPEKTC_IMG_SRC) \
|
||||||
$(ETES603_SRC) \
|
$(ETES603_SRC) \
|
||||||
|
$(VFS0050_SRC) \
|
||||||
drivers/aesx660.c \
|
drivers/aesx660.c \
|
||||||
drivers/aesx660.h \
|
drivers/aesx660.h \
|
||||||
drivers/aes3k.c \
|
drivers/aes3k.c \
|
||||||
drivers/aes3k.h \
|
drivers/aes3k.h \
|
||||||
drivers/driver_ids.h \
|
drivers/driver_ids.h \
|
||||||
aeslib.c aeslib.h \
|
aeslib.c aeslib.h \
|
||||||
|
assembling.c \
|
||||||
|
assembling.h \
|
||||||
pixman.c \
|
pixman.c \
|
||||||
60-fprint-autosuspend.rules
|
60-fprint-autosuspend.rules
|
||||||
|
|
||||||
@@ -182,6 +186,10 @@ if ENABLE_ETES603
|
|||||||
DRIVER_SRC += $(ETES603_SRC)
|
DRIVER_SRC += $(ETES603_SRC)
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
if ENABLE_VFS0050
|
||||||
|
DRIVER_SRC += $(VFS0050_SRC)
|
||||||
|
endif
|
||||||
|
|
||||||
if REQUIRE_PIXMAN
|
if REQUIRE_PIXMAN
|
||||||
OTHER_SRC += pixman.c
|
OTHER_SRC += pixman.c
|
||||||
libfprint_la_CFLAGS += $(IMAGING_CFLAGS)
|
libfprint_la_CFLAGS += $(IMAGING_CFLAGS)
|
||||||
@@ -210,6 +218,8 @@ libfprint_la_SOURCES = \
|
|||||||
imgdev.c \
|
imgdev.c \
|
||||||
poll.c \
|
poll.c \
|
||||||
sync.c \
|
sync.c \
|
||||||
|
assembling.c \
|
||||||
|
assembling.h \
|
||||||
$(DRIVER_SRC) \
|
$(DRIVER_SRC) \
|
||||||
$(OTHER_SRC) \
|
$(OTHER_SRC) \
|
||||||
$(NBIS_SRC)
|
$(NBIS_SRC)
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
+5
-256
@@ -26,6 +26,7 @@
|
|||||||
#include <glib.h>
|
#include <glib.h>
|
||||||
|
|
||||||
#include "fp_internal.h"
|
#include "fp_internal.h"
|
||||||
|
#include "assembling.h"
|
||||||
#include "aeslib.h"
|
#include "aeslib.h"
|
||||||
|
|
||||||
#define MAX_REGWRITES_PER_REQUEST 16
|
#define MAX_REGWRITES_PER_REQUEST 16
|
||||||
@@ -158,268 +159,16 @@ void aes_write_regv(struct fp_img_dev *dev, const struct aes_regwrite *regs,
|
|||||||
continue_write_regv(wdata);
|
continue_write_regv(wdata);
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline unsigned char aes_get_pixel(struct aes_stripe *frame,
|
unsigned char aes_get_pixel(struct fpi_frame_asmbl_ctx *ctx,
|
||||||
|
struct fpi_frame *frame,
|
||||||
unsigned int x,
|
unsigned int x,
|
||||||
unsigned int y,
|
unsigned int y)
|
||||||
unsigned int frame_width,
|
|
||||||
unsigned int frame_height)
|
|
||||||
{
|
{
|
||||||
unsigned char ret;
|
unsigned char ret;
|
||||||
|
|
||||||
ret = frame->data[x * (frame_height >> 1) + (y >> 1)];
|
ret = frame->data[x * (ctx->frame_height >> 1) + (y >> 1)];
|
||||||
ret = y % 2 ? ret >> 4 : ret & 0xf;
|
ret = y % 2 ? ret >> 4 : ret & 0xf;
|
||||||
ret *= 17;
|
ret *= 17;
|
||||||
|
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
static unsigned int calc_error(struct aes_stripe *first_frame,
|
|
||||||
struct aes_stripe *second_frame,
|
|
||||||
int dx,
|
|
||||||
int dy,
|
|
||||||
unsigned int frame_width,
|
|
||||||
unsigned int frame_height)
|
|
||||||
{
|
|
||||||
unsigned int width, height;
|
|
||||||
unsigned int x1, y1, x2, y2, err, i, j;
|
|
||||||
|
|
||||||
width = frame_width - (dx > 0 ? dx : -dx);
|
|
||||||
height = frame_height - dy;
|
|
||||||
|
|
||||||
y1 = 0;
|
|
||||||
y2 = dy;
|
|
||||||
i = 0;
|
|
||||||
err = 0;
|
|
||||||
do {
|
|
||||||
x1 = dx < 0 ? 0 : dx;
|
|
||||||
x2 = dx < 0 ? -dx : 0;
|
|
||||||
j = 0;
|
|
||||||
|
|
||||||
do {
|
|
||||||
unsigned char v1, v2;
|
|
||||||
|
|
||||||
|
|
||||||
v1 = aes_get_pixel(first_frame, x1, y1, frame_width, frame_height);
|
|
||||||
v2 = aes_get_pixel(second_frame, x2, y2, frame_width, frame_height);
|
|
||||||
err += v1 > v2 ? v1 - v2 : v2 - v1;
|
|
||||||
j++;
|
|
||||||
x1++;
|
|
||||||
x2++;
|
|
||||||
|
|
||||||
} while (j < width);
|
|
||||||
i++;
|
|
||||||
y1++;
|
|
||||||
y2++;
|
|
||||||
} while (i < height);
|
|
||||||
|
|
||||||
/* Normalize error */
|
|
||||||
err *= (frame_height * frame_width);
|
|
||||||
err /= (height * width);
|
|
||||||
|
|
||||||
if (err == 0)
|
|
||||||
return INT_MAX;
|
|
||||||
|
|
||||||
return err;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* This function is rather CPU-intensive. It's better to use hardware
|
|
||||||
* to detect movement direction when possible.
|
|
||||||
*/
|
|
||||||
static void find_overlap(struct aes_stripe *first_frame,
|
|
||||||
struct aes_stripe *second_frame,
|
|
||||||
unsigned int *min_error,
|
|
||||||
unsigned int frame_width,
|
|
||||||
unsigned int frame_height)
|
|
||||||
{
|
|
||||||
int dx, dy;
|
|
||||||
unsigned int err;
|
|
||||||
*min_error = INT_MAX;
|
|
||||||
|
|
||||||
/* Seeking in horizontal and vertical dimensions,
|
|
||||||
* for horizontal dimension we'll check only 8 pixels
|
|
||||||
* in both directions. For vertical direction diff is
|
|
||||||
* rarely less than 2, so start with it.
|
|
||||||
*/
|
|
||||||
for (dy = 2; dy < frame_height; dy++) {
|
|
||||||
for (dx = -8; dx < 8; dx++) {
|
|
||||||
err = calc_error(first_frame, second_frame,
|
|
||||||
dx, dy, frame_width, frame_height);
|
|
||||||
if (err < *min_error) {
|
|
||||||
*min_error = err;
|
|
||||||
second_frame->delta_x = -dx;
|
|
||||||
second_frame->delta_y = dy;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
unsigned int aes_calc_delta(GSList *stripes, size_t num_stripes,
|
|
||||||
unsigned int frame_width, unsigned int frame_height,
|
|
||||||
gboolean reverse)
|
|
||||||
{
|
|
||||||
GSList *list_entry = stripes;
|
|
||||||
GTimer *timer;
|
|
||||||
int frame = 1;
|
|
||||||
int height = 0;
|
|
||||||
struct aes_stripe *prev_stripe = list_entry->data;
|
|
||||||
unsigned int min_error;
|
|
||||||
|
|
||||||
list_entry = g_slist_next(list_entry);
|
|
||||||
|
|
||||||
timer = g_timer_new();
|
|
||||||
do {
|
|
||||||
struct aes_stripe *cur_stripe = list_entry->data;
|
|
||||||
|
|
||||||
if (reverse) {
|
|
||||||
find_overlap(prev_stripe, cur_stripe, &min_error,
|
|
||||||
frame_width, frame_height);
|
|
||||||
prev_stripe->delta_y = -prev_stripe->delta_y;
|
|
||||||
prev_stripe->delta_x = -prev_stripe->delta_x;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
find_overlap(cur_stripe, prev_stripe, &min_error,
|
|
||||||
frame_width, frame_height);
|
|
||||||
|
|
||||||
frame++;
|
|
||||||
height += prev_stripe->delta_y;
|
|
||||||
prev_stripe = cur_stripe;
|
|
||||||
list_entry = g_slist_next(list_entry);
|
|
||||||
|
|
||||||
} while (frame < num_stripes);
|
|
||||||
|
|
||||||
if (height < 0)
|
|
||||||
height = -height;
|
|
||||||
height += frame_height;
|
|
||||||
g_timer_stop(timer);
|
|
||||||
fp_dbg("calc delta completed in %f secs", g_timer_elapsed(timer, NULL));
|
|
||||||
g_timer_destroy(timer);
|
|
||||||
|
|
||||||
return height;
|
|
||||||
}
|
|
||||||
|
|
||||||
static inline void aes_blit_stripe(struct fp_img *img,
|
|
||||||
struct aes_stripe *stripe,
|
|
||||||
int x, int y, unsigned int frame_width,
|
|
||||||
unsigned int frame_height)
|
|
||||||
{
|
|
||||||
unsigned int ix, iy;
|
|
||||||
unsigned int fx, fy;
|
|
||||||
unsigned int width, height;
|
|
||||||
|
|
||||||
/* Find intersection */
|
|
||||||
if (x < 0) {
|
|
||||||
width = frame_width + x;
|
|
||||||
ix = 0;
|
|
||||||
fx = -x;
|
|
||||||
} else {
|
|
||||||
ix = x;
|
|
||||||
fx = 0;
|
|
||||||
width = frame_width;
|
|
||||||
}
|
|
||||||
if ((ix + width) > img->width)
|
|
||||||
width = img->width - ix;
|
|
||||||
|
|
||||||
if (y < 0) {
|
|
||||||
iy = 0;
|
|
||||||
fy = -y;
|
|
||||||
height = frame_height + y;
|
|
||||||
} else {
|
|
||||||
iy = y;
|
|
||||||
fy = 0;
|
|
||||||
height = frame_height;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (fx > frame_width)
|
|
||||||
return;
|
|
||||||
|
|
||||||
if (fy > frame_height)
|
|
||||||
return;
|
|
||||||
|
|
||||||
if (ix > img->width)
|
|
||||||
return;
|
|
||||||
|
|
||||||
if (iy > img->height)
|
|
||||||
return;
|
|
||||||
|
|
||||||
if ((iy + height) > img->height)
|
|
||||||
height = img->height - iy;
|
|
||||||
|
|
||||||
for (; fy < height; fy++, iy++) {
|
|
||||||
if (x < 0) {
|
|
||||||
ix = 0;
|
|
||||||
fx = -x;
|
|
||||||
} else {
|
|
||||||
ix = x;
|
|
||||||
fx = 0;
|
|
||||||
}
|
|
||||||
for (; fx < width; fx++, ix++) {
|
|
||||||
img->data[ix + (iy * img->width)] = aes_get_pixel(stripe, fx, fy, frame_width, frame_height);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
struct fp_img *aes_assemble(GSList *stripes, size_t stripes_len,
|
|
||||||
unsigned int frame_width, unsigned int frame_height, unsigned int img_width)
|
|
||||||
{
|
|
||||||
GSList *stripe;
|
|
||||||
struct fp_img *img;
|
|
||||||
int height = 0;
|
|
||||||
int i, y, x;
|
|
||||||
gboolean reverse = FALSE;
|
|
||||||
struct aes_stripe *aes_stripe;
|
|
||||||
|
|
||||||
BUG_ON(stripes_len == 0);
|
|
||||||
BUG_ON(img_width < frame_width);
|
|
||||||
|
|
||||||
/* Calculate height */
|
|
||||||
i = 0;
|
|
||||||
stripe = stripes;
|
|
||||||
|
|
||||||
/* No offset for 1st image */
|
|
||||||
aes_stripe = stripe->data;
|
|
||||||
aes_stripe->delta_x = 0;
|
|
||||||
aes_stripe->delta_y = 0;
|
|
||||||
do {
|
|
||||||
aes_stripe = stripe->data;
|
|
||||||
|
|
||||||
height += aes_stripe->delta_y;
|
|
||||||
i++;
|
|
||||||
stripe = g_slist_next(stripe);
|
|
||||||
} while (i < stripes_len);
|
|
||||||
|
|
||||||
fp_dbg("height is %d", height);
|
|
||||||
|
|
||||||
if (height < 0) {
|
|
||||||
reverse = TRUE;
|
|
||||||
height = -height;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* For last frame */
|
|
||||||
height += frame_height;
|
|
||||||
|
|
||||||
/* Create buffer big enough for max image */
|
|
||||||
img = fpi_img_new(img_width * height);
|
|
||||||
img->flags = FP_IMG_COLORS_INVERTED;
|
|
||||||
img->width = img_width;
|
|
||||||
img->height = height;
|
|
||||||
|
|
||||||
/* Assemble stripes */
|
|
||||||
i = 0;
|
|
||||||
stripe = stripes;
|
|
||||||
y = reverse ? (height - frame_height) : 0;
|
|
||||||
x = (img_width - frame_width) / 2;
|
|
||||||
|
|
||||||
do {
|
|
||||||
aes_stripe = stripe->data;
|
|
||||||
|
|
||||||
y += aes_stripe->delta_y;
|
|
||||||
x += aes_stripe->delta_x;
|
|
||||||
|
|
||||||
aes_blit_stripe(img, aes_stripe, x, y, frame_width, frame_height);
|
|
||||||
|
|
||||||
stripe = g_slist_next(stripe);
|
|
||||||
i++;
|
|
||||||
} while (i < stripes_len);
|
|
||||||
|
|
||||||
return img;
|
|
||||||
}
|
|
||||||
|
|||||||
+6
-11
@@ -27,11 +27,8 @@ struct aes_regwrite {
|
|||||||
unsigned char value;
|
unsigned char value;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct aes_stripe {
|
struct fpi_frame;
|
||||||
int delta_x;
|
struct fpi_frame_asmbl_ctx;
|
||||||
int delta_y;
|
|
||||||
unsigned char data[0];
|
|
||||||
};
|
|
||||||
|
|
||||||
typedef void (*aes_write_regv_cb)(struct fp_img_dev *dev, int result,
|
typedef void (*aes_write_regv_cb)(struct fp_img_dev *dev, int result,
|
||||||
void *user_data);
|
void *user_data);
|
||||||
@@ -39,12 +36,10 @@ typedef void (*aes_write_regv_cb)(struct fp_img_dev *dev, int result,
|
|||||||
void aes_write_regv(struct fp_img_dev *dev, const struct aes_regwrite *regs,
|
void aes_write_regv(struct fp_img_dev *dev, const struct aes_regwrite *regs,
|
||||||
unsigned int num_regs, aes_write_regv_cb callback, void *user_data);
|
unsigned int num_regs, aes_write_regv_cb callback, void *user_data);
|
||||||
|
|
||||||
unsigned int aes_calc_delta(GSList *stripes, size_t stripes_len,
|
unsigned char aes_get_pixel(struct fpi_frame_asmbl_ctx *ctx,
|
||||||
unsigned int frame_width, unsigned int frame_height,
|
struct fpi_frame *frame,
|
||||||
gboolean reverse);
|
unsigned int x,
|
||||||
|
unsigned int y);
|
||||||
struct fp_img *aes_assemble(GSList *stripes, size_t stripes_len,
|
|
||||||
unsigned int frame_width, unsigned int frame_height, unsigned int img_width);
|
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,423 @@
|
|||||||
|
/*
|
||||||
|
* Image assembling routines
|
||||||
|
* Copyright (C) 2007-2008 Daniel Drake <dsd@gentoo.org>
|
||||||
|
* Copyright (C) 2013 Arseniy Lartsev <arseniy@chalmers.se>
|
||||||
|
* Copyright (C) 2015 Vasily Khoruzhick <anarsoul@gmail.com>
|
||||||
|
*
|
||||||
|
* This library is free software; you can redistribute it and/or
|
||||||
|
* modify it under the terms of the GNU Lesser General Public
|
||||||
|
* License as published by the Free Software Foundation; either
|
||||||
|
* version 2.1 of the License, or (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This library is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
|
* Lesser General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU Lesser General Public
|
||||||
|
* License along with this library; if not, write to the Free Software
|
||||||
|
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||||
|
*/
|
||||||
|
|
||||||
|
#define FP_COMPONENT "assembling"
|
||||||
|
|
||||||
|
#include <errno.h>
|
||||||
|
#include <string.h>
|
||||||
|
|
||||||
|
#include <libusb.h>
|
||||||
|
#include <glib.h>
|
||||||
|
|
||||||
|
#include "fp_internal.h"
|
||||||
|
#include "assembling.h"
|
||||||
|
|
||||||
|
static unsigned int calc_error(struct fpi_frame_asmbl_ctx *ctx,
|
||||||
|
struct fpi_frame *first_frame,
|
||||||
|
struct fpi_frame *second_frame,
|
||||||
|
int dx,
|
||||||
|
int dy)
|
||||||
|
{
|
||||||
|
unsigned int width, height;
|
||||||
|
unsigned int x1, y1, x2, y2, err, i, j;
|
||||||
|
|
||||||
|
width = ctx->frame_width - (dx > 0 ? dx : -dx);
|
||||||
|
height = ctx->frame_height - dy;
|
||||||
|
|
||||||
|
y1 = 0;
|
||||||
|
y2 = dy;
|
||||||
|
i = 0;
|
||||||
|
err = 0;
|
||||||
|
do {
|
||||||
|
x1 = dx < 0 ? 0 : dx;
|
||||||
|
x2 = dx < 0 ? -dx : 0;
|
||||||
|
j = 0;
|
||||||
|
|
||||||
|
do {
|
||||||
|
unsigned char v1, v2;
|
||||||
|
|
||||||
|
|
||||||
|
v1 = ctx->get_pixel(ctx, first_frame, x1, y1);
|
||||||
|
v2 = ctx->get_pixel(ctx, second_frame, x2, y2);
|
||||||
|
err += v1 > v2 ? v1 - v2 : v2 - v1;
|
||||||
|
j++;
|
||||||
|
x1++;
|
||||||
|
x2++;
|
||||||
|
|
||||||
|
} while (j < width);
|
||||||
|
i++;
|
||||||
|
y1++;
|
||||||
|
y2++;
|
||||||
|
} while (i < height);
|
||||||
|
|
||||||
|
/* Normalize error */
|
||||||
|
err *= (ctx->frame_height * ctx->frame_width);
|
||||||
|
err /= (height * width);
|
||||||
|
|
||||||
|
if (err == 0)
|
||||||
|
return INT_MAX;
|
||||||
|
|
||||||
|
return err;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* This function is rather CPU-intensive. It's better to use hardware
|
||||||
|
* to detect movement direction when possible.
|
||||||
|
*/
|
||||||
|
static void find_overlap(struct fpi_frame_asmbl_ctx *ctx,
|
||||||
|
struct fpi_frame *first_frame,
|
||||||
|
struct fpi_frame *second_frame,
|
||||||
|
unsigned int *min_error)
|
||||||
|
{
|
||||||
|
int dx, dy;
|
||||||
|
unsigned int err;
|
||||||
|
*min_error = 255 * ctx->frame_height * ctx->frame_width;
|
||||||
|
|
||||||
|
/* Seeking in horizontal and vertical dimensions,
|
||||||
|
* for horizontal dimension we'll check only 8 pixels
|
||||||
|
* in both directions. For vertical direction diff is
|
||||||
|
* rarely less than 2, so start with it.
|
||||||
|
*/
|
||||||
|
for (dy = 2; dy < ctx->frame_height; dy++) {
|
||||||
|
for (dx = -8; dx < 8; dx++) {
|
||||||
|
err = calc_error(ctx, first_frame, second_frame,
|
||||||
|
dx, dy);
|
||||||
|
if (err < *min_error) {
|
||||||
|
*min_error = err;
|
||||||
|
second_frame->delta_x = -dx;
|
||||||
|
second_frame->delta_y = dy;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
static unsigned int do_movement_estimation(struct fpi_frame_asmbl_ctx *ctx,
|
||||||
|
GSList *stripes, size_t num_stripes,
|
||||||
|
gboolean reverse)
|
||||||
|
{
|
||||||
|
GSList *list_entry = stripes;
|
||||||
|
GTimer *timer;
|
||||||
|
int frame = 1;
|
||||||
|
struct fpi_frame *prev_stripe = list_entry->data;
|
||||||
|
unsigned int min_error;
|
||||||
|
/* Max error is width * height * 255, for AES2501 which has the largest
|
||||||
|
* sensor its 192*16*255 = 783360. So for 32bit value it's ~5482 frame before
|
||||||
|
* we might get int overflow. Use 64bit value here to prevent integer overflow
|
||||||
|
*/
|
||||||
|
unsigned long long total_error = 0;
|
||||||
|
|
||||||
|
list_entry = g_slist_next(list_entry);
|
||||||
|
|
||||||
|
timer = g_timer_new();
|
||||||
|
do {
|
||||||
|
struct fpi_frame *cur_stripe = list_entry->data;
|
||||||
|
|
||||||
|
if (reverse) {
|
||||||
|
find_overlap(ctx, prev_stripe, cur_stripe, &min_error);
|
||||||
|
prev_stripe->delta_y = -prev_stripe->delta_y;
|
||||||
|
prev_stripe->delta_x = -prev_stripe->delta_x;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
find_overlap(ctx, cur_stripe, prev_stripe, &min_error);
|
||||||
|
total_error += min_error;
|
||||||
|
|
||||||
|
frame++;
|
||||||
|
prev_stripe = cur_stripe;
|
||||||
|
list_entry = g_slist_next(list_entry);
|
||||||
|
|
||||||
|
} while (frame < num_stripes);
|
||||||
|
|
||||||
|
g_timer_stop(timer);
|
||||||
|
fp_dbg("calc delta completed in %f secs", g_timer_elapsed(timer, NULL));
|
||||||
|
g_timer_destroy(timer);
|
||||||
|
|
||||||
|
return total_error / num_stripes;
|
||||||
|
}
|
||||||
|
|
||||||
|
void fpi_do_movement_estimation(struct fpi_frame_asmbl_ctx *ctx,
|
||||||
|
GSList *stripes, size_t num_stripes)
|
||||||
|
{
|
||||||
|
int err, rev_err;
|
||||||
|
err = do_movement_estimation(ctx, stripes, num_stripes, FALSE);
|
||||||
|
rev_err = do_movement_estimation(ctx, stripes, num_stripes, TRUE);
|
||||||
|
fp_dbg("errors: %d rev: %d", err, rev_err);
|
||||||
|
if (err < rev_err) {
|
||||||
|
do_movement_estimation(ctx, stripes, num_stripes, FALSE);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
static inline void aes_blit_stripe(struct fpi_frame_asmbl_ctx *ctx,
|
||||||
|
struct fp_img *img,
|
||||||
|
struct fpi_frame *stripe,
|
||||||
|
int x, int y)
|
||||||
|
{
|
||||||
|
unsigned int ix, iy;
|
||||||
|
unsigned int fx, fy;
|
||||||
|
unsigned int width, height;
|
||||||
|
|
||||||
|
/* Find intersection */
|
||||||
|
if (x < 0) {
|
||||||
|
width = ctx->frame_width + x;
|
||||||
|
ix = 0;
|
||||||
|
fx = -x;
|
||||||
|
} else {
|
||||||
|
ix = x;
|
||||||
|
fx = 0;
|
||||||
|
width = ctx->frame_width;
|
||||||
|
}
|
||||||
|
if ((ix + width) > img->width)
|
||||||
|
width = img->width - ix;
|
||||||
|
|
||||||
|
if (y < 0) {
|
||||||
|
iy = 0;
|
||||||
|
fy = -y;
|
||||||
|
height = ctx->frame_height + y;
|
||||||
|
} else {
|
||||||
|
iy = y;
|
||||||
|
fy = 0;
|
||||||
|
height = ctx->frame_height;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (fx > ctx->frame_width)
|
||||||
|
return;
|
||||||
|
|
||||||
|
if (fy > ctx->frame_height)
|
||||||
|
return;
|
||||||
|
|
||||||
|
if (ix > img->width)
|
||||||
|
return;
|
||||||
|
|
||||||
|
if (iy > img->height)
|
||||||
|
return;
|
||||||
|
|
||||||
|
if ((iy + height) > img->height)
|
||||||
|
height = img->height - iy;
|
||||||
|
|
||||||
|
for (; fy < height; fy++, iy++) {
|
||||||
|
if (x < 0) {
|
||||||
|
ix = 0;
|
||||||
|
fx = -x;
|
||||||
|
} else {
|
||||||
|
ix = x;
|
||||||
|
fx = 0;
|
||||||
|
}
|
||||||
|
for (; fx < width; fx++, ix++) {
|
||||||
|
img->data[ix + (iy * img->width)] = ctx->get_pixel(ctx, stripe, fx, fy);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
struct fp_img *fpi_assemble_frames(struct fpi_frame_asmbl_ctx *ctx,
|
||||||
|
GSList *stripes, size_t stripes_len)
|
||||||
|
{
|
||||||
|
GSList *stripe;
|
||||||
|
struct fp_img *img;
|
||||||
|
int height = 0;
|
||||||
|
int i, y, x;
|
||||||
|
gboolean reverse = FALSE;
|
||||||
|
struct fpi_frame *fpi_frame;
|
||||||
|
|
||||||
|
BUG_ON(stripes_len == 0);
|
||||||
|
BUG_ON(ctx->image_width < ctx->frame_width);
|
||||||
|
|
||||||
|
/* Calculate height */
|
||||||
|
i = 0;
|
||||||
|
stripe = stripes;
|
||||||
|
|
||||||
|
/* No offset for 1st image */
|
||||||
|
fpi_frame = stripe->data;
|
||||||
|
fpi_frame->delta_x = 0;
|
||||||
|
fpi_frame->delta_y = 0;
|
||||||
|
do {
|
||||||
|
fpi_frame = stripe->data;
|
||||||
|
|
||||||
|
height += fpi_frame->delta_y;
|
||||||
|
i++;
|
||||||
|
stripe = g_slist_next(stripe);
|
||||||
|
} while (i < stripes_len);
|
||||||
|
|
||||||
|
fp_dbg("height is %d", height);
|
||||||
|
|
||||||
|
if (height < 0) {
|
||||||
|
reverse = TRUE;
|
||||||
|
height = -height;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* For last frame */
|
||||||
|
height += ctx->frame_height;
|
||||||
|
|
||||||
|
/* Create buffer big enough for max image */
|
||||||
|
img = fpi_img_new(ctx->image_width * height);
|
||||||
|
img->flags = FP_IMG_COLORS_INVERTED;
|
||||||
|
img->flags |= reverse ? 0 : FP_IMG_H_FLIPPED | FP_IMG_V_FLIPPED;
|
||||||
|
img->width = ctx->image_width;
|
||||||
|
img->height = height;
|
||||||
|
|
||||||
|
/* Assemble stripes */
|
||||||
|
i = 0;
|
||||||
|
stripe = stripes;
|
||||||
|
y = reverse ? (height - ctx->frame_height) : 0;
|
||||||
|
x = (ctx->image_width - ctx->frame_width) / 2;
|
||||||
|
|
||||||
|
do {
|
||||||
|
fpi_frame = stripe->data;
|
||||||
|
|
||||||
|
y += fpi_frame->delta_y;
|
||||||
|
x += fpi_frame->delta_x;
|
||||||
|
|
||||||
|
aes_blit_stripe(ctx, img, fpi_frame, x, y);
|
||||||
|
|
||||||
|
stripe = g_slist_next(stripe);
|
||||||
|
i++;
|
||||||
|
} while (i < stripes_len);
|
||||||
|
|
||||||
|
return img;
|
||||||
|
}
|
||||||
|
|
||||||
|
static int cmpint(const void *p1, const void *p2, gpointer data)
|
||||||
|
{
|
||||||
|
int a = *((int *)p1);
|
||||||
|
int b = *((int *)p2);
|
||||||
|
if (a < b)
|
||||||
|
return -1;
|
||||||
|
else if (a == b)
|
||||||
|
return 0;
|
||||||
|
else
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
static void median_filter(int *data, int size, int filtersize)
|
||||||
|
{
|
||||||
|
int i;
|
||||||
|
int *result = (int *)g_malloc0(size*sizeof(int));
|
||||||
|
int *sortbuf = (int *)g_malloc0(filtersize*sizeof(int));
|
||||||
|
for (i = 0; i < size; i++) {
|
||||||
|
int i1 = i - (filtersize-1)/2;
|
||||||
|
int i2 = i + (filtersize-1)/2;
|
||||||
|
if (i1 < 0)
|
||||||
|
i1 = 0;
|
||||||
|
if (i2 >= size)
|
||||||
|
i2 = size-1;
|
||||||
|
g_memmove(sortbuf, data+i1, (i2-i1+1)*sizeof(int));
|
||||||
|
g_qsort_with_data(sortbuf, i2-i1+1, sizeof(int), cmpint, NULL);
|
||||||
|
result[i] = sortbuf[(i2-i1+1)/2];
|
||||||
|
}
|
||||||
|
memmove(data, result, size*sizeof(int));
|
||||||
|
g_free(result);
|
||||||
|
g_free(sortbuf);
|
||||||
|
}
|
||||||
|
|
||||||
|
static void interpolate_lines(struct fpi_line_asmbl_ctx *ctx,
|
||||||
|
GSList *line1, float y1, GSList *line2,
|
||||||
|
float y2, unsigned char *output, float yi, int size)
|
||||||
|
{
|
||||||
|
int i;
|
||||||
|
unsigned char p1, p2;
|
||||||
|
|
||||||
|
if (!line1 || !line2)
|
||||||
|
return;
|
||||||
|
|
||||||
|
for (i = 0; i < size; i++) {
|
||||||
|
p1 = ctx->get_pixel(ctx, line1, i);
|
||||||
|
p2 = ctx->get_pixel(ctx, line2, i);
|
||||||
|
output[i] = (float)p1
|
||||||
|
+ (yi - y1)/(y2 - y1)*(p2 - p1);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
static int min(int a, int b) {return (a < b) ? a : b; }
|
||||||
|
|
||||||
|
/* Rescale image to account for variable swiping speed */
|
||||||
|
struct fp_img *fpi_assemble_lines(struct fpi_line_asmbl_ctx *ctx,
|
||||||
|
GSList *lines, size_t lines_len)
|
||||||
|
{
|
||||||
|
/* Number of output lines per distance between two scanners */
|
||||||
|
int i;
|
||||||
|
GSList *row1, *row2;
|
||||||
|
float y = 0.0;
|
||||||
|
int line_ind = 0;
|
||||||
|
int *offsets = (int *)g_malloc0((lines_len / 2) * sizeof(int));
|
||||||
|
unsigned char *output = g_malloc0(ctx->line_width * ctx->max_height);
|
||||||
|
struct fp_img *img;
|
||||||
|
|
||||||
|
fp_dbg("%llu", g_get_real_time());
|
||||||
|
|
||||||
|
row1 = lines;
|
||||||
|
for (i = 0; (i < lines_len - 1) && row1; i += 2) {
|
||||||
|
int bestmatch = i;
|
||||||
|
int bestdiff = 0;
|
||||||
|
int j, firstrow, lastrow;
|
||||||
|
|
||||||
|
firstrow = i + 1;
|
||||||
|
lastrow = min(i + ctx->max_search_offset, lines_len - 1);
|
||||||
|
|
||||||
|
row2 = g_slist_next(row1);
|
||||||
|
for (j = firstrow; j <= lastrow; j++) {
|
||||||
|
int diff = ctx->get_deviation(ctx,
|
||||||
|
row1,
|
||||||
|
row2);
|
||||||
|
if ((j == firstrow) || (diff < bestdiff)) {
|
||||||
|
bestdiff = diff;
|
||||||
|
bestmatch = j;
|
||||||
|
}
|
||||||
|
row2 = g_slist_next(row2);
|
||||||
|
}
|
||||||
|
offsets[i / 2] = bestmatch - i;
|
||||||
|
fp_dbg("%d", offsets[i / 2]);
|
||||||
|
row1 = g_slist_next(row1);
|
||||||
|
if (row1)
|
||||||
|
row1 = g_slist_next(row1);
|
||||||
|
}
|
||||||
|
|
||||||
|
median_filter(offsets, (lines_len / 2) - 1, ctx->median_filter_size);
|
||||||
|
|
||||||
|
fp_dbg("offsets_filtered: %llu", g_get_real_time());
|
||||||
|
for (i = 0; i <= (lines_len / 2) - 1; i++)
|
||||||
|
fp_dbg("%d", offsets[i]);
|
||||||
|
row1 = lines;
|
||||||
|
for (i = 0; i < lines_len - 1; i++, row1 = g_slist_next(row1)) {
|
||||||
|
int offset = offsets[i/2];
|
||||||
|
if (offset > 0) {
|
||||||
|
float ynext = y + (float)ctx->resolution / offset;
|
||||||
|
while (line_ind < ynext) {
|
||||||
|
if (line_ind > ctx->max_height - 1)
|
||||||
|
goto out;
|
||||||
|
interpolate_lines(ctx,
|
||||||
|
row1, y,
|
||||||
|
g_slist_next(row1),
|
||||||
|
ynext,
|
||||||
|
output + line_ind * ctx->line_width,
|
||||||
|
line_ind,
|
||||||
|
ctx->line_width);
|
||||||
|
line_ind++;
|
||||||
|
}
|
||||||
|
y = ynext;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
out:
|
||||||
|
img = fpi_img_new(ctx->line_width * line_ind);
|
||||||
|
img->height = line_ind;
|
||||||
|
img->width = ctx->line_width;
|
||||||
|
img->flags = FP_IMG_V_FLIPPED;
|
||||||
|
g_memmove(img->data, output, ctx->line_width * line_ind);
|
||||||
|
g_free(offsets);
|
||||||
|
g_free(output);
|
||||||
|
return img;
|
||||||
|
}
|
||||||
@@ -0,0 +1,65 @@
|
|||||||
|
/*
|
||||||
|
* Image assembling routines
|
||||||
|
* Shared functions between libfprint Authentec drivers
|
||||||
|
* Copyright (C) 2007 Daniel Drake <dsd@gentoo.org>
|
||||||
|
* Copyright (C) 2015 Vasily Khoruzhick <anarsoul@gmail.com>
|
||||||
|
*
|
||||||
|
* This library is free software; you can redistribute it and/or
|
||||||
|
* modify it under the terms of the GNU Lesser General Public
|
||||||
|
* License as published by the Free Software Foundation; either
|
||||||
|
* version 2.1 of the License, or (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This library is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
|
* Lesser General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU Lesser General Public
|
||||||
|
* License along with this library; if not, write to the Free Software
|
||||||
|
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef __ASSEMBLING_H__
|
||||||
|
#define __ASSEMBLING_H__
|
||||||
|
|
||||||
|
#include <fp_internal.h>
|
||||||
|
|
||||||
|
struct fpi_frame {
|
||||||
|
int delta_x;
|
||||||
|
int delta_y;
|
||||||
|
unsigned char data[0];
|
||||||
|
};
|
||||||
|
|
||||||
|
struct fpi_frame_asmbl_ctx {
|
||||||
|
unsigned frame_width;
|
||||||
|
unsigned frame_height;
|
||||||
|
unsigned image_width;
|
||||||
|
unsigned char (*get_pixel)(struct fpi_frame_asmbl_ctx *ctx,
|
||||||
|
struct fpi_frame *frame,
|
||||||
|
unsigned x,
|
||||||
|
unsigned y);
|
||||||
|
};
|
||||||
|
|
||||||
|
void fpi_do_movement_estimation(struct fpi_frame_asmbl_ctx *ctx,
|
||||||
|
GSList *stripes, size_t stripes_len);
|
||||||
|
|
||||||
|
struct fp_img *fpi_assemble_frames(struct fpi_frame_asmbl_ctx *ctx,
|
||||||
|
GSList *stripes, size_t stripes_len);
|
||||||
|
|
||||||
|
struct fpi_line_asmbl_ctx {
|
||||||
|
unsigned line_width;
|
||||||
|
unsigned max_height;
|
||||||
|
unsigned resolution;
|
||||||
|
unsigned median_filter_size;
|
||||||
|
unsigned max_search_offset;
|
||||||
|
int (*get_deviation)(struct fpi_line_asmbl_ctx *ctx,
|
||||||
|
GSList *line1, GSList *line2);
|
||||||
|
unsigned char (*get_pixel)(struct fpi_line_asmbl_ctx *ctx,
|
||||||
|
GSList *line,
|
||||||
|
unsigned x);
|
||||||
|
};
|
||||||
|
|
||||||
|
struct fp_img *fpi_assemble_lines(struct fpi_line_asmbl_ctx *ctx,
|
||||||
|
GSList *lines, size_t lines_len);
|
||||||
|
|
||||||
|
#endif
|
||||||
@@ -398,6 +398,9 @@ static struct fp_img_driver * const img_drivers[] = {
|
|||||||
#ifdef ENABLE_ETES603
|
#ifdef ENABLE_ETES603
|
||||||
&etes603_driver,
|
&etes603_driver,
|
||||||
#endif
|
#endif
|
||||||
|
#ifdef ENABLE_VFS0050
|
||||||
|
&vfs0050_driver,
|
||||||
|
#endif
|
||||||
/*#ifdef ENABLE_FDU2000
|
/*#ifdef ENABLE_FDU2000
|
||||||
&fdu2000_driver,
|
&fdu2000_driver,
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
+28
-26
@@ -30,6 +30,7 @@
|
|||||||
|
|
||||||
#include <libusb.h>
|
#include <libusb.h>
|
||||||
|
|
||||||
|
#include <assembling.h>
|
||||||
#include <aeslib.h>
|
#include <aeslib.h>
|
||||||
#include <fp_internal.h>
|
#include <fp_internal.h>
|
||||||
|
|
||||||
@@ -66,6 +67,7 @@ static int adjust_gain(unsigned char *buffer, int status);
|
|||||||
#define FRAME_WIDTH 128
|
#define FRAME_WIDTH 128
|
||||||
#define FRAME_HEIGHT 8
|
#define FRAME_HEIGHT 8
|
||||||
#define FRAME_SIZE (FRAME_WIDTH * FRAME_HEIGHT)
|
#define FRAME_SIZE (FRAME_WIDTH * FRAME_HEIGHT)
|
||||||
|
#define IMAGE_WIDTH (FRAME_WIDTH + (FRAME_WIDTH / 2))
|
||||||
/* maximum number of frames to read during a scan */
|
/* maximum number of frames to read during a scan */
|
||||||
/* FIXME reduce substantially */
|
/* FIXME reduce substantially */
|
||||||
#define MAX_FRAMES 350
|
#define MAX_FRAMES 350
|
||||||
@@ -80,6 +82,13 @@ struct aes1610_dev {
|
|||||||
uint8_t blanks_count;
|
uint8_t blanks_count;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
static struct fpi_frame_asmbl_ctx assembling_ctx = {
|
||||||
|
.frame_width = FRAME_WIDTH,
|
||||||
|
.frame_height = FRAME_HEIGHT,
|
||||||
|
.image_width = IMAGE_WIDTH,
|
||||||
|
.get_pixel = aes_get_pixel,
|
||||||
|
};
|
||||||
|
|
||||||
typedef void (*aes1610_read_regs_cb)(struct fp_img_dev *dev, int status,
|
typedef void (*aes1610_read_regs_cb)(struct fp_img_dev *dev, int status,
|
||||||
unsigned char *regs, void *user_data);
|
unsigned char *regs, void *user_data);
|
||||||
|
|
||||||
@@ -404,7 +413,7 @@ static unsigned char list_BE_values[10] = {
|
|||||||
/*
|
/*
|
||||||
* The different possible values for 0xBD register */
|
* The different possible values for 0xBD register */
|
||||||
static unsigned char list_BD_values[10] = {
|
static unsigned char list_BD_values[10] = {
|
||||||
0x48, 0x4B, 0x4F, 0x52, 0x57, 0x59, 0x5B
|
0x28, 0x2b, 0x30, 0x3b, 0x45, 0x49, 0x4B
|
||||||
};
|
};
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@@ -425,25 +434,25 @@ static int adjust_gain(unsigned char *buffer, int status)
|
|||||||
strip_scan_reqs[0].value = 0x6B;
|
strip_scan_reqs[0].value = 0x6B;
|
||||||
strip_scan_reqs[1].value = 0x06;
|
strip_scan_reqs[1].value = 0x06;
|
||||||
strip_scan_reqs[2].value = 0x35;
|
strip_scan_reqs[2].value = 0x35;
|
||||||
strip_scan_reqs[3].value = 0x5B;
|
strip_scan_reqs[3].value = 0x4B;
|
||||||
}
|
}
|
||||||
else if (buffer[1] > 0x55) {
|
else if (buffer[1] > 0x55) {
|
||||||
strip_scan_reqs[0].value = 0x63;
|
strip_scan_reqs[0].value = 0x63;
|
||||||
strip_scan_reqs[1].value = 0x15;
|
strip_scan_reqs[1].value = 0x15;
|
||||||
strip_scan_reqs[2].value = 0x35;
|
strip_scan_reqs[2].value = 0x35;
|
||||||
strip_scan_reqs[3].value = 0x4F;
|
strip_scan_reqs[3].value = 0x3b;
|
||||||
}
|
}
|
||||||
else if (buffer[1] > 0x40 || buffer[16] > 0x19) {
|
else if (buffer[1] > 0x40 || buffer[16] > 0x19) {
|
||||||
strip_scan_reqs[0].value = 0x43;
|
strip_scan_reqs[0].value = 0x43;
|
||||||
strip_scan_reqs[1].value = 0x13;
|
strip_scan_reqs[1].value = 0x13;
|
||||||
strip_scan_reqs[2].value = 0x35;
|
strip_scan_reqs[2].value = 0x35;
|
||||||
strip_scan_reqs[3].value = 0x4B;
|
strip_scan_reqs[3].value = 0x30;
|
||||||
}
|
}
|
||||||
else { // minimum gain needed
|
else { // minimum gain needed
|
||||||
strip_scan_reqs[0].value = 0x23;
|
strip_scan_reqs[0].value = 0x23;
|
||||||
strip_scan_reqs[1].value = 0x07;
|
strip_scan_reqs[1].value = 0x07;
|
||||||
strip_scan_reqs[2].value = 0x35;
|
strip_scan_reqs[2].value = 0x35;
|
||||||
strip_scan_reqs[3].value = 0x48;
|
strip_scan_reqs[3].value = 0x28;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Now copy this values in capture_reqs
|
// Now copy this values in capture_reqs
|
||||||
@@ -579,11 +588,14 @@ static void capture_read_strip_cb(struct libusb_transfer *transfer)
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (sum > 0) {
|
if (sum > 0) {
|
||||||
/* FIXME: would preallocating strip buffers be a decent optimization? */
|
/* FIXME: would preallocating strip buffers be a decent optimization? */
|
||||||
stripdata = g_malloc(128 * 4);
|
struct fpi_frame *stripe = g_malloc(FRAME_WIDTH * (FRAME_HEIGHT / 2) + sizeof(struct fpi_frame));
|
||||||
memcpy(stripdata, data + 1, 128 * 4);
|
stripe->delta_x = 0;
|
||||||
aesdev->strips = g_slist_prepend(aesdev->strips, stripdata);
|
stripe->delta_y = 0;
|
||||||
aesdev->strips_len++;
|
stripdata = stripe->data;
|
||||||
|
memcpy(stripdata, data + 1, FRAME_WIDTH * (FRAME_HEIGHT / 2));
|
||||||
|
aesdev->strips = g_slist_prepend(aesdev->strips, stripe);
|
||||||
|
aesdev->strips_len++;
|
||||||
aesdev->blanks_count = 0;
|
aesdev->blanks_count = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -609,24 +621,14 @@ static void capture_read_strip_cb(struct libusb_transfer *transfer)
|
|||||||
/* stop capturing if MAX_FRAMES is reached */
|
/* stop capturing if MAX_FRAMES is reached */
|
||||||
if (aesdev->blanks_count > 10 || g_slist_length(aesdev->strips) >= MAX_FRAMES) {
|
if (aesdev->blanks_count > 10 || g_slist_length(aesdev->strips) >= MAX_FRAMES) {
|
||||||
struct fp_img *img;
|
struct fp_img *img;
|
||||||
unsigned int height, rev_height;
|
|
||||||
|
|
||||||
fp_dbg("sending stop capture.... blanks=%d frames=%d", aesdev->blanks_count, g_slist_length(aesdev->strips));
|
fp_dbg("sending stop capture.... blanks=%d frames=%d", aesdev->blanks_count, g_slist_length(aesdev->strips));
|
||||||
/* send stop capture bits */
|
/* send stop capture bits */
|
||||||
aes_write_regv(dev, capture_stop, G_N_ELEMENTS(capture_stop), stub_capture_stop_cb, NULL);
|
aes_write_regv(dev, capture_stop, G_N_ELEMENTS(capture_stop), stub_capture_stop_cb, NULL);
|
||||||
aesdev->strips = g_slist_reverse(aesdev->strips);
|
aesdev->strips = g_slist_reverse(aesdev->strips);
|
||||||
height = aes_calc_delta(aesdev->strips, aesdev->strips_len,
|
fpi_do_movement_estimation(&assembling_ctx, aesdev->strips, aesdev->strips_len);
|
||||||
FRAME_WIDTH, FRAME_HEIGHT, FALSE);
|
img = fpi_assemble_frames(&assembling_ctx, aesdev->strips, aesdev->strips_len);
|
||||||
rev_height = aes_calc_delta(aesdev->strips, aesdev->strips_len,
|
img->flags |= FP_IMG_PARTIAL;
|
||||||
FRAME_WIDTH, FRAME_HEIGHT, TRUE);
|
|
||||||
fp_dbg("heights: %d rev: %d", height, rev_height);
|
|
||||||
if (rev_height < height) {
|
|
||||||
fp_dbg("Reversed direction");
|
|
||||||
height = aes_calc_delta(aesdev->strips, aesdev->strips_len,
|
|
||||||
FRAME_WIDTH, FRAME_HEIGHT, FALSE);
|
|
||||||
}
|
|
||||||
img = aes_assemble(aesdev->strips, aesdev->strips_len,
|
|
||||||
FRAME_WIDTH, FRAME_HEIGHT, FRAME_WIDTH + FRAME_WIDTH / 2);
|
|
||||||
g_slist_free_full(aesdev->strips, g_free);
|
g_slist_free_full(aesdev->strips, g_free);
|
||||||
aesdev->strips = NULL;
|
aesdev->strips = NULL;
|
||||||
aesdev->strips_len = 0;
|
aesdev->strips_len = 0;
|
||||||
@@ -809,7 +811,7 @@ static int dev_init(struct fp_img_dev *dev, unsigned long driver_data)
|
|||||||
|
|
||||||
r = libusb_claim_interface(dev->udev, 0);
|
r = libusb_claim_interface(dev->udev, 0);
|
||||||
if (r < 0) {
|
if (r < 0) {
|
||||||
fp_err("could not claim interface 0");
|
fp_err("could not claim interface 0: %s", libusb_error_name(r));
|
||||||
return r;
|
return r;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -840,9 +842,9 @@ struct fp_img_driver aes1610_driver = {
|
|||||||
},
|
},
|
||||||
.flags = 0,
|
.flags = 0,
|
||||||
.img_height = -1,
|
.img_height = -1,
|
||||||
.img_width = FRAME_WIDTH + FRAME_WIDTH / 2,
|
.img_width = IMAGE_WIDTH,
|
||||||
|
|
||||||
.bz3_threshold = 50,
|
.bz3_threshold = 20,
|
||||||
|
|
||||||
.open = dev_init,
|
.open = dev_init,
|
||||||
.close = dev_deinit,
|
.close = dev_deinit,
|
||||||
|
|||||||
@@ -28,12 +28,22 @@
|
|||||||
|
|
||||||
#include <fp_internal.h>
|
#include <fp_internal.h>
|
||||||
|
|
||||||
|
#include <assembling.h>
|
||||||
|
#include <aeslib.h>
|
||||||
|
|
||||||
#include "aesx660.h"
|
#include "aesx660.h"
|
||||||
#include "aes1660.h"
|
#include "aes1660.h"
|
||||||
#include "driver_ids.h"
|
#include "driver_ids.h"
|
||||||
|
|
||||||
#define FRAME_WIDTH 128
|
#define FRAME_WIDTH 128
|
||||||
#define SCALE_FACTOR 2
|
#define IMAGE_WIDTH (FRAME_WIDTH + (FRAME_WIDTH / 2))
|
||||||
|
|
||||||
|
static struct fpi_frame_asmbl_ctx assembling_ctx = {
|
||||||
|
.frame_width = FRAME_WIDTH,
|
||||||
|
.frame_height = AESX660_FRAME_HEIGHT,
|
||||||
|
.image_width = IMAGE_WIDTH,
|
||||||
|
.get_pixel = aes_get_pixel,
|
||||||
|
};
|
||||||
|
|
||||||
static int dev_init(struct fp_img_dev *dev, unsigned long driver_data)
|
static int dev_init(struct fp_img_dev *dev, unsigned long driver_data)
|
||||||
{
|
{
|
||||||
@@ -43,7 +53,7 @@ static int dev_init(struct fp_img_dev *dev, unsigned long driver_data)
|
|||||||
|
|
||||||
r = libusb_claim_interface(dev->udev, 0);
|
r = libusb_claim_interface(dev->udev, 0);
|
||||||
if (r < 0) {
|
if (r < 0) {
|
||||||
fp_err("could not claim interface 0");
|
fp_err("could not claim interface 0: %s", libusb_error_name(r));
|
||||||
return r;
|
return r;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -55,7 +65,8 @@ static int dev_init(struct fp_img_dev *dev, unsigned long driver_data)
|
|||||||
aesdev->init_seqs_len[1] = array_n_elements(aes1660_init_2);
|
aesdev->init_seqs_len[1] = array_n_elements(aes1660_init_2);
|
||||||
aesdev->start_imaging_cmd = (unsigned char *)aes1660_start_imaging_cmd;
|
aesdev->start_imaging_cmd = (unsigned char *)aes1660_start_imaging_cmd;
|
||||||
aesdev->start_imaging_cmd_len = sizeof(aes1660_start_imaging_cmd);
|
aesdev->start_imaging_cmd_len = sizeof(aes1660_start_imaging_cmd);
|
||||||
aesdev->frame_width = FRAME_WIDTH;
|
aesdev->assembling_ctx = &assembling_ctx;
|
||||||
|
aesdev->extra_img_flags = FP_IMG_PARTIAL;
|
||||||
|
|
||||||
fpi_imgdev_open_complete(dev, 0);
|
fpi_imgdev_open_complete(dev, 0);
|
||||||
return 0;
|
return 0;
|
||||||
@@ -102,7 +113,7 @@ struct fp_img_driver aes1660_driver = {
|
|||||||
.flags = 0,
|
.flags = 0,
|
||||||
.img_height = -1,
|
.img_height = -1,
|
||||||
.img_width = FRAME_WIDTH + FRAME_WIDTH / 2,
|
.img_width = FRAME_WIDTH + FRAME_WIDTH / 2,
|
||||||
.bz3_threshold = 70,
|
.bz3_threshold = 20,
|
||||||
|
|
||||||
.open = dev_init,
|
.open = dev_init,
|
||||||
.close = dev_deinit,
|
.close = dev_deinit,
|
||||||
|
|||||||
+17
-16
@@ -28,6 +28,7 @@
|
|||||||
|
|
||||||
#include <libusb.h>
|
#include <libusb.h>
|
||||||
|
|
||||||
|
#include <assembling.h>
|
||||||
#include <aeslib.h>
|
#include <aeslib.h>
|
||||||
#include <fp_internal.h>
|
#include <fp_internal.h>
|
||||||
|
|
||||||
@@ -58,6 +59,7 @@ static void complete_deactivation(struct fp_img_dev *dev);
|
|||||||
#define FRAME_WIDTH 192
|
#define FRAME_WIDTH 192
|
||||||
#define FRAME_HEIGHT 16
|
#define FRAME_HEIGHT 16
|
||||||
#define FRAME_SIZE (FRAME_WIDTH * FRAME_HEIGHT)
|
#define FRAME_SIZE (FRAME_WIDTH * FRAME_HEIGHT)
|
||||||
|
#define IMAGE_WIDTH (FRAME_WIDTH + (FRAME_WIDTH / 2))
|
||||||
/* maximum number of frames to read during a scan */
|
/* maximum number of frames to read during a scan */
|
||||||
/* FIXME reduce substantially */
|
/* FIXME reduce substantially */
|
||||||
#define MAX_FRAMES 150
|
#define MAX_FRAMES 150
|
||||||
@@ -72,6 +74,13 @@ struct aes2501_dev {
|
|||||||
int no_finger_cnt;
|
int no_finger_cnt;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
static struct fpi_frame_asmbl_ctx assembling_ctx = {
|
||||||
|
.frame_width = FRAME_WIDTH,
|
||||||
|
.frame_height = FRAME_HEIGHT,
|
||||||
|
.image_width = IMAGE_WIDTH,
|
||||||
|
.get_pixel = aes_get_pixel,
|
||||||
|
};
|
||||||
|
|
||||||
typedef void (*aes2501_read_regs_cb)(struct fp_img_dev *dev, int status,
|
typedef void (*aes2501_read_regs_cb)(struct fp_img_dev *dev, int status,
|
||||||
unsigned char *regs, void *user_data);
|
unsigned char *regs, void *user_data);
|
||||||
|
|
||||||
@@ -481,21 +490,13 @@ static void capture_read_strip_cb(struct libusb_transfer *transfer)
|
|||||||
aesdev->no_finger_cnt++;
|
aesdev->no_finger_cnt++;
|
||||||
if (aesdev->no_finger_cnt == 3) {
|
if (aesdev->no_finger_cnt == 3) {
|
||||||
struct fp_img *img;
|
struct fp_img *img;
|
||||||
unsigned int height, rev_height;
|
|
||||||
|
|
||||||
aesdev->strips = g_slist_reverse(aesdev->strips);
|
aesdev->strips = g_slist_reverse(aesdev->strips);
|
||||||
height = aes_calc_delta(aesdev->strips, aesdev->strips_len,
|
fpi_do_movement_estimation(&assembling_ctx,
|
||||||
FRAME_WIDTH, FRAME_HEIGHT, FALSE);
|
aesdev->strips, aesdev->strips_len);
|
||||||
rev_height = aes_calc_delta(aesdev->strips, aesdev->strips_len,
|
img = fpi_assemble_frames(&assembling_ctx,
|
||||||
FRAME_WIDTH, FRAME_HEIGHT, TRUE);
|
aesdev->strips, aesdev->strips_len);
|
||||||
fp_dbg("heights: %d rev: %d", height, rev_height);
|
img->flags |= FP_IMG_PARTIAL;
|
||||||
if (rev_height < height) {
|
|
||||||
fp_dbg("Reversed direction");
|
|
||||||
height = aes_calc_delta(aesdev->strips, aesdev->strips_len,
|
|
||||||
FRAME_WIDTH, FRAME_HEIGHT, FALSE);
|
|
||||||
}
|
|
||||||
img = aes_assemble(aesdev->strips, aesdev->strips_len,
|
|
||||||
FRAME_WIDTH, FRAME_HEIGHT, FRAME_WIDTH + FRAME_WIDTH / 2);
|
|
||||||
g_slist_free_full(aesdev->strips, g_free);
|
g_slist_free_full(aesdev->strips, g_free);
|
||||||
aesdev->strips = NULL;
|
aesdev->strips = NULL;
|
||||||
aesdev->strips_len = 0;
|
aesdev->strips_len = 0;
|
||||||
@@ -509,7 +510,7 @@ static void capture_read_strip_cb(struct libusb_transfer *transfer)
|
|||||||
} else {
|
} else {
|
||||||
/* obtain next strip */
|
/* obtain next strip */
|
||||||
/* FIXME: would preallocating strip buffers be a decent optimization? */
|
/* FIXME: would preallocating strip buffers be a decent optimization? */
|
||||||
struct aes_stripe *stripe = g_malloc(FRAME_WIDTH * FRAME_HEIGHT / 2 + sizeof(struct aes_stripe));
|
struct fpi_frame *stripe = g_malloc(FRAME_WIDTH * FRAME_HEIGHT / 2 + sizeof(struct fpi_frame));
|
||||||
stripe->delta_x = 0;
|
stripe->delta_x = 0;
|
||||||
stripe->delta_y = 0;
|
stripe->delta_y = 0;
|
||||||
stripdata = stripe->data;
|
stripdata = stripe->data;
|
||||||
@@ -849,7 +850,7 @@ static int dev_init(struct fp_img_dev *dev, unsigned long driver_data)
|
|||||||
|
|
||||||
r = libusb_claim_interface(dev->udev, 0);
|
r = libusb_claim_interface(dev->udev, 0);
|
||||||
if (r < 0) {
|
if (r < 0) {
|
||||||
fp_err("could not claim interface 0");
|
fp_err("could not claim interface 0: %s", libusb_error_name(r));
|
||||||
return r;
|
return r;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -881,7 +882,7 @@ struct fp_img_driver aes2501_driver = {
|
|||||||
},
|
},
|
||||||
.flags = 0,
|
.flags = 0,
|
||||||
.img_height = -1,
|
.img_height = -1,
|
||||||
.img_width = FRAME_WIDTH + FRAME_WIDTH / 2,
|
.img_width = IMAGE_WIDTH,
|
||||||
|
|
||||||
.open = dev_init,
|
.open = dev_init,
|
||||||
.close = dev_deinit,
|
.close = dev_deinit,
|
||||||
|
|||||||
@@ -28,6 +28,7 @@
|
|||||||
|
|
||||||
#include <libusb.h>
|
#include <libusb.h>
|
||||||
|
|
||||||
|
#include <assembling.h>
|
||||||
#include <aeslib.h>
|
#include <aeslib.h>
|
||||||
#include <fp_internal.h>
|
#include <fp_internal.h>
|
||||||
|
|
||||||
@@ -56,6 +57,7 @@ static void complete_deactivation(struct fp_img_dev *dev);
|
|||||||
#define FRAME_WIDTH 192
|
#define FRAME_WIDTH 192
|
||||||
#define FRAME_HEIGHT 8
|
#define FRAME_HEIGHT 8
|
||||||
#define FRAME_SIZE (FRAME_WIDTH * FRAME_HEIGHT)
|
#define FRAME_SIZE (FRAME_WIDTH * FRAME_HEIGHT)
|
||||||
|
#define IMAGE_WIDTH (FRAME_WIDTH + (FRAME_WIDTH / 2))
|
||||||
|
|
||||||
struct aes2550_dev {
|
struct aes2550_dev {
|
||||||
GSList *strips;
|
GSList *strips;
|
||||||
@@ -64,6 +66,13 @@ struct aes2550_dev {
|
|||||||
int heartbeat_cnt;
|
int heartbeat_cnt;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
static struct fpi_frame_asmbl_ctx assembling_ctx = {
|
||||||
|
.frame_width = FRAME_WIDTH,
|
||||||
|
.frame_height = FRAME_HEIGHT,
|
||||||
|
.image_width = IMAGE_WIDTH,
|
||||||
|
.get_pixel = aes_get_pixel,
|
||||||
|
};
|
||||||
|
|
||||||
/****** FINGER PRESENCE DETECTION ******/
|
/****** FINGER PRESENCE DETECTION ******/
|
||||||
|
|
||||||
static unsigned char finger_det_reqs[] = {
|
static unsigned char finger_det_reqs[] = {
|
||||||
@@ -204,7 +213,7 @@ static int process_strip_data(struct fpi_ssm *ssm, unsigned char *data)
|
|||||||
unsigned char *stripdata;
|
unsigned char *stripdata;
|
||||||
struct fp_img_dev *dev = ssm->priv;
|
struct fp_img_dev *dev = ssm->priv;
|
||||||
struct aes2550_dev *aesdev = dev->priv;
|
struct aes2550_dev *aesdev = dev->priv;
|
||||||
struct aes_stripe *stripe;
|
struct fpi_frame *stripe;
|
||||||
int len;
|
int len;
|
||||||
|
|
||||||
if (data[0] != AES2550_EDATA_MAGIC) {
|
if (data[0] != AES2550_EDATA_MAGIC) {
|
||||||
@@ -215,7 +224,7 @@ static int process_strip_data(struct fpi_ssm *ssm, unsigned char *data)
|
|||||||
if (len != (AES2550_STRIP_SIZE - 3)) {
|
if (len != (AES2550_STRIP_SIZE - 3)) {
|
||||||
fp_dbg("Bogus frame len: %.4x\n", len);
|
fp_dbg("Bogus frame len: %.4x\n", len);
|
||||||
}
|
}
|
||||||
stripe = g_malloc(FRAME_WIDTH * FRAME_HEIGHT / 2 + sizeof(struct aes_stripe)); /* 4 bits per pixel */
|
stripe = g_malloc(FRAME_WIDTH * FRAME_HEIGHT / 2 + sizeof(struct fpi_frame)); /* 4 bits per pixel */
|
||||||
stripe->delta_x = (int8_t)data[6];
|
stripe->delta_x = (int8_t)data[6];
|
||||||
stripe->delta_y = -(int8_t)data[7];
|
stripe->delta_y = -(int8_t)data[7];
|
||||||
stripdata = stripe->data;
|
stripdata = stripe->data;
|
||||||
@@ -253,8 +262,9 @@ static void capture_set_idle_reqs_cb(struct libusb_transfer *transfer)
|
|||||||
struct fp_img *img;
|
struct fp_img *img;
|
||||||
|
|
||||||
aesdev->strips = g_slist_reverse(aesdev->strips);
|
aesdev->strips = g_slist_reverse(aesdev->strips);
|
||||||
img = aes_assemble(aesdev->strips, aesdev->strips_len,
|
img = fpi_assemble_frames(&assembling_ctx,
|
||||||
FRAME_WIDTH, FRAME_HEIGHT, FRAME_WIDTH + FRAME_WIDTH / 2);
|
aesdev->strips, aesdev->strips_len);
|
||||||
|
img->flags |= FP_IMG_PARTIAL;
|
||||||
g_slist_free_full(aesdev->strips, g_free);
|
g_slist_free_full(aesdev->strips, g_free);
|
||||||
aesdev->strips = NULL;
|
aesdev->strips = NULL;
|
||||||
aesdev->strips_len = 0;
|
aesdev->strips_len = 0;
|
||||||
@@ -612,7 +622,7 @@ static int dev_init(struct fp_img_dev *dev, unsigned long driver_data)
|
|||||||
|
|
||||||
r = libusb_claim_interface(dev->udev, 0);
|
r = libusb_claim_interface(dev->udev, 0);
|
||||||
if (r < 0) {
|
if (r < 0) {
|
||||||
fp_err("could not claim interface 0");
|
fp_err("could not claim interface 0: %s", libusb_error_name(r));
|
||||||
return r;
|
return r;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -28,11 +28,22 @@
|
|||||||
|
|
||||||
#include <fp_internal.h>
|
#include <fp_internal.h>
|
||||||
|
|
||||||
|
#include <assembling.h>
|
||||||
|
#include <aeslib.h>
|
||||||
|
|
||||||
#include "aesx660.h"
|
#include "aesx660.h"
|
||||||
#include "aes2660.h"
|
#include "aes2660.h"
|
||||||
#include "driver_ids.h"
|
#include "driver_ids.h"
|
||||||
|
|
||||||
#define FRAME_WIDTH 192
|
#define FRAME_WIDTH 192
|
||||||
|
#define IMAGE_WIDTH (FRAME_WIDTH + (FRAME_WIDTH / 2))
|
||||||
|
|
||||||
|
static struct fpi_frame_asmbl_ctx assembling_ctx = {
|
||||||
|
.frame_width = FRAME_WIDTH,
|
||||||
|
.frame_height = AESX660_FRAME_HEIGHT,
|
||||||
|
.image_width = IMAGE_WIDTH,
|
||||||
|
.get_pixel = aes_get_pixel,
|
||||||
|
};
|
||||||
|
|
||||||
static int dev_init(struct fp_img_dev *dev, unsigned long driver_data)
|
static int dev_init(struct fp_img_dev *dev, unsigned long driver_data)
|
||||||
{
|
{
|
||||||
@@ -42,7 +53,7 @@ static int dev_init(struct fp_img_dev *dev, unsigned long driver_data)
|
|||||||
|
|
||||||
r = libusb_claim_interface(dev->udev, 0);
|
r = libusb_claim_interface(dev->udev, 0);
|
||||||
if (r < 0) {
|
if (r < 0) {
|
||||||
fp_err("could not claim interface 0");
|
fp_err("could not claim interface 0: %s", libusb_error_name(r));
|
||||||
return r;
|
return r;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -55,7 +66,8 @@ static int dev_init(struct fp_img_dev *dev, unsigned long driver_data)
|
|||||||
aesdev->init_seqs_len[1] = array_n_elements(aes2660_init_2);
|
aesdev->init_seqs_len[1] = array_n_elements(aes2660_init_2);
|
||||||
aesdev->start_imaging_cmd = (unsigned char *)aes2660_start_imaging_cmd;
|
aesdev->start_imaging_cmd = (unsigned char *)aes2660_start_imaging_cmd;
|
||||||
aesdev->start_imaging_cmd_len = sizeof(aes2660_start_imaging_cmd);
|
aesdev->start_imaging_cmd_len = sizeof(aes2660_start_imaging_cmd);
|
||||||
aesdev->frame_width = FRAME_WIDTH;
|
aesdev->assembling_ctx = &assembling_ctx;
|
||||||
|
aesdev->extra_img_flags = FP_IMG_PARTIAL;
|
||||||
|
|
||||||
fpi_imgdev_open_complete(dev, 0);
|
fpi_imgdev_open_complete(dev, 0);
|
||||||
return 0;
|
return 0;
|
||||||
|
|||||||
+12
-11
@@ -130,23 +130,24 @@ static int dev_init(struct fp_img_dev *dev, unsigned long driver_data)
|
|||||||
struct aes3k_dev *aesdev;
|
struct aes3k_dev *aesdev;
|
||||||
|
|
||||||
r = libusb_claim_interface(dev->udev, 0);
|
r = libusb_claim_interface(dev->udev, 0);
|
||||||
if (r < 0)
|
if (r < 0) {
|
||||||
fp_err("could not claim interface 0");
|
fp_err("could not claim interface 0: %s", libusb_error_name(r));
|
||||||
|
return r;
|
||||||
|
}
|
||||||
|
|
||||||
aesdev = dev->priv = g_malloc0(sizeof(struct aes3k_dev));
|
aesdev = dev->priv = g_malloc0(sizeof(struct aes3k_dev));
|
||||||
|
|
||||||
if (!aesdev)
|
if (!aesdev)
|
||||||
return -ENOMEM;
|
return -ENOMEM;
|
||||||
|
|
||||||
if (r == 0)
|
aesdev->data_buflen = DATA_BUFLEN;
|
||||||
aesdev->data_buflen = DATA_BUFLEN;
|
aesdev->frame_width = FRAME_WIDTH;
|
||||||
aesdev->frame_width = FRAME_WIDTH;
|
aesdev->frame_size = FRAME_SIZE;
|
||||||
aesdev->frame_size = FRAME_SIZE;
|
aesdev->frame_number = FRAME_NUMBER;
|
||||||
aesdev->frame_number = FRAME_NUMBER;
|
aesdev->enlarge_factor = ENLARGE_FACTOR;
|
||||||
aesdev->enlarge_factor = ENLARGE_FACTOR;
|
aesdev->init_reqs = init_reqs;
|
||||||
aesdev->init_reqs = init_reqs;
|
aesdev->init_reqs_len = G_N_ELEMENTS(init_reqs);
|
||||||
aesdev->init_reqs_len = G_N_ELEMENTS(init_reqs);
|
fpi_imgdev_open_complete(dev, 0);
|
||||||
fpi_imgdev_open_complete(dev, 0);
|
|
||||||
|
|
||||||
return r;
|
return r;
|
||||||
}
|
}
|
||||||
|
|||||||
+12
-11
@@ -127,23 +127,24 @@ static int dev_init(struct fp_img_dev *dev, unsigned long driver_data)
|
|||||||
struct aes3k_dev *aesdev;
|
struct aes3k_dev *aesdev;
|
||||||
|
|
||||||
r = libusb_claim_interface(dev->udev, 0);
|
r = libusb_claim_interface(dev->udev, 0);
|
||||||
if (r < 0)
|
if (r < 0) {
|
||||||
fp_err("could not claim interface 0");
|
fp_err("could not claim interface 0: %s", libusb_error_name(r));
|
||||||
|
return r;
|
||||||
|
}
|
||||||
|
|
||||||
aesdev = dev->priv = g_malloc0(sizeof(struct aes3k_dev));
|
aesdev = dev->priv = g_malloc0(sizeof(struct aes3k_dev));
|
||||||
|
|
||||||
if (!aesdev)
|
if (!aesdev)
|
||||||
return -ENOMEM;
|
return -ENOMEM;
|
||||||
|
|
||||||
if (r == 0)
|
aesdev->data_buflen = DATA_BUFLEN;
|
||||||
aesdev->data_buflen = DATA_BUFLEN;
|
aesdev->frame_width = FRAME_WIDTH;
|
||||||
aesdev->frame_width = FRAME_WIDTH;
|
aesdev->frame_size = FRAME_SIZE;
|
||||||
aesdev->frame_size = FRAME_SIZE;
|
aesdev->frame_number = FRAME_NUMBER;
|
||||||
aesdev->frame_number = FRAME_NUMBER;
|
aesdev->enlarge_factor = ENLARGE_FACTOR;
|
||||||
aesdev->enlarge_factor = ENLARGE_FACTOR;
|
aesdev->init_reqs = init_reqs;
|
||||||
aesdev->init_reqs = init_reqs;
|
aesdev->init_reqs_len = G_N_ELEMENTS(init_reqs);
|
||||||
aesdev->init_reqs_len = G_N_ELEMENTS(init_reqs);
|
fpi_imgdev_open_complete(dev, 0);
|
||||||
fpi_imgdev_open_complete(dev, 0);
|
|
||||||
|
|
||||||
return r;
|
return r;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -30,6 +30,7 @@
|
|||||||
|
|
||||||
#include <libusb.h>
|
#include <libusb.h>
|
||||||
|
|
||||||
|
#include <assembling.h>
|
||||||
#include <aeslib.h>
|
#include <aeslib.h>
|
||||||
#include <fp_internal.h>
|
#include <fp_internal.h>
|
||||||
|
|
||||||
@@ -41,7 +42,7 @@ static void complete_deactivation(struct fp_img_dev *dev);
|
|||||||
#define EP_IN (1 | LIBUSB_ENDPOINT_IN)
|
#define EP_IN (1 | LIBUSB_ENDPOINT_IN)
|
||||||
#define EP_OUT (2 | LIBUSB_ENDPOINT_OUT)
|
#define EP_OUT (2 | LIBUSB_ENDPOINT_OUT)
|
||||||
#define BULK_TIMEOUT 4000
|
#define BULK_TIMEOUT 4000
|
||||||
#define FRAME_HEIGHT 8
|
#define FRAME_HEIGHT AESX660_FRAME_HEIGHT
|
||||||
|
|
||||||
#define min(a, b) (((a) < (b)) ? (a) : (b))
|
#define min(a, b) (((a) < (b)) ? (a) : (b))
|
||||||
|
|
||||||
@@ -273,12 +274,12 @@ enum capture_states {
|
|||||||
/* Returns number of processed bytes */
|
/* Returns number of processed bytes */
|
||||||
static int process_stripe_data(struct fpi_ssm *ssm, unsigned char *data)
|
static int process_stripe_data(struct fpi_ssm *ssm, unsigned char *data)
|
||||||
{
|
{
|
||||||
struct aes_stripe *stripe;
|
struct fpi_frame *stripe;
|
||||||
unsigned char *stripdata;
|
unsigned char *stripdata;
|
||||||
struct fp_img_dev *dev = ssm->priv;
|
struct fp_img_dev *dev = ssm->priv;
|
||||||
struct aesX660_dev *aesdev = dev->priv;
|
struct aesX660_dev *aesdev = dev->priv;
|
||||||
|
|
||||||
stripe = g_malloc(aesdev->frame_width * FRAME_HEIGHT / 2 + sizeof(struct aes_stripe)); /* 4 bpp */
|
stripe = g_malloc(aesdev->assembling_ctx->frame_width * FRAME_HEIGHT / 2 + sizeof(struct fpi_frame)); /* 4 bpp */
|
||||||
stripdata = stripe->data;
|
stripdata = stripe->data;
|
||||||
|
|
||||||
fp_dbg("Processing frame %.2x %.2x", data[AESX660_IMAGE_OK_OFFSET],
|
fp_dbg("Processing frame %.2x %.2x", data[AESX660_IMAGE_OK_OFFSET],
|
||||||
@@ -289,7 +290,7 @@ static int process_stripe_data(struct fpi_ssm *ssm, unsigned char *data)
|
|||||||
fp_dbg("Offset to previous frame: %d %d", stripe->delta_x, stripe->delta_y);
|
fp_dbg("Offset to previous frame: %d %d", stripe->delta_x, stripe->delta_y);
|
||||||
|
|
||||||
if (data[AESX660_IMAGE_OK_OFFSET] == AESX660_IMAGE_OK) {
|
if (data[AESX660_IMAGE_OK_OFFSET] == AESX660_IMAGE_OK) {
|
||||||
memcpy(stripdata, data + AESX660_IMAGE_OFFSET, aesdev->frame_width * FRAME_HEIGHT / 2);
|
memcpy(stripdata, data + AESX660_IMAGE_OFFSET, aesdev->assembling_ctx->frame_width * FRAME_HEIGHT / 2);
|
||||||
|
|
||||||
aesdev->strips = g_slist_prepend(aesdev->strips, stripe);
|
aesdev->strips = g_slist_prepend(aesdev->strips, stripe);
|
||||||
aesdev->strips_len++;
|
aesdev->strips_len++;
|
||||||
@@ -311,8 +312,8 @@ static void capture_set_idle_cmd_cb(struct libusb_transfer *transfer)
|
|||||||
struct fp_img *img;
|
struct fp_img *img;
|
||||||
|
|
||||||
aesdev->strips = g_slist_reverse(aesdev->strips);
|
aesdev->strips = g_slist_reverse(aesdev->strips);
|
||||||
img = aes_assemble(aesdev->strips, aesdev->strips_len,
|
img = fpi_assemble_frames(aesdev->assembling_ctx, aesdev->strips, aesdev->strips_len);
|
||||||
aesdev->frame_width, FRAME_HEIGHT, aesdev->frame_width + aesdev->frame_width / 2);
|
img->flags |= aesdev->extra_img_flags;
|
||||||
g_slist_foreach(aesdev->strips, (GFunc) g_free, NULL);
|
g_slist_foreach(aesdev->strips, (GFunc) g_free, NULL);
|
||||||
g_slist_free(aesdev->strips);
|
g_slist_free(aesdev->strips);
|
||||||
aesdev->strips = NULL;
|
aesdev->strips = NULL;
|
||||||
|
|||||||
@@ -41,6 +41,8 @@
|
|||||||
#define AESX660_IMAGE_OFFSET 43
|
#define AESX660_IMAGE_OFFSET 43
|
||||||
#define AESX660_BULK_TRANSFER_SIZE 4096
|
#define AESX660_BULK_TRANSFER_SIZE 4096
|
||||||
|
|
||||||
|
#define AESX660_FRAME_HEIGHT 8
|
||||||
|
|
||||||
struct aesX660_dev {
|
struct aesX660_dev {
|
||||||
GSList *strips;
|
GSList *strips;
|
||||||
size_t strips_len;
|
size_t strips_len;
|
||||||
@@ -55,12 +57,12 @@ struct aesX660_dev {
|
|||||||
size_t buffer_max;
|
size_t buffer_max;
|
||||||
|
|
||||||
/* Device-specific stuff */
|
/* Device-specific stuff */
|
||||||
int h_scale_factor;
|
|
||||||
struct aesX660_cmd *init_seqs[2];
|
struct aesX660_cmd *init_seqs[2];
|
||||||
size_t init_seqs_len[2];
|
size_t init_seqs_len[2];
|
||||||
unsigned char *start_imaging_cmd;
|
unsigned char *start_imaging_cmd;
|
||||||
size_t start_imaging_cmd_len;
|
size_t start_imaging_cmd_len;
|
||||||
unsigned int frame_width;
|
struct fpi_frame_asmbl_ctx *assembling_ctx;
|
||||||
|
uint16_t extra_img_flags;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct aesX660_cmd {
|
struct aesX660_cmd {
|
||||||
|
|||||||
@@ -40,6 +40,7 @@ enum {
|
|||||||
UPEKTC_IMG_ID = 17,
|
UPEKTC_IMG_ID = 17,
|
||||||
ETES603_ID = 18,
|
ETES603_ID = 18,
|
||||||
VFS5011_ID = 19,
|
VFS5011_ID = 19,
|
||||||
|
VFS0050_ID = 20,
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@@ -1465,8 +1465,7 @@ static int dev_open(struct fp_img_dev *idev, unsigned long driver_data)
|
|||||||
|
|
||||||
ret = libusb_claim_interface(idev->udev, 0);
|
ret = libusb_claim_interface(idev->udev, 0);
|
||||||
if (ret != LIBUSB_SUCCESS) {
|
if (ret != LIBUSB_SUCCESS) {
|
||||||
fp_err("libusb_claim_interface failed on interface 0 "
|
fp_err("libusb_claim_interface failed on interface 0: %s", libusb_error_name(ret));
|
||||||
"(err=%d)", ret);
|
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -264,8 +264,10 @@ gint dev_init(struct fp_img_dev *dev, unsigned long driver_data)
|
|||||||
//if ( (r = usb_set_configuration(dev->udev, 1)) < 0 )
|
//if ( (r = usb_set_configuration(dev->udev, 1)) < 0 )
|
||||||
// goto out;
|
// goto out;
|
||||||
|
|
||||||
if ( (r = libusb_claim_interface(dev->udev, 0)) < 0 )
|
if ( (r = libusb_claim_interface(dev->udev, 0)) < 0 ) {
|
||||||
goto out;
|
fp_err("could not claim interface 0: %s", libusb_error_name(r));
|
||||||
|
return r;
|
||||||
|
}
|
||||||
|
|
||||||
//if ( (r = usb_set_altinterface(dev->udev, 1)) < 0 )
|
//if ( (r = usb_set_altinterface(dev->udev, 1)) < 0 )
|
||||||
// goto out;
|
// goto out;
|
||||||
|
|||||||
@@ -864,8 +864,10 @@ static int dev_init(struct fp_dev *dev, unsigned long driver_data)
|
|||||||
int r;
|
int r;
|
||||||
|
|
||||||
r = libusb_claim_interface(dev->udev, 0);
|
r = libusb_claim_interface(dev->udev, 0);
|
||||||
if (r < 0)
|
if (r < 0) {
|
||||||
|
fp_err("could not claim interface 0: %s", libusb_error_name(r));
|
||||||
return r;
|
return r;
|
||||||
|
}
|
||||||
|
|
||||||
upekdev = g_malloc(sizeof(*upekdev));
|
upekdev = g_malloc(sizeof(*upekdev));
|
||||||
upekdev->seq = 0xf0; /* incremented to 0x00 before first cmd */
|
upekdev->seq = 0xf0; /* incremented to 0x00 before first cmd */
|
||||||
|
|||||||
+313
-177
@@ -5,6 +5,9 @@
|
|||||||
* TCS4C (USB ID 147e:1000) support:
|
* TCS4C (USB ID 147e:1000) support:
|
||||||
* Copyright (C) 2010 Hugo Grostabussiat <dw23.devel@gmail.com>
|
* Copyright (C) 2010 Hugo Grostabussiat <dw23.devel@gmail.com>
|
||||||
*
|
*
|
||||||
|
* TCRD5B (USB ID 147e:1001) support:
|
||||||
|
* Copyright (C) 2014 Vasily Khoruzhick <anarsoul@gmail.com>
|
||||||
|
*
|
||||||
* This library is free software; you can redistribute it and/or
|
* This library is free software; you can redistribute it and/or
|
||||||
* modify it under the terms of the GNU Lesser General Public
|
* modify it under the terms of the GNU Lesser General Public
|
||||||
* License as published by the Free Software Foundation; either
|
* License as published by the Free Software Foundation; either
|
||||||
@@ -30,17 +33,25 @@
|
|||||||
|
|
||||||
#include <fp_internal.h>
|
#include <fp_internal.h>
|
||||||
|
|
||||||
|
#include <assembling.h>
|
||||||
|
|
||||||
|
#include "upeksonly.h"
|
||||||
#include "driver_ids.h"
|
#include "driver_ids.h"
|
||||||
|
|
||||||
#define CTRL_TIMEOUT 1000
|
#define CTRL_TIMEOUT 1000
|
||||||
#define IMG_WIDTH 288
|
|
||||||
#define NUM_BULK_TRANSFERS 24
|
#define NUM_BULK_TRANSFERS 24
|
||||||
#define MAX_ROWS 700
|
#define MAX_ROWS 2048
|
||||||
#define MIN_ROWS 64
|
#define MIN_ROWS 64
|
||||||
|
|
||||||
|
#define BLANK_THRESHOLD 250
|
||||||
|
#define FINGER_PRESENT_THRESHOLD 32
|
||||||
|
#define FINGER_REMOVED_THRESHOLD 100
|
||||||
|
#define DIFF_THRESHOLD 13
|
||||||
|
|
||||||
enum {
|
enum {
|
||||||
UPEKSONLY_2016,
|
UPEKSONLY_2016,
|
||||||
UPEKSONLY_1000,
|
UPEKSONLY_1000,
|
||||||
|
UPEKSONLY_1001,
|
||||||
};
|
};
|
||||||
|
|
||||||
struct img_transfer_data {
|
struct img_transfer_data {
|
||||||
@@ -66,12 +77,19 @@ enum sonly_kill_transfers_action {
|
|||||||
EXEC_CALLBACK,
|
EXEC_CALLBACK,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
enum sonly_fs {
|
||||||
|
AWAIT_FINGER,
|
||||||
|
FINGER_DETECTED,
|
||||||
|
FINGER_REMOVED,
|
||||||
|
};
|
||||||
|
|
||||||
struct sonly_dev {
|
struct sonly_dev {
|
||||||
gboolean capturing;
|
gboolean capturing;
|
||||||
gboolean deactivating;
|
gboolean deactivating;
|
||||||
uint8_t read_reg_result;
|
uint8_t read_reg_result;
|
||||||
|
|
||||||
int dev_model;
|
int dev_model;
|
||||||
|
int img_width;
|
||||||
|
|
||||||
struct fpi_ssm *loopsm;
|
struct fpi_ssm *loopsm;
|
||||||
struct libusb_transfer *img_transfer[NUM_BULK_TRANSFERS];
|
struct libusb_transfer *img_transfer[NUM_BULK_TRANSFERS];
|
||||||
@@ -85,7 +103,8 @@ struct sonly_dev {
|
|||||||
|
|
||||||
int wraparounds;
|
int wraparounds;
|
||||||
int num_blank;
|
int num_blank;
|
||||||
int finger_removed;
|
int num_nonblank;
|
||||||
|
enum sonly_fs finger_state;
|
||||||
int last_seqnum;
|
int last_seqnum;
|
||||||
|
|
||||||
enum sonly_kill_transfers_action killing_transfers;
|
enum sonly_kill_transfers_action killing_transfers;
|
||||||
@@ -96,9 +115,57 @@ struct sonly_dev {
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
struct sonly_regwrite {
|
|
||||||
uint8_t reg;
|
/* Calculade squared standand deviation of sum of two lines */
|
||||||
uint8_t value;
|
static int upeksonly_get_deviation2(struct fpi_line_asmbl_ctx *ctx,
|
||||||
|
GSList *line1, GSList *line2)
|
||||||
|
{
|
||||||
|
unsigned char *buf1 = line1->data, *buf2 = line2->data;
|
||||||
|
int res = 0, mean = 0, i;
|
||||||
|
for (i = 0; i < ctx->line_width; i+= 2)
|
||||||
|
mean += (int)buf1[i + 1] + (int)buf2[i];
|
||||||
|
|
||||||
|
mean /= (ctx->line_width / 2);
|
||||||
|
|
||||||
|
for (i = 0; i < ctx->line_width; i+= 2) {
|
||||||
|
int dev = (int)buf1[i + 1] + (int)buf2[i] - mean;
|
||||||
|
res += dev*dev;
|
||||||
|
}
|
||||||
|
|
||||||
|
return res / (ctx->line_width / 2);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
static unsigned char upeksonly_get_pixel(struct fpi_line_asmbl_ctx *ctx,
|
||||||
|
GSList *row,
|
||||||
|
unsigned x)
|
||||||
|
{
|
||||||
|
unsigned char *buf;
|
||||||
|
unsigned offset;
|
||||||
|
|
||||||
|
/* The scans from this device are rolled right by two colums */
|
||||||
|
if (x < ctx->line_width - 2)
|
||||||
|
offset = x + 2;
|
||||||
|
else if ((x > ctx->line_width - 2) && (x < ctx->line_width))
|
||||||
|
offset = x - (ctx->line_width - 2);
|
||||||
|
else
|
||||||
|
return 0;
|
||||||
|
/* Each 2nd pixel is shifted 2 pixels down */
|
||||||
|
if ((!(x & 1)) && g_slist_next(row) && g_slist_next(g_slist_next(row)))
|
||||||
|
buf = g_slist_next(g_slist_next(row))->data;
|
||||||
|
else
|
||||||
|
buf = row->data;
|
||||||
|
|
||||||
|
return buf[offset];
|
||||||
|
}
|
||||||
|
|
||||||
|
static struct fpi_line_asmbl_ctx assembling_ctx = {
|
||||||
|
.max_height = 1024,
|
||||||
|
.resolution = 8,
|
||||||
|
.median_filter_size = 25,
|
||||||
|
.max_search_offset = 30,
|
||||||
|
.get_deviation = upeksonly_get_deviation2,
|
||||||
|
.get_pixel = upeksonly_get_pixel,
|
||||||
};
|
};
|
||||||
|
|
||||||
/***** IMAGE PROCESSING *****/
|
/***** IMAGE PROCESSING *****/
|
||||||
@@ -162,36 +229,27 @@ static void cancel_img_transfers(struct fp_img_dev *dev)
|
|||||||
|
|
||||||
static gboolean is_capturing(struct sonly_dev *sdev)
|
static gboolean is_capturing(struct sonly_dev *sdev)
|
||||||
{
|
{
|
||||||
return sdev->num_rows < MAX_ROWS && !sdev->finger_removed;
|
return sdev->num_rows < MAX_ROWS && (sdev->finger_state != FINGER_REMOVED);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void handoff_img(struct fp_img_dev *dev)
|
static void handoff_img(struct fp_img_dev *dev)
|
||||||
{
|
{
|
||||||
struct sonly_dev *sdev = dev->priv;
|
struct sonly_dev *sdev = dev->priv;
|
||||||
size_t size = IMG_WIDTH * sdev->num_rows;
|
struct fp_img *img;
|
||||||
struct fp_img *img = fpi_img_new(size);
|
|
||||||
GSList *elem = sdev->rows;
|
GSList *elem = sdev->rows;
|
||||||
size_t offset = 0;
|
|
||||||
|
|
||||||
if (!elem) {
|
if (!elem) {
|
||||||
fp_err("no rows?");
|
fp_err("no rows?");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
sdev->rows = g_slist_reverse(sdev->rows);
|
||||||
|
|
||||||
fp_dbg("%d rows", sdev->num_rows);
|
fp_dbg("%d rows", sdev->num_rows);
|
||||||
img->height = sdev->num_rows;
|
img = fpi_assemble_lines(&assembling_ctx, sdev->rows, sdev->num_rows);
|
||||||
|
|
||||||
/* The scans from this device are rolled right by two colums
|
g_slist_free_full(sdev->rows, g_free);
|
||||||
* It feels a lot smarter to correct here than mess with it at
|
|
||||||
* read time*/
|
|
||||||
do {
|
|
||||||
memcpy(img->data + offset, elem->data + 2, IMG_WIDTH - 2);
|
|
||||||
memcpy(img->data + offset + IMG_WIDTH - 2, elem->data, 2);
|
|
||||||
g_free(elem->data);
|
|
||||||
offset += IMG_WIDTH;
|
|
||||||
} while ((elem = g_slist_next(elem)) != NULL);
|
|
||||||
|
|
||||||
g_slist_free(sdev->rows);
|
|
||||||
sdev->rows = NULL;
|
sdev->rows = NULL;
|
||||||
|
|
||||||
fpi_imgdev_image_captured(dev, img);
|
fpi_imgdev_image_captured(dev, img);
|
||||||
@@ -202,24 +260,6 @@ static void handoff_img(struct fp_img_dev *dev)
|
|||||||
cancel_img_transfers(dev);
|
cancel_img_transfers(dev);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void compute_rows(unsigned char *a, unsigned char *b, int *diff,
|
|
||||||
int *total)
|
|
||||||
{
|
|
||||||
int i;
|
|
||||||
int _total = 0;
|
|
||||||
int _diff = 0;
|
|
||||||
|
|
||||||
for (i = 0; i < IMG_WIDTH; i++) {
|
|
||||||
if (a[i] > b[i])
|
|
||||||
_diff += a[i] - b[i];
|
|
||||||
else
|
|
||||||
_diff += b[i] - a[i];
|
|
||||||
_total += b[i];
|
|
||||||
}
|
|
||||||
*diff = _diff;
|
|
||||||
*total = _total;
|
|
||||||
}
|
|
||||||
|
|
||||||
static void row_complete(struct fp_img_dev *dev)
|
static void row_complete(struct fp_img_dev *dev)
|
||||||
{
|
{
|
||||||
struct sonly_dev *sdev = dev->priv;
|
struct sonly_dev *sdev = dev->priv;
|
||||||
@@ -227,12 +267,39 @@ static void row_complete(struct fp_img_dev *dev)
|
|||||||
|
|
||||||
if (sdev->num_rows > 0) {
|
if (sdev->num_rows > 0) {
|
||||||
unsigned char *lastrow = sdev->rows->data;
|
unsigned char *lastrow = sdev->rows->data;
|
||||||
int diff;
|
int std_sq_dev, mean_sq_diff;
|
||||||
int total;
|
|
||||||
|
|
||||||
compute_rows(lastrow, sdev->rowbuf, &diff, &total);
|
std_sq_dev = fpi_std_sq_dev(sdev->rowbuf, sdev->img_width);
|
||||||
|
mean_sq_diff = fpi_mean_sq_diff_norm(lastrow, sdev->rowbuf, sdev->img_width);
|
||||||
|
|
||||||
if (total < 52000) {
|
switch (sdev->finger_state) {
|
||||||
|
case AWAIT_FINGER:
|
||||||
|
if (sdev->deactivating) {
|
||||||
|
sdev->killing_transfers = ITERATE_SSM;
|
||||||
|
sdev->kill_ssm = sdev->loopsm;
|
||||||
|
cancel_img_transfers(dev);
|
||||||
|
}
|
||||||
|
fp_dbg("std_sq_dev: %d", std_sq_dev);
|
||||||
|
if (std_sq_dev > BLANK_THRESHOLD) {
|
||||||
|
sdev->num_nonblank++;
|
||||||
|
} else {
|
||||||
|
sdev->num_nonblank = 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (sdev->num_nonblank > FINGER_PRESENT_THRESHOLD) {
|
||||||
|
sdev->finger_state = FINGER_DETECTED;
|
||||||
|
fpi_imgdev_report_finger_status(dev, TRUE);
|
||||||
|
} else {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case FINGER_DETECTED:
|
||||||
|
case FINGER_REMOVED:
|
||||||
|
default:
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (std_sq_dev > BLANK_THRESHOLD) {
|
||||||
sdev->num_blank = 0;
|
sdev->num_blank = 0;
|
||||||
} else {
|
} else {
|
||||||
sdev->num_blank++;
|
sdev->num_blank++;
|
||||||
@@ -243,20 +310,35 @@ static void row_complete(struct fp_img_dev *dev)
|
|||||||
* actual scan. Happens most commonly if scan is started
|
* actual scan. Happens most commonly if scan is started
|
||||||
* from before the first joint resulting in a gap after the inital touch.
|
* from before the first joint resulting in a gap after the inital touch.
|
||||||
*/
|
*/
|
||||||
if ((sdev->num_blank > 500)
|
if (sdev->num_blank > FINGER_REMOVED_THRESHOLD) {
|
||||||
&& ((sdev->num_rows > MIN_ROWS) || (sdev->num_blank > 5000))) {
|
sdev->finger_state = FINGER_REMOVED;
|
||||||
sdev->finger_removed = 1;
|
|
||||||
fp_dbg("detected finger removal. Blank rows: %d, Full rows: %d", sdev->num_blank, sdev->num_rows);
|
fp_dbg("detected finger removal. Blank rows: %d, Full rows: %d", sdev->num_blank, sdev->num_rows);
|
||||||
handoff_img(dev);
|
handoff_img(dev);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (diff < 3000)
|
fp_dbg("mean_sq_diff: %d, std_sq_dev: %d", mean_sq_diff, std_sq_dev);
|
||||||
|
fp_dbg("num_blank: %d", sdev->num_blank);
|
||||||
|
if (mean_sq_diff < DIFF_THRESHOLD) {
|
||||||
return;
|
return;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
sdev->rows = g_slist_prepend(sdev->rows, sdev->rowbuf);
|
switch (sdev->finger_state) {
|
||||||
sdev->num_rows++;
|
case AWAIT_FINGER:
|
||||||
|
if (!sdev->num_rows) {
|
||||||
|
sdev->rows = g_slist_prepend(sdev->rows, sdev->rowbuf);
|
||||||
|
sdev->num_rows++;
|
||||||
|
} else {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case FINGER_DETECTED:
|
||||||
|
case FINGER_REMOVED:
|
||||||
|
sdev->rows = g_slist_prepend(sdev->rows, sdev->rowbuf);
|
||||||
|
sdev->num_rows++;
|
||||||
|
break;
|
||||||
|
}
|
||||||
sdev->rowbuf = NULL;
|
sdev->rowbuf = NULL;
|
||||||
|
|
||||||
if (sdev->num_rows >= MAX_ROWS) {
|
if (sdev->num_rows >= MAX_ROWS) {
|
||||||
@@ -272,7 +354,7 @@ static void add_to_rowbuf(struct fp_img_dev *dev, unsigned char *data, int size)
|
|||||||
|
|
||||||
memcpy(sdev->rowbuf + sdev->rowbuf_offset, data, size);
|
memcpy(sdev->rowbuf + sdev->rowbuf_offset, data, size);
|
||||||
sdev->rowbuf_offset += size;
|
sdev->rowbuf_offset += size;
|
||||||
if (sdev->rowbuf_offset >= IMG_WIDTH)
|
if (sdev->rowbuf_offset >= sdev->img_width)
|
||||||
row_complete(dev);
|
row_complete(dev);
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -280,7 +362,7 @@ static void add_to_rowbuf(struct fp_img_dev *dev, unsigned char *data, int size)
|
|||||||
static void start_new_row(struct sonly_dev *sdev, unsigned char *data, int size)
|
static void start_new_row(struct sonly_dev *sdev, unsigned char *data, int size)
|
||||||
{
|
{
|
||||||
if (!sdev->rowbuf)
|
if (!sdev->rowbuf)
|
||||||
sdev->rowbuf = g_malloc(IMG_WIDTH);
|
sdev->rowbuf = g_malloc(sdev->img_width);
|
||||||
memcpy(sdev->rowbuf, data, size);
|
memcpy(sdev->rowbuf, data, size);
|
||||||
sdev->rowbuf_offset = size;
|
sdev->rowbuf_offset = size;
|
||||||
}
|
}
|
||||||
@@ -294,7 +376,7 @@ static int rowbuf_remaining(struct sonly_dev *sdev)
|
|||||||
if (sdev->rowbuf_offset == -1)
|
if (sdev->rowbuf_offset == -1)
|
||||||
return -1;
|
return -1;
|
||||||
|
|
||||||
r = IMG_WIDTH - sdev->rowbuf_offset;
|
r = sdev->img_width - sdev->rowbuf_offset;
|
||||||
if (r > 62)
|
if (r > 62)
|
||||||
r = 62;
|
r = 62;
|
||||||
return r;
|
return r;
|
||||||
@@ -326,7 +408,7 @@ static void handle_packet(struct fp_img_dev *dev, unsigned char *data)
|
|||||||
|
|
||||||
/* If possible take the replacement data from last row */
|
/* If possible take the replacement data from last row */
|
||||||
if (sdev->num_rows > 1) {
|
if (sdev->num_rows > 1) {
|
||||||
int row_left = IMG_WIDTH - sdev->rowbuf_offset;
|
int row_left = sdev->img_width - sdev->rowbuf_offset;
|
||||||
unsigned char *last_row = g_slist_nth_data (sdev->rows, 0);
|
unsigned char *last_row = g_slist_nth_data (sdev->rows, 0);
|
||||||
|
|
||||||
if (row_left >= 62) {
|
if (row_left >= 62) {
|
||||||
@@ -345,12 +427,12 @@ static void handle_packet(struct fp_img_dev *dev, unsigned char *data)
|
|||||||
if (for_rowbuf < 62) {
|
if (for_rowbuf < 62) {
|
||||||
start_new_row(sdev, dummy_data + for_rowbuf, 62 - for_rowbuf);
|
start_new_row(sdev, dummy_data + for_rowbuf, 62 - for_rowbuf);
|
||||||
}
|
}
|
||||||
} else if (abs_base_addr % IMG_WIDTH == 0) {
|
} else if (abs_base_addr % sdev->img_width == 0) {
|
||||||
start_new_row(sdev, dummy_data, 62);
|
start_new_row(sdev, dummy_data, 62);
|
||||||
} else {
|
} else {
|
||||||
/* does the data in the packet reside on a row boundary?
|
/* does the data in the packet reside on a row boundary?
|
||||||
* if so capture it */
|
* if so capture it */
|
||||||
next_row_addr = ((abs_base_addr / IMG_WIDTH) + 1) * IMG_WIDTH;
|
next_row_addr = ((abs_base_addr / sdev->img_width) + 1) * sdev->img_width;
|
||||||
diff = next_row_addr - abs_base_addr;
|
diff = next_row_addr - abs_base_addr;
|
||||||
if (diff < 62)
|
if (diff < 62)
|
||||||
start_new_row(sdev, dummy_data + diff, 62 - diff);
|
start_new_row(sdev, dummy_data + diff, 62 - diff);
|
||||||
@@ -381,14 +463,14 @@ static void handle_packet(struct fp_img_dev *dev, unsigned char *data)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* does the packet START on a boundary? if so we want it in full */
|
/* does the packet START on a boundary? if so we want it in full */
|
||||||
if (abs_base_addr % IMG_WIDTH == 0) {
|
if (abs_base_addr % sdev->img_width == 0) {
|
||||||
start_new_row(sdev, data, 62);
|
start_new_row(sdev, data, 62);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* does the data in the packet reside on a row boundary?
|
/* does the data in the packet reside on a row boundary?
|
||||||
* if so capture it */
|
* if so capture it */
|
||||||
next_row_addr = ((abs_base_addr / IMG_WIDTH) + 1) * IMG_WIDTH;
|
next_row_addr = ((abs_base_addr / sdev->img_width) + 1) * sdev->img_width;
|
||||||
diff = next_row_addr - abs_base_addr;
|
diff = next_row_addr - abs_base_addr;
|
||||||
if (diff < 62)
|
if (diff < 62)
|
||||||
start_new_row(sdev, data + diff, 62 - diff);
|
start_new_row(sdev, data + diff, 62 - diff);
|
||||||
@@ -618,6 +700,7 @@ static void sm_await_intr_cb(struct libusb_transfer *transfer)
|
|||||||
{
|
{
|
||||||
struct fpi_ssm *ssm = transfer->user_data;
|
struct fpi_ssm *ssm = transfer->user_data;
|
||||||
struct fp_img_dev *dev = ssm->priv;
|
struct fp_img_dev *dev = ssm->priv;
|
||||||
|
struct sonly_dev *sdev = dev->priv;
|
||||||
|
|
||||||
if (transfer->status != LIBUSB_TRANSFER_COMPLETED) {
|
if (transfer->status != LIBUSB_TRANSFER_COMPLETED) {
|
||||||
g_free(transfer->buffer);
|
g_free(transfer->buffer);
|
||||||
@@ -630,6 +713,7 @@ static void sm_await_intr_cb(struct libusb_transfer *transfer)
|
|||||||
transfer->buffer[2], transfer->buffer[3]);
|
transfer->buffer[2], transfer->buffer[3]);
|
||||||
g_free(transfer->buffer);
|
g_free(transfer->buffer);
|
||||||
|
|
||||||
|
sdev->finger_state = FINGER_DETECTED;
|
||||||
fpi_imgdev_report_finger_status(dev, TRUE);
|
fpi_imgdev_report_finger_status(dev, TRUE);
|
||||||
fpi_ssm_next_state(ssm);
|
fpi_ssm_next_state(ssm);
|
||||||
}
|
}
|
||||||
@@ -663,51 +747,6 @@ static void sm_await_intr(struct fpi_ssm *ssm)
|
|||||||
|
|
||||||
/***** AWAIT FINGER *****/
|
/***** AWAIT FINGER *****/
|
||||||
|
|
||||||
static const struct sonly_regwrite awfsm_2016_writev_1[] = {
|
|
||||||
{ 0x0a, 0x00 }, { 0x0a, 0x00 }, { 0x09, 0x20 }, { 0x03, 0x3b },
|
|
||||||
{ 0x00, 0x67 }, { 0x00, 0x67 },
|
|
||||||
};
|
|
||||||
|
|
||||||
static const struct sonly_regwrite awfsm_1000_writev_1[] = {
|
|
||||||
/* Initialize sensor settings */
|
|
||||||
{ 0x0a, 0x00 }, { 0x09, 0x20 }, { 0x03, 0x37 }, { 0x00, 0x5f },
|
|
||||||
{ 0x01, 0x6e }, { 0x01, 0xee }, { 0x0c, 0x13 }, { 0x0d, 0x0d },
|
|
||||||
{ 0x0e, 0x0e }, { 0x0f, 0x0d },
|
|
||||||
|
|
||||||
{ 0x13, 0x05 }, { 0x13, 0x45 },
|
|
||||||
|
|
||||||
/* Initialize finger detection registers (not enabling yet) */
|
|
||||||
{ 0x30, 0xe0 }, { 0x15, 0x26 },
|
|
||||||
|
|
||||||
{ 0x12, 0x01 }, { 0x20, 0x01 }, { 0x07, 0x10 },
|
|
||||||
{ 0x10, 0x00 }, { 0x11, 0xbf },
|
|
||||||
};
|
|
||||||
|
|
||||||
static const struct sonly_regwrite awfsm_2016_writev_2[] = {
|
|
||||||
{ 0x01, 0xc6 }, { 0x0c, 0x13 }, { 0x0d, 0x0d }, { 0x0e, 0x0e },
|
|
||||||
{ 0x0f, 0x0d }, { 0x0b, 0x00 },
|
|
||||||
};
|
|
||||||
|
|
||||||
static const struct sonly_regwrite awfsm_1000_writev_2[] = {
|
|
||||||
/* Enable finger detection */
|
|
||||||
{ 0x30, 0xe1 }, { 0x15, 0x06 }, { 0x15, 0x86 },
|
|
||||||
};
|
|
||||||
|
|
||||||
static const struct sonly_regwrite awfsm_2016_writev_3[] = {
|
|
||||||
{ 0x13, 0x45 }, { 0x30, 0xe0 }, { 0x12, 0x01 }, { 0x20, 0x01 },
|
|
||||||
{ 0x09, 0x20 }, { 0x0a, 0x00 }, { 0x30, 0xe0 }, { 0x20, 0x01 },
|
|
||||||
};
|
|
||||||
|
|
||||||
static const struct sonly_regwrite awfsm_2016_writev_4[] = {
|
|
||||||
{ 0x08, 0x00 }, { 0x10, 0x00 }, { 0x12, 0x01 }, { 0x11, 0xbf },
|
|
||||||
{ 0x12, 0x01 }, { 0x07, 0x10 }, { 0x07, 0x10 }, { 0x04, 0x00 },\
|
|
||||||
{ 0x05, 0x00 }, { 0x0b, 0x00 },
|
|
||||||
|
|
||||||
/* enter finger detection mode */
|
|
||||||
{ 0x15, 0x20 }, { 0x30, 0xe1 }, { 0x15, 0x24 }, { 0x15, 0x04 },
|
|
||||||
{ 0x15, 0x84 },
|
|
||||||
};
|
|
||||||
|
|
||||||
enum awfsm_2016_states {
|
enum awfsm_2016_states {
|
||||||
AWFSM_2016_WRITEV_1,
|
AWFSM_2016_WRITEV_1,
|
||||||
AWFSM_2016_READ_01,
|
AWFSM_2016_READ_01,
|
||||||
@@ -789,16 +828,6 @@ static void awfsm_1000_run_state(struct fpi_ssm *ssm)
|
|||||||
|
|
||||||
/***** CAPTURE MODE *****/
|
/***** CAPTURE MODE *****/
|
||||||
|
|
||||||
static const struct sonly_regwrite capsm_2016_writev[] = {
|
|
||||||
/* enter capture mode */
|
|
||||||
{ 0x09, 0x28 }, { 0x13, 0x55 }, { 0x0b, 0x80 }, { 0x04, 0x00 },
|
|
||||||
{ 0x05, 0x00 },
|
|
||||||
};
|
|
||||||
|
|
||||||
static const struct sonly_regwrite capsm_1000_writev[] = {
|
|
||||||
{ 0x08, 0x80 }, { 0x13, 0x55 }, { 0x0b, 0x80 }, /* Enter capture mode */
|
|
||||||
};
|
|
||||||
|
|
||||||
enum capsm_2016_states {
|
enum capsm_2016_states {
|
||||||
CAPSM_2016_INIT,
|
CAPSM_2016_INIT,
|
||||||
CAPSM_2016_WRITE_15,
|
CAPSM_2016_WRITE_15,
|
||||||
@@ -815,6 +844,17 @@ enum capsm_1000_states {
|
|||||||
CAPSM_1000_NUM_STATES,
|
CAPSM_1000_NUM_STATES,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
enum capsm_1001_states {
|
||||||
|
CAPSM_1001_INIT,
|
||||||
|
CAPSM_1001_FIRE_BULK,
|
||||||
|
CAPSM_1001_WRITEV_1,
|
||||||
|
CAPSM_1001_WRITEV_2,
|
||||||
|
CAPSM_1001_WRITEV_3,
|
||||||
|
CAPSM_1001_WRITEV_4,
|
||||||
|
CAPSM_1001_WRITEV_5,
|
||||||
|
CAPSM_1001_NUM_STATES,
|
||||||
|
};
|
||||||
|
|
||||||
static void capsm_fire_bulk(struct fpi_ssm *ssm)
|
static void capsm_fire_bulk(struct fpi_ssm *ssm)
|
||||||
{
|
{
|
||||||
struct fp_img_dev *dev = ssm->priv;
|
struct fp_img_dev *dev = ssm->priv;
|
||||||
@@ -856,7 +896,8 @@ static void capsm_2016_run_state(struct fpi_ssm *ssm)
|
|||||||
sdev->num_rows = 0;
|
sdev->num_rows = 0;
|
||||||
sdev->wraparounds = -1;
|
sdev->wraparounds = -1;
|
||||||
sdev->num_blank = 0;
|
sdev->num_blank = 0;
|
||||||
sdev->finger_removed = 0;
|
sdev->num_nonblank = 0;
|
||||||
|
sdev->finger_state = FINGER_DETECTED;
|
||||||
sdev->last_seqnum = 16383;
|
sdev->last_seqnum = 16383;
|
||||||
sdev->killing_transfers = 0;
|
sdev->killing_transfers = 0;
|
||||||
fpi_ssm_next_state(ssm);
|
fpi_ssm_next_state(ssm);
|
||||||
@@ -887,7 +928,8 @@ static void capsm_1000_run_state(struct fpi_ssm *ssm)
|
|||||||
sdev->num_rows = 0;
|
sdev->num_rows = 0;
|
||||||
sdev->wraparounds = -1;
|
sdev->wraparounds = -1;
|
||||||
sdev->num_blank = 0;
|
sdev->num_blank = 0;
|
||||||
sdev->finger_removed = 0;
|
sdev->num_nonblank = 0;
|
||||||
|
sdev->finger_state = FINGER_DETECTED;
|
||||||
sdev->last_seqnum = 16383;
|
sdev->last_seqnum = 16383;
|
||||||
sdev->killing_transfers = 0;
|
sdev->killing_transfers = 0;
|
||||||
fpi_ssm_next_state(ssm);
|
fpi_ssm_next_state(ssm);
|
||||||
@@ -901,20 +943,46 @@ static void capsm_1000_run_state(struct fpi_ssm *ssm)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void capsm_1001_run_state(struct fpi_ssm *ssm)
|
||||||
|
{
|
||||||
|
struct fp_img_dev *dev = ssm->priv;
|
||||||
|
struct sonly_dev *sdev = dev->priv;
|
||||||
|
|
||||||
|
switch (ssm->cur_state) {
|
||||||
|
case CAPSM_1001_INIT:
|
||||||
|
sdev->rowbuf_offset = -1;
|
||||||
|
sdev->num_rows = 0;
|
||||||
|
sdev->wraparounds = -1;
|
||||||
|
sdev->num_blank = 0;
|
||||||
|
sdev->num_nonblank = 0;
|
||||||
|
sdev->finger_state = AWAIT_FINGER;
|
||||||
|
sdev->last_seqnum = 16383;
|
||||||
|
sdev->killing_transfers = 0;
|
||||||
|
fpi_ssm_next_state(ssm);
|
||||||
|
break;
|
||||||
|
case CAPSM_1001_FIRE_BULK: ;
|
||||||
|
capsm_fire_bulk (ssm);
|
||||||
|
break;
|
||||||
|
case CAPSM_1001_WRITEV_1:
|
||||||
|
sm_write_regs(ssm, capsm_1001_writev_1, G_N_ELEMENTS(capsm_1001_writev_1));
|
||||||
|
break;
|
||||||
|
case CAPSM_1001_WRITEV_2:
|
||||||
|
sm_write_regs(ssm, capsm_1001_writev_2, G_N_ELEMENTS(capsm_1001_writev_2));
|
||||||
|
break;
|
||||||
|
case CAPSM_1001_WRITEV_3:
|
||||||
|
sm_write_regs(ssm, capsm_1001_writev_3, G_N_ELEMENTS(capsm_1001_writev_3));
|
||||||
|
break;
|
||||||
|
case CAPSM_1001_WRITEV_4:
|
||||||
|
sm_write_regs(ssm, capsm_1001_writev_4, G_N_ELEMENTS(capsm_1001_writev_4));
|
||||||
|
break;
|
||||||
|
case CAPSM_1001_WRITEV_5:
|
||||||
|
sm_write_regs(ssm, capsm_1001_writev_5, G_N_ELEMENTS(capsm_1001_writev_5));
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/***** DEINITIALIZATION *****/
|
/***** DEINITIALIZATION *****/
|
||||||
|
|
||||||
static const struct sonly_regwrite deinitsm_2016_writev[] = {
|
|
||||||
/* reset + enter low power mode */
|
|
||||||
{ 0x0b, 0x00 }, { 0x09, 0x20 }, { 0x13, 0x45 }, { 0x13, 0x45 },
|
|
||||||
};
|
|
||||||
|
|
||||||
static const struct sonly_regwrite deinitsm_1000_writev[] = {
|
|
||||||
{ 0x15, 0x26 }, { 0x30, 0xe0 }, /* Disable finger detection */
|
|
||||||
|
|
||||||
{ 0x0b, 0x00 }, { 0x13, 0x45 }, { 0x08, 0x00 }, /* Disable capture mode */
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
enum deinitsm_2016_states {
|
enum deinitsm_2016_states {
|
||||||
DEINITSM_2016_WRITEV,
|
DEINITSM_2016_WRITEV,
|
||||||
DEINITSM_2016_NUM_STATES,
|
DEINITSM_2016_NUM_STATES,
|
||||||
@@ -925,6 +993,11 @@ enum deinitsm_1000_states {
|
|||||||
DEINITSM_1000_NUM_STATES,
|
DEINITSM_1000_NUM_STATES,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
enum deinitsm_1001_states {
|
||||||
|
DEINITSM_1001_WRITEV,
|
||||||
|
DEINITSM_1001_NUM_STATES,
|
||||||
|
};
|
||||||
|
|
||||||
static void deinitsm_2016_run_state(struct fpi_ssm *ssm)
|
static void deinitsm_2016_run_state(struct fpi_ssm *ssm)
|
||||||
{
|
{
|
||||||
switch (ssm->cur_state) {
|
switch (ssm->cur_state) {
|
||||||
@@ -943,34 +1016,17 @@ static void deinitsm_1000_run_state(struct fpi_ssm *ssm)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void deinitsm_1001_run_state(struct fpi_ssm *ssm)
|
||||||
|
{
|
||||||
|
switch (ssm->cur_state) {
|
||||||
|
case DEINITSM_1001_WRITEV:
|
||||||
|
sm_write_regs(ssm, deinitsm_1001_writev, G_N_ELEMENTS(deinitsm_1001_writev));
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/***** INITIALIZATION *****/
|
/***** INITIALIZATION *****/
|
||||||
|
|
||||||
static const struct sonly_regwrite initsm_2016_writev_1[] = {
|
|
||||||
{ 0x49, 0x00 },
|
|
||||||
|
|
||||||
/* BSAPI writes different values to register 0x3e each time. I initially
|
|
||||||
* thought this was some kind of clever authentication, but just blasting
|
|
||||||
* these sniffed values each time seems to work. */
|
|
||||||
{ 0x3e, 0x83 }, { 0x3e, 0x4f }, { 0x3e, 0x0f }, { 0x3e, 0xbf },
|
|
||||||
{ 0x3e, 0x45 }, { 0x3e, 0x35 }, { 0x3e, 0x1c }, { 0x3e, 0xae },
|
|
||||||
|
|
||||||
{ 0x44, 0x01 }, { 0x43, 0x06 }, { 0x43, 0x05 }, { 0x43, 0x04 },
|
|
||||||
{ 0x44, 0x00 }, { 0x0b, 0x00 },
|
|
||||||
};
|
|
||||||
|
|
||||||
static const struct sonly_regwrite initsm_1000_writev_1[] = {
|
|
||||||
{ 0x49, 0x00 }, /* Encryption disabled */
|
|
||||||
|
|
||||||
/* Setting encryption key. Doesn't need to be random since we don't use any
|
|
||||||
* encryption. */
|
|
||||||
{ 0x3e, 0x7f }, { 0x3e, 0x7f }, { 0x3e, 0x7f }, { 0x3e, 0x7f },
|
|
||||||
{ 0x3e, 0x7f }, { 0x3e, 0x7f }, { 0x3e, 0x7f }, { 0x3e, 0x7f },
|
|
||||||
|
|
||||||
{ 0x04, 0x00 }, { 0x05, 0x00 },
|
|
||||||
|
|
||||||
{ 0x0b, 0x00 }, { 0x08, 0x00 }, /* Initialize capture control registers */
|
|
||||||
};
|
|
||||||
|
|
||||||
enum initsm_2016_states {
|
enum initsm_2016_states {
|
||||||
INITSM_2016_WRITEV_1,
|
INITSM_2016_WRITEV_1,
|
||||||
INITSM_2016_READ_09,
|
INITSM_2016_READ_09,
|
||||||
@@ -987,6 +1043,15 @@ enum initsm_1000_states {
|
|||||||
INITSM_1000_NUM_STATES,
|
INITSM_1000_NUM_STATES,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
enum initsm_1001_states {
|
||||||
|
INITSM_1001_WRITEV_1,
|
||||||
|
INITSM_1001_WRITEV_2,
|
||||||
|
INITSM_1001_WRITEV_3,
|
||||||
|
INITSM_1001_WRITEV_4,
|
||||||
|
INITSM_1001_WRITEV_5,
|
||||||
|
INITSM_1001_NUM_STATES,
|
||||||
|
};
|
||||||
|
|
||||||
static void initsm_2016_run_state(struct fpi_ssm *ssm)
|
static void initsm_2016_run_state(struct fpi_ssm *ssm)
|
||||||
{
|
{
|
||||||
struct fp_img_dev *dev = ssm->priv;
|
struct fp_img_dev *dev = ssm->priv;
|
||||||
@@ -1026,6 +1091,27 @@ static void initsm_1000_run_state(struct fpi_ssm *ssm)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void initsm_1001_run_state(struct fpi_ssm *ssm)
|
||||||
|
{
|
||||||
|
switch (ssm->cur_state) {
|
||||||
|
case INITSM_1001_WRITEV_1:
|
||||||
|
sm_write_regs(ssm, initsm_1001_writev_1, G_N_ELEMENTS(initsm_1001_writev_1));
|
||||||
|
break;
|
||||||
|
case INITSM_1001_WRITEV_2:
|
||||||
|
sm_write_regs(ssm, initsm_1001_writev_2, G_N_ELEMENTS(initsm_1001_writev_2));
|
||||||
|
break;
|
||||||
|
case INITSM_1001_WRITEV_3:
|
||||||
|
sm_write_regs(ssm, initsm_1001_writev_3, G_N_ELEMENTS(initsm_1001_writev_3));
|
||||||
|
break;
|
||||||
|
case INITSM_1001_WRITEV_4:
|
||||||
|
sm_write_regs(ssm, initsm_1001_writev_4, G_N_ELEMENTS(initsm_1001_writev_4));
|
||||||
|
break;
|
||||||
|
case INITSM_1001_WRITEV_5:
|
||||||
|
sm_write_regs(ssm, initsm_1001_writev_5, G_N_ELEMENTS(initsm_1001_writev_5));
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/***** CAPTURE LOOP *****/
|
/***** CAPTURE LOOP *****/
|
||||||
|
|
||||||
enum loopsm_states {
|
enum loopsm_states {
|
||||||
@@ -1045,26 +1131,44 @@ static void loopsm_run_state(struct fpi_ssm *ssm)
|
|||||||
|
|
||||||
switch (ssm->cur_state) {
|
switch (ssm->cur_state) {
|
||||||
case LOOPSM_RUN_AWFSM: ;
|
case LOOPSM_RUN_AWFSM: ;
|
||||||
if (sdev->deactivating) {
|
switch (sdev->dev_model) {
|
||||||
fpi_ssm_mark_completed(ssm);
|
case UPEKSONLY_1001:
|
||||||
} else {
|
if (sdev->deactivating) {
|
||||||
struct fpi_ssm *awfsm = NULL;
|
fpi_ssm_mark_completed(ssm);
|
||||||
switch (sdev->dev_model) {
|
} else {
|
||||||
case UPEKSONLY_2016:
|
fpi_ssm_next_state(ssm);
|
||||||
awfsm = fpi_ssm_new(dev->dev, awfsm_2016_run_state,
|
|
||||||
AWFSM_2016_NUM_STATES);
|
|
||||||
break;
|
|
||||||
case UPEKSONLY_1000:
|
|
||||||
awfsm = fpi_ssm_new(dev->dev, awfsm_1000_run_state,
|
|
||||||
AWFSM_1000_NUM_STATES);
|
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
awfsm->priv = dev;
|
break;
|
||||||
fpi_ssm_start_subsm(ssm, awfsm);
|
default:
|
||||||
|
if (sdev->deactivating) {
|
||||||
|
fpi_ssm_mark_completed(ssm);
|
||||||
|
} else {
|
||||||
|
struct fpi_ssm *awfsm = NULL;
|
||||||
|
switch (sdev->dev_model) {
|
||||||
|
case UPEKSONLY_2016:
|
||||||
|
awfsm = fpi_ssm_new(dev->dev, awfsm_2016_run_state,
|
||||||
|
AWFSM_2016_NUM_STATES);
|
||||||
|
break;
|
||||||
|
case UPEKSONLY_1000:
|
||||||
|
awfsm = fpi_ssm_new(dev->dev, awfsm_1000_run_state,
|
||||||
|
AWFSM_1000_NUM_STATES);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
awfsm->priv = dev;
|
||||||
|
fpi_ssm_start_subsm(ssm, awfsm);
|
||||||
|
}
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case LOOPSM_AWAIT_FINGER:
|
case LOOPSM_AWAIT_FINGER:
|
||||||
sm_await_intr(ssm);
|
switch (sdev->dev_model) {
|
||||||
|
case UPEKSONLY_1001:
|
||||||
|
fpi_ssm_next_state(ssm);
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
sm_await_intr(ssm);
|
||||||
|
break;
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
case LOOPSM_RUN_CAPSM: ;
|
case LOOPSM_RUN_CAPSM: ;
|
||||||
struct fpi_ssm *capsm = NULL;
|
struct fpi_ssm *capsm = NULL;
|
||||||
@@ -1077,13 +1181,15 @@ static void loopsm_run_state(struct fpi_ssm *ssm)
|
|||||||
capsm = fpi_ssm_new(dev->dev, capsm_1000_run_state,
|
capsm = fpi_ssm_new(dev->dev, capsm_1000_run_state,
|
||||||
CAPSM_1000_NUM_STATES);
|
CAPSM_1000_NUM_STATES);
|
||||||
break;
|
break;
|
||||||
|
case UPEKSONLY_1001:
|
||||||
|
capsm = fpi_ssm_new(dev->dev, capsm_1001_run_state,
|
||||||
|
CAPSM_1001_NUM_STATES);
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
capsm->priv = dev;
|
capsm->priv = dev;
|
||||||
fpi_ssm_start_subsm(ssm, capsm);
|
fpi_ssm_start_subsm(ssm, capsm);
|
||||||
break;
|
break;
|
||||||
case LOOPSM_CAPTURE:
|
case LOOPSM_CAPTURE:
|
||||||
/* bulk URBs already flying, so just wait for image completion
|
|
||||||
* to push us into next state */
|
|
||||||
break;
|
break;
|
||||||
case LOOPSM_RUN_DEINITSM: ;
|
case LOOPSM_RUN_DEINITSM: ;
|
||||||
struct fpi_ssm *deinitsm = NULL;
|
struct fpi_ssm *deinitsm = NULL;
|
||||||
@@ -1096,6 +1202,10 @@ static void loopsm_run_state(struct fpi_ssm *ssm)
|
|||||||
deinitsm = fpi_ssm_new(dev->dev, deinitsm_1000_run_state,
|
deinitsm = fpi_ssm_new(dev->dev, deinitsm_1000_run_state,
|
||||||
DEINITSM_1000_NUM_STATES);
|
DEINITSM_1000_NUM_STATES);
|
||||||
break;
|
break;
|
||||||
|
case UPEKSONLY_1001:
|
||||||
|
deinitsm = fpi_ssm_new(dev->dev, deinitsm_1001_run_state,
|
||||||
|
DEINITSM_1001_NUM_STATES);
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
sdev->capturing = FALSE;
|
sdev->capturing = FALSE;
|
||||||
deinitsm->priv = dev;
|
deinitsm->priv = dev;
|
||||||
@@ -1212,6 +1322,9 @@ static int dev_activate(struct fp_img_dev *dev, enum fp_imgdev_state state)
|
|||||||
case UPEKSONLY_1000:
|
case UPEKSONLY_1000:
|
||||||
ssm = fpi_ssm_new(dev->dev, initsm_1000_run_state, INITSM_1000_NUM_STATES);
|
ssm = fpi_ssm_new(dev->dev, initsm_1000_run_state, INITSM_1000_NUM_STATES);
|
||||||
break;
|
break;
|
||||||
|
case UPEKSONLY_1001:
|
||||||
|
ssm = fpi_ssm_new(dev->dev, initsm_1001_run_state, INITSM_1001_NUM_STATES);
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
ssm->priv = dev;
|
ssm->priv = dev;
|
||||||
fpi_ssm_start(ssm, initsm_complete);
|
fpi_ssm_start(ssm, initsm_complete);
|
||||||
@@ -1221,6 +1334,7 @@ static int dev_activate(struct fp_img_dev *dev, enum fp_imgdev_state state)
|
|||||||
static int dev_init(struct fp_img_dev *dev, unsigned long driver_data)
|
static int dev_init(struct fp_img_dev *dev, unsigned long driver_data)
|
||||||
{
|
{
|
||||||
int r;
|
int r;
|
||||||
|
struct sonly_dev *sdev;
|
||||||
|
|
||||||
r = libusb_set_configuration(dev->udev, 1);
|
r = libusb_set_configuration(dev->udev, 1);
|
||||||
if (r < 0) {
|
if (r < 0) {
|
||||||
@@ -1230,12 +1344,30 @@ static int dev_init(struct fp_img_dev *dev, unsigned long driver_data)
|
|||||||
|
|
||||||
r = libusb_claim_interface(dev->udev, 0);
|
r = libusb_claim_interface(dev->udev, 0);
|
||||||
if (r < 0) {
|
if (r < 0) {
|
||||||
fp_err("could not claim interface 0");
|
fp_err("could not claim interface 0: %s", libusb_error_name(r));
|
||||||
return r;
|
return r;
|
||||||
}
|
}
|
||||||
|
|
||||||
dev->priv = g_malloc0(sizeof(struct sonly_dev));
|
sdev = dev->priv = g_malloc0(sizeof(struct sonly_dev));
|
||||||
((struct sonly_dev*)dev->priv)->dev_model = (int)driver_data;
|
sdev->dev_model = (int)driver_data;
|
||||||
|
switch (driver_data) {
|
||||||
|
case UPEKSONLY_1000:
|
||||||
|
sdev->img_width = IMG_WIDTH_1000;
|
||||||
|
upeksonly_driver.img_width = IMG_WIDTH_1000;
|
||||||
|
assembling_ctx.line_width = IMG_WIDTH_1000;
|
||||||
|
break;
|
||||||
|
case UPEKSONLY_1001:
|
||||||
|
sdev->img_width = IMG_WIDTH_1001;
|
||||||
|
upeksonly_driver.img_width = IMG_WIDTH_1001;
|
||||||
|
upeksonly_driver.bz3_threshold = 25;
|
||||||
|
assembling_ctx.line_width = IMG_WIDTH_1001;
|
||||||
|
break;
|
||||||
|
case UPEKSONLY_2016:
|
||||||
|
sdev->img_width = IMG_WIDTH_2016;
|
||||||
|
upeksonly_driver.img_width = IMG_WIDTH_2016;
|
||||||
|
assembling_ctx.line_width = IMG_WIDTH_2016;
|
||||||
|
break;
|
||||||
|
}
|
||||||
fpi_imgdev_open_complete(dev, 0);
|
fpi_imgdev_open_complete(dev, 0);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
@@ -1258,12 +1390,16 @@ static int dev_discover(struct libusb_device_descriptor *dsc, uint32_t *devtype)
|
|||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (dsc->idProduct == 0x1001)
|
||||||
|
return 1;
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
static const struct usb_id id_table[] = {
|
static const struct usb_id id_table[] = {
|
||||||
{ .vendor = 0x147e, .product = 0x2016, .driver_data = UPEKSONLY_2016 },
|
{ .vendor = 0x147e, .product = 0x2016, .driver_data = UPEKSONLY_2016 },
|
||||||
{ .vendor = 0x147e, .product = 0x1000, .driver_data = UPEKSONLY_1000 },
|
{ .vendor = 0x147e, .product = 0x1000, .driver_data = UPEKSONLY_1000 },
|
||||||
|
{ .vendor = 0x147e, .product = 0x1001, .driver_data = UPEKSONLY_1001 },
|
||||||
{ 0, 0, 0, },
|
{ 0, 0, 0, },
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -1277,7 +1413,7 @@ struct fp_img_driver upeksonly_driver = {
|
|||||||
.discover = dev_discover,
|
.discover = dev_discover,
|
||||||
},
|
},
|
||||||
.flags = 0,
|
.flags = 0,
|
||||||
.img_width = IMG_WIDTH,
|
.img_width = -1,
|
||||||
.img_height = -1,
|
.img_height = -1,
|
||||||
|
|
||||||
.open = dev_init,
|
.open = dev_init,
|
||||||
|
|||||||
@@ -0,0 +1,319 @@
|
|||||||
|
/*
|
||||||
|
* UPEK TouchStrip Sensor-Only driver for libfprint
|
||||||
|
* Copyright (C) 2008 Daniel Drake <dsd@gentoo.org>
|
||||||
|
*
|
||||||
|
* TCS4C (USB ID 147e:1000) support:
|
||||||
|
* Copyright (C) 2010 Hugo Grostabussiat <dw23.devel@gmail.com>
|
||||||
|
*
|
||||||
|
* TCRD5B (USB ID 147e:1001) support:
|
||||||
|
* Copyright (C) 2014 Vasily Khoruzhick <anarsoul@gmail.com>
|
||||||
|
*
|
||||||
|
* This library is free software; you can redistribute it and/or
|
||||||
|
* modify it under the terms of the GNU Lesser General Public
|
||||||
|
* License as published by the Free Software Foundation; either
|
||||||
|
* version 2.1 of the License, or (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This library is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
|
* Lesser General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU Lesser General Public
|
||||||
|
* License along with this library; if not, write to the Free Software
|
||||||
|
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||||
|
*/
|
||||||
|
|
||||||
|
#define IMG_WIDTH_2016 288
|
||||||
|
#define IMG_WIDTH_1000 288
|
||||||
|
#define IMG_WIDTH_1001 216
|
||||||
|
|
||||||
|
struct sonly_regwrite {
|
||||||
|
uint8_t reg;
|
||||||
|
uint8_t value;
|
||||||
|
};
|
||||||
|
|
||||||
|
/***** AWAIT FINGER *****/
|
||||||
|
|
||||||
|
static const struct sonly_regwrite awfsm_2016_writev_1[] = {
|
||||||
|
{ 0x0a, 0x00 }, { 0x0a, 0x00 }, { 0x09, 0x20 }, { 0x03, 0x3b },
|
||||||
|
{ 0x00, 0x67 }, { 0x00, 0x67 },
|
||||||
|
};
|
||||||
|
|
||||||
|
static const struct sonly_regwrite awfsm_1000_writev_1[] = {
|
||||||
|
/* Initialize sensor settings */
|
||||||
|
{ 0x0a, 0x00 }, { 0x09, 0x20 }, { 0x03, 0x37 }, { 0x00, 0x5f },
|
||||||
|
{ 0x01, 0x6e }, { 0x01, 0xee }, { 0x0c, 0x13 }, { 0x0d, 0x0d },
|
||||||
|
{ 0x0e, 0x0e }, { 0x0f, 0x0d },
|
||||||
|
|
||||||
|
{ 0x13, 0x05 }, { 0x13, 0x45 },
|
||||||
|
|
||||||
|
/* Initialize finger detection registers (not enabling yet) */
|
||||||
|
{ 0x30, 0xe0 }, { 0x15, 0x26 },
|
||||||
|
|
||||||
|
{ 0x12, 0x01 }, { 0x20, 0x01 }, { 0x07, 0x10 },
|
||||||
|
{ 0x10, 0x00 }, { 0x11, 0xbf },
|
||||||
|
};
|
||||||
|
|
||||||
|
static const struct sonly_regwrite awfsm_2016_writev_2[] = {
|
||||||
|
{ 0x01, 0xc6 }, { 0x0c, 0x13 }, { 0x0d, 0x0d }, { 0x0e, 0x0e },
|
||||||
|
{ 0x0f, 0x0d }, { 0x0b, 0x00 },
|
||||||
|
};
|
||||||
|
|
||||||
|
static const struct sonly_regwrite awfsm_1000_writev_2[] = {
|
||||||
|
/* Enable finger detection */
|
||||||
|
{ 0x30, 0xe1 }, { 0x15, 0x06 }, { 0x15, 0x86 },
|
||||||
|
};
|
||||||
|
|
||||||
|
static const struct sonly_regwrite awfsm_2016_writev_3[] = {
|
||||||
|
{ 0x13, 0x45 }, { 0x30, 0xe0 }, { 0x12, 0x01 }, { 0x20, 0x01 },
|
||||||
|
{ 0x09, 0x20 }, { 0x0a, 0x00 }, { 0x30, 0xe0 }, { 0x20, 0x01 },
|
||||||
|
};
|
||||||
|
|
||||||
|
static const struct sonly_regwrite awfsm_2016_writev_4[] = {
|
||||||
|
{ 0x08, 0x00 }, { 0x10, 0x00 }, { 0x12, 0x01 }, { 0x11, 0xbf },
|
||||||
|
{ 0x12, 0x01 }, { 0x07, 0x10 }, { 0x07, 0x10 }, { 0x04, 0x00 },\
|
||||||
|
{ 0x05, 0x00 }, { 0x0b, 0x00 },
|
||||||
|
|
||||||
|
/* enter finger detection mode */
|
||||||
|
{ 0x15, 0x20 }, { 0x30, 0xe1 }, { 0x15, 0x24 }, { 0x15, 0x04 },
|
||||||
|
{ 0x15, 0x84 },
|
||||||
|
};
|
||||||
|
|
||||||
|
/***** CAPTURE MODE *****/
|
||||||
|
|
||||||
|
static const struct sonly_regwrite capsm_2016_writev[] = {
|
||||||
|
/* enter capture mode */
|
||||||
|
{ 0x09, 0x28 }, { 0x13, 0x55 }, { 0x0b, 0x80 }, { 0x04, 0x00 },
|
||||||
|
{ 0x05, 0x00 },
|
||||||
|
};
|
||||||
|
|
||||||
|
static const struct sonly_regwrite capsm_1000_writev[] = {
|
||||||
|
{ 0x08, 0x80 }, { 0x13, 0x55 }, { 0x0b, 0x80 }, /* Enter capture mode */
|
||||||
|
};
|
||||||
|
|
||||||
|
static const struct sonly_regwrite capsm_1001_writev_1[] = {
|
||||||
|
{ 0x1a, 0x02 },
|
||||||
|
{ 0x4a, 0x9d },
|
||||||
|
{ 0x4e, 0x05 },
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
static const struct sonly_regwrite capsm_1001_writev_2[] = {
|
||||||
|
{ 0x4d, 0xc0 }, { 0x4e, 0x09 },
|
||||||
|
};
|
||||||
|
|
||||||
|
static const struct sonly_regwrite capsm_1001_writev_3[] = {
|
||||||
|
{ 0x4a, 0x9c },
|
||||||
|
{ 0x1a, 0x00 },
|
||||||
|
{ 0x0b, 0x00 },
|
||||||
|
{ 0x04, 0x00 },
|
||||||
|
{ 0x05, 0x00 },
|
||||||
|
{ 0x1a, 0x02 },
|
||||||
|
{ 0x4a, 0x9d },
|
||||||
|
{ 0x4d, 0x40 }, { 0x4e, 0x09 },
|
||||||
|
};
|
||||||
|
|
||||||
|
static const struct sonly_regwrite capsm_1001_writev_4[] = {
|
||||||
|
{ 0x4a, 0x9c },
|
||||||
|
{ 0x1a, 0x00 },
|
||||||
|
{ 0x1a, 0x02 },
|
||||||
|
{ 0x4a, 0x9d },
|
||||||
|
{ 0x4e, 0x08 },
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
static const struct sonly_regwrite capsm_1001_writev_5[] = {
|
||||||
|
{ 0x4a, 0x9c },
|
||||||
|
{ 0x1a, 0x00 },
|
||||||
|
{ 0x1a, 0x02 },
|
||||||
|
{ 0x00, 0x5f }, { 0x01, 0xee },
|
||||||
|
{ 0x03, 0x2c },
|
||||||
|
{ 0x07, 0x00 }, { 0x08, 0x00 }, { 0x09, 0x29 }, { 0x0a, 0x00 }, { 0x0b, 0x00 }, { 0x0c, 0x13 }, { 0x0d, 0x0d }, { 0x0e, 0x0e },
|
||||||
|
{ 0x0f, 0x0d }, { 0x10, 0x00 }, { 0x11, 0x8f }, { 0x12, 0x01 }, { 0x13, 0x45 },
|
||||||
|
{ 0x15, 0x26 },
|
||||||
|
{ 0x1e, 0x02 },
|
||||||
|
{ 0x20, 0x01 },
|
||||||
|
{ 0x25, 0x8f },
|
||||||
|
{ 0x27, 0x23 },
|
||||||
|
{ 0x30, 0xe0 },
|
||||||
|
{ 0x07, 0x10 },
|
||||||
|
{ 0x09, 0x21 },
|
||||||
|
{ 0x13, 0x75 },
|
||||||
|
{ 0x0b, 0x80 },
|
||||||
|
};
|
||||||
|
|
||||||
|
/***** DEINITIALIZATION *****/
|
||||||
|
|
||||||
|
static const struct sonly_regwrite deinitsm_2016_writev[] = {
|
||||||
|
/* reset + enter low power mode */
|
||||||
|
{ 0x0b, 0x00 }, { 0x09, 0x20 }, { 0x13, 0x45 }, { 0x13, 0x45 },
|
||||||
|
};
|
||||||
|
|
||||||
|
static const struct sonly_regwrite deinitsm_1000_writev[] = {
|
||||||
|
{ 0x15, 0x26 }, { 0x30, 0xe0 }, /* Disable finger detection */
|
||||||
|
|
||||||
|
{ 0x0b, 0x00 }, { 0x13, 0x45 }, { 0x08, 0x00 }, /* Disable capture mode */
|
||||||
|
};
|
||||||
|
|
||||||
|
static const struct sonly_regwrite deinitsm_1001_writev[] = {
|
||||||
|
{ 0x0b, 0x00 },
|
||||||
|
{ 0x13, 0x45 },
|
||||||
|
{ 0x09, 0x29 },
|
||||||
|
{ 0x1a, 0x00 },
|
||||||
|
};
|
||||||
|
|
||||||
|
/***** INITIALIZATION *****/
|
||||||
|
|
||||||
|
static const struct sonly_regwrite initsm_2016_writev_1[] = {
|
||||||
|
{ 0x49, 0x00 },
|
||||||
|
|
||||||
|
/* BSAPI writes different values to register 0x3e each time. I initially
|
||||||
|
* thought this was some kind of clever authentication, but just blasting
|
||||||
|
* these sniffed values each time seems to work. */
|
||||||
|
{ 0x3e, 0x83 }, { 0x3e, 0x4f }, { 0x3e, 0x0f }, { 0x3e, 0xbf },
|
||||||
|
{ 0x3e, 0x45 }, { 0x3e, 0x35 }, { 0x3e, 0x1c }, { 0x3e, 0xae },
|
||||||
|
|
||||||
|
{ 0x44, 0x01 }, { 0x43, 0x06 }, { 0x43, 0x05 }, { 0x43, 0x04 },
|
||||||
|
{ 0x44, 0x00 }, { 0x0b, 0x00 },
|
||||||
|
};
|
||||||
|
|
||||||
|
static const struct sonly_regwrite initsm_1000_writev_1[] = {
|
||||||
|
{ 0x49, 0x00 }, /* Encryption disabled */
|
||||||
|
|
||||||
|
/* Setting encryption key. Doesn't need to be random since we don't use any
|
||||||
|
* encryption. */
|
||||||
|
{ 0x3e, 0x7f }, { 0x3e, 0x7f }, { 0x3e, 0x7f }, { 0x3e, 0x7f },
|
||||||
|
{ 0x3e, 0x7f }, { 0x3e, 0x7f }, { 0x3e, 0x7f }, { 0x3e, 0x7f },
|
||||||
|
|
||||||
|
{ 0x04, 0x00 }, { 0x05, 0x00 },
|
||||||
|
|
||||||
|
{ 0x0b, 0x00 }, { 0x08, 0x00 }, /* Initialize capture control registers */
|
||||||
|
};
|
||||||
|
|
||||||
|
static const struct sonly_regwrite initsm_1001_writev_1[] = {
|
||||||
|
{ 0x4a, 0x9d },
|
||||||
|
{ 0x4f, 0x06 },
|
||||||
|
{ 0x4f, 0x05 },
|
||||||
|
{ 0x4f, 0x04 },
|
||||||
|
{ 0x4a, 0x9c },
|
||||||
|
{ 0x3e, 0xa6 },
|
||||||
|
{ 0x3e, 0x01 },
|
||||||
|
{ 0x3e, 0x68 },
|
||||||
|
{ 0x3e, 0xfd },
|
||||||
|
{ 0x3e, 0x72 },
|
||||||
|
{ 0x3e, 0xef },
|
||||||
|
{ 0x3e, 0x5d },
|
||||||
|
{ 0x3e, 0xc5 },
|
||||||
|
{ 0x1a, 0x02 },
|
||||||
|
{ 0x4a, 0x9d },
|
||||||
|
{ 0x4c, 0x1f }, { 0x4d, 0xb8 }, { 0x4e, 0x00 },
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
static const struct sonly_regwrite initsm_1001_writev_2[] = {
|
||||||
|
{ 0x4c, 0x03 }, { 0x4d, 0xb8 }, { 0x4e, 0x00 },
|
||||||
|
};
|
||||||
|
|
||||||
|
static const struct sonly_regwrite initsm_1001_writev_3[] = {
|
||||||
|
{ 0x4a, 0x9c },
|
||||||
|
{ 0x1a, 0x00 },
|
||||||
|
{ 0x1a, 0x02 },
|
||||||
|
{ 0x4a, 0x9d },
|
||||||
|
{ 0x4c, 0xff }, { 0x4d, 0xc0 }, { 0x4e, 0x00 },
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
static const struct sonly_regwrite initsm_1001_writev_4[] = {
|
||||||
|
{ 0x4a, 0x9c },
|
||||||
|
{ 0x1a, 0x00 },
|
||||||
|
{ 0x09, 0x27 },
|
||||||
|
{ 0x1a, 0x02 },
|
||||||
|
{ 0x49, 0x01 },
|
||||||
|
{ 0x47, 0x02 },
|
||||||
|
{ 0x47, 0x02 },
|
||||||
|
{ 0x47, 0x02 },
|
||||||
|
{ 0x47, 0x02 },
|
||||||
|
{ 0x47, 0x02 },
|
||||||
|
{ 0x47, 0x02 },
|
||||||
|
{ 0x47, 0x02 },
|
||||||
|
{ 0x47, 0x0a },
|
||||||
|
{ 0x47, 0x00 },
|
||||||
|
{ 0x47, 0x04 },
|
||||||
|
{ 0x47, 0x04 },
|
||||||
|
{ 0x47, 0x04 },
|
||||||
|
{ 0x47, 0x04 },
|
||||||
|
{ 0x47, 0x04 },
|
||||||
|
{ 0x47, 0x04 },
|
||||||
|
{ 0x47, 0x04 },
|
||||||
|
{ 0x47, 0x04 },
|
||||||
|
{ 0x47, 0x02 },
|
||||||
|
{ 0x47, 0x02 },
|
||||||
|
{ 0x47, 0x02 },
|
||||||
|
{ 0x47, 0x02 },
|
||||||
|
{ 0x47, 0x02 },
|
||||||
|
{ 0x47, 0x02 },
|
||||||
|
{ 0x47, 0x02 },
|
||||||
|
{ 0x47, 0x0a },
|
||||||
|
{ 0x47, 0x00 },
|
||||||
|
{ 0x47, 0x04 },
|
||||||
|
{ 0x47, 0x04 },
|
||||||
|
{ 0x47, 0x04 },
|
||||||
|
{ 0x47, 0x04 },
|
||||||
|
{ 0x47, 0x04 },
|
||||||
|
{ 0x47, 0x04 },
|
||||||
|
{ 0x47, 0x04 },
|
||||||
|
{ 0x47, 0x04 },
|
||||||
|
{ 0x47, 0x02 },
|
||||||
|
{ 0x47, 0x02 },
|
||||||
|
{ 0x47, 0x02 },
|
||||||
|
{ 0x47, 0x02 },
|
||||||
|
{ 0x47, 0x02 },
|
||||||
|
{ 0x47, 0x02 },
|
||||||
|
{ 0x47, 0x02 },
|
||||||
|
{ 0x47, 0x0a },
|
||||||
|
{ 0x47, 0x00 },
|
||||||
|
{ 0x47, 0x04 },
|
||||||
|
{ 0x47, 0x04 },
|
||||||
|
{ 0x47, 0x04 },
|
||||||
|
{ 0x47, 0x04 },
|
||||||
|
{ 0x47, 0x04 },
|
||||||
|
{ 0x47, 0x04 },
|
||||||
|
{ 0x47, 0x04 },
|
||||||
|
{ 0x47, 0x04 },
|
||||||
|
{ 0x47, 0x02 },
|
||||||
|
{ 0x47, 0x02 },
|
||||||
|
{ 0x47, 0x02 },
|
||||||
|
{ 0x47, 0x02 },
|
||||||
|
{ 0x47, 0x02 },
|
||||||
|
{ 0x47, 0x02 },
|
||||||
|
{ 0x47, 0x02 },
|
||||||
|
{ 0x47, 0x0a },
|
||||||
|
{ 0x47, 0x00 },
|
||||||
|
{ 0x47, 0x04 },
|
||||||
|
{ 0x47, 0x04 },
|
||||||
|
{ 0x47, 0x04 },
|
||||||
|
{ 0x47, 0x04 },
|
||||||
|
{ 0x47, 0x04 },
|
||||||
|
{ 0x47, 0x04 },
|
||||||
|
{ 0x47, 0x04 },
|
||||||
|
{ 0x47, 0x04 },
|
||||||
|
{ 0x49, 0x00 },
|
||||||
|
{ 0x3e, 0x90 },
|
||||||
|
{ 0x3e, 0xbd },
|
||||||
|
{ 0x3e, 0xbf },
|
||||||
|
{ 0x3e, 0x48 },
|
||||||
|
{ 0x3e, 0x2a },
|
||||||
|
{ 0x3e, 0xe3 },
|
||||||
|
{ 0x3e, 0xd2 },
|
||||||
|
{ 0x3e, 0x58 },
|
||||||
|
{ 0x09, 0x2f },
|
||||||
|
{ 0x1a, 0x00 },
|
||||||
|
{ 0x1a, 0x02 },
|
||||||
|
{ 0x4a, 0x9d },
|
||||||
|
{ 0x4d, 0x40 }, { 0x4e, 0x03 },
|
||||||
|
};
|
||||||
|
|
||||||
|
static const struct sonly_regwrite initsm_1001_writev_5[] = {
|
||||||
|
{ 0x4a, 0x9c },
|
||||||
|
{ 0x1a, 0x00 },
|
||||||
|
};
|
||||||
@@ -441,7 +441,7 @@ static int dev_init(struct fp_img_dev *dev, unsigned long driver_data)
|
|||||||
|
|
||||||
r = libusb_claim_interface(dev->udev, 0);
|
r = libusb_claim_interface(dev->udev, 0);
|
||||||
if (r < 0) {
|
if (r < 0) {
|
||||||
fp_err("could not claim interface 0");
|
fp_err("could not claim interface 0: %s", libusb_error_name(r));
|
||||||
return r;
|
return r;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -17,7 +17,7 @@
|
|||||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#define FP_COMPONENT "upekts_img"
|
#define FP_COMPONENT "upektc_img"
|
||||||
|
|
||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
@@ -46,7 +46,7 @@ static void start_deactivation(struct fp_img_dev *dev);
|
|||||||
#define MAX_RESPONSE_SIZE 2052
|
#define MAX_RESPONSE_SIZE 2052
|
||||||
#define SHORT_RESPONSE_SIZE 64
|
#define SHORT_RESPONSE_SIZE 64
|
||||||
|
|
||||||
struct upekts_img_dev {
|
struct upektc_img_dev {
|
||||||
unsigned char cmd[MAX_CMD_SIZE];
|
unsigned char cmd[MAX_CMD_SIZE];
|
||||||
unsigned char response[MAX_RESPONSE_SIZE];
|
unsigned char response[MAX_RESPONSE_SIZE];
|
||||||
unsigned char image_bits[IMAGE_SIZE * 2];
|
unsigned char image_bits[IMAGE_SIZE * 2];
|
||||||
@@ -126,7 +126,7 @@ static void upektc_img_submit_req(struct fpi_ssm *ssm,
|
|||||||
libusb_transfer_cb_fn cb)
|
libusb_transfer_cb_fn cb)
|
||||||
{
|
{
|
||||||
struct fp_img_dev *dev = ssm->priv;
|
struct fp_img_dev *dev = ssm->priv;
|
||||||
struct upekts_img_dev *upekdev = dev->priv;
|
struct upektc_img_dev *upekdev = dev->priv;
|
||||||
struct libusb_transfer *transfer = libusb_alloc_transfer(0);
|
struct libusb_transfer *transfer = libusb_alloc_transfer(0);
|
||||||
int r;
|
int r;
|
||||||
|
|
||||||
@@ -157,7 +157,7 @@ static void upektc_img_read_data(struct fpi_ssm *ssm, size_t buf_size, size_t bu
|
|||||||
{
|
{
|
||||||
struct libusb_transfer *transfer = libusb_alloc_transfer(0);
|
struct libusb_transfer *transfer = libusb_alloc_transfer(0);
|
||||||
struct fp_img_dev *dev = ssm->priv;
|
struct fp_img_dev *dev = ssm->priv;
|
||||||
struct upekts_img_dev *upekdev = dev->priv;
|
struct upektc_img_dev *upekdev = dev->priv;
|
||||||
int r;
|
int r;
|
||||||
|
|
||||||
if (!transfer) {
|
if (!transfer) {
|
||||||
@@ -184,9 +184,11 @@ static void upektc_img_read_data(struct fpi_ssm *ssm, size_t buf_size, size_t bu
|
|||||||
enum capture_states {
|
enum capture_states {
|
||||||
CAPTURE_INIT_CAPTURE,
|
CAPTURE_INIT_CAPTURE,
|
||||||
CAPTURE_READ_DATA,
|
CAPTURE_READ_DATA,
|
||||||
|
CAPTURE_READ_DATA_TERM,
|
||||||
CAPTURE_ACK_00_28,
|
CAPTURE_ACK_00_28,
|
||||||
CAPTURE_ACK_08,
|
CAPTURE_ACK_08,
|
||||||
CAPTURE_ACK_FRAME,
|
CAPTURE_ACK_FRAME,
|
||||||
|
CAPTURE_ACK_00_28_TERM,
|
||||||
CAPTURE_NUM_STATES,
|
CAPTURE_NUM_STATES,
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -194,11 +196,18 @@ static void capture_reqs_cb(struct libusb_transfer *transfer)
|
|||||||
{
|
{
|
||||||
struct fpi_ssm *ssm = transfer->user_data;
|
struct fpi_ssm *ssm = transfer->user_data;
|
||||||
|
|
||||||
if ((transfer->status == LIBUSB_TRANSFER_COMPLETED) &&
|
if ((transfer->status != LIBUSB_TRANSFER_COMPLETED) ||
|
||||||
(transfer->length == transfer->actual_length)) {
|
(transfer->length != transfer->actual_length)) {
|
||||||
fpi_ssm_jump_to_state(ssm, CAPTURE_READ_DATA);
|
|
||||||
} else {
|
|
||||||
fpi_ssm_mark_aborted(ssm, -EIO);
|
fpi_ssm_mark_aborted(ssm, -EIO);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
switch (ssm->cur_state) {
|
||||||
|
case CAPTURE_ACK_00_28_TERM:
|
||||||
|
fpi_ssm_jump_to_state(ssm, CAPTURE_READ_DATA_TERM);
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
fpi_ssm_jump_to_state(ssm, CAPTURE_READ_DATA);
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -224,7 +233,7 @@ static void capture_read_data_cb(struct libusb_transfer *transfer)
|
|||||||
{
|
{
|
||||||
struct fpi_ssm *ssm = transfer->user_data;
|
struct fpi_ssm *ssm = transfer->user_data;
|
||||||
struct fp_img_dev *dev = ssm->priv;
|
struct fp_img_dev *dev = ssm->priv;
|
||||||
struct upekts_img_dev *upekdev = dev->priv;
|
struct upektc_img_dev *upekdev = dev->priv;
|
||||||
unsigned char *data = upekdev->response;
|
unsigned char *data = upekdev->response;
|
||||||
struct fp_img *img;
|
struct fp_img *img;
|
||||||
size_t response_size;
|
size_t response_size;
|
||||||
@@ -243,7 +252,13 @@ static void capture_read_data_cb(struct libusb_transfer *transfer)
|
|||||||
|
|
||||||
fp_dbg("request completed, len: %.4x", transfer->actual_length);
|
fp_dbg("request completed, len: %.4x", transfer->actual_length);
|
||||||
if (transfer->actual_length == 0) {
|
if (transfer->actual_length == 0) {
|
||||||
fpi_ssm_jump_to_state(ssm, CAPTURE_READ_DATA);
|
fpi_ssm_jump_to_state(ssm, ssm->cur_state);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (ssm->cur_state == CAPTURE_READ_DATA_TERM) {
|
||||||
|
fp_dbg("Terminating SSM\n");
|
||||||
|
fpi_ssm_mark_completed(ssm);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -277,10 +292,26 @@ static void capture_read_data_cb(struct libusb_transfer *transfer)
|
|||||||
/* finger is present! */
|
/* finger is present! */
|
||||||
fpi_ssm_jump_to_state(ssm, CAPTURE_ACK_00_28);
|
fpi_ssm_jump_to_state(ssm, CAPTURE_ACK_00_28);
|
||||||
break;
|
break;
|
||||||
|
case 0x1e:
|
||||||
|
/* short scan */
|
||||||
|
fp_err("short scan, aborting\n");
|
||||||
|
fpi_imgdev_abort_scan(dev, FP_VERIFY_RETRY_TOO_SHORT);
|
||||||
|
fpi_imgdev_report_finger_status(dev, FALSE);
|
||||||
|
fpi_ssm_jump_to_state(ssm, CAPTURE_ACK_00_28_TERM);
|
||||||
|
break;
|
||||||
|
case 0x1d:
|
||||||
|
/* too much horisontal movement */
|
||||||
|
fp_err("too much horisontal movement, aborting\n");
|
||||||
|
fpi_imgdev_abort_scan(dev, FP_VERIFY_RETRY_CENTER_FINGER);
|
||||||
|
fpi_imgdev_report_finger_status(dev, FALSE);
|
||||||
|
fpi_ssm_jump_to_state(ssm, CAPTURE_ACK_00_28_TERM);
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
/* some error happened, cancel scan */
|
/* some error happened, cancel scan */
|
||||||
fp_err("something bad happened, aborting scan :(\n");
|
fp_err("something bad happened, stop scan\n");
|
||||||
fpi_ssm_mark_aborted(ssm, FP_VERIFY_RETRY_REMOVE_FINGER);
|
fpi_imgdev_abort_scan(dev, FP_VERIFY_RETRY);
|
||||||
|
fpi_imgdev_report_finger_status(dev, FALSE);
|
||||||
|
fpi_ssm_jump_to_state(ssm, CAPTURE_ACK_00_28_TERM);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
@@ -302,6 +333,7 @@ static void capture_read_data_cb(struct libusb_transfer *transfer)
|
|||||||
BUG_ON(upekdev->image_size != IMAGE_SIZE);
|
BUG_ON(upekdev->image_size != IMAGE_SIZE);
|
||||||
fp_dbg("Image size is %d\n", upekdev->image_size);
|
fp_dbg("Image size is %d\n", upekdev->image_size);
|
||||||
img = fpi_img_new(IMAGE_SIZE);
|
img = fpi_img_new(IMAGE_SIZE);
|
||||||
|
img->flags = FP_IMG_PARTIAL;
|
||||||
memcpy(img->data, upekdev->image_bits, IMAGE_SIZE);
|
memcpy(img->data, upekdev->image_bits, IMAGE_SIZE);
|
||||||
fpi_imgdev_image_captured(dev, img);
|
fpi_imgdev_image_captured(dev, img);
|
||||||
fpi_imgdev_report_finger_status(dev, FALSE);
|
fpi_imgdev_report_finger_status(dev, FALSE);
|
||||||
@@ -325,7 +357,7 @@ static void capture_read_data_cb(struct libusb_transfer *transfer)
|
|||||||
static void capture_run_state(struct fpi_ssm *ssm)
|
static void capture_run_state(struct fpi_ssm *ssm)
|
||||||
{
|
{
|
||||||
struct fp_img_dev *dev = ssm->priv;
|
struct fp_img_dev *dev = ssm->priv;
|
||||||
struct upekts_img_dev *upekdev = dev->priv;
|
struct upektc_img_dev *upekdev = dev->priv;
|
||||||
|
|
||||||
switch (ssm->cur_state) {
|
switch (ssm->cur_state) {
|
||||||
case CAPTURE_INIT_CAPTURE:
|
case CAPTURE_INIT_CAPTURE:
|
||||||
@@ -334,6 +366,7 @@ static void capture_run_state(struct fpi_ssm *ssm)
|
|||||||
upekdev->seq++;
|
upekdev->seq++;
|
||||||
break;
|
break;
|
||||||
case CAPTURE_READ_DATA:
|
case CAPTURE_READ_DATA:
|
||||||
|
case CAPTURE_READ_DATA_TERM:
|
||||||
if (!upekdev->response_rest)
|
if (!upekdev->response_rest)
|
||||||
upektc_img_read_data(ssm, SHORT_RESPONSE_SIZE, 0, capture_read_data_cb);
|
upektc_img_read_data(ssm, SHORT_RESPONSE_SIZE, 0, capture_read_data_cb);
|
||||||
else
|
else
|
||||||
@@ -341,6 +374,7 @@ static void capture_run_state(struct fpi_ssm *ssm)
|
|||||||
SHORT_RESPONSE_SIZE, capture_read_data_cb);
|
SHORT_RESPONSE_SIZE, capture_read_data_cb);
|
||||||
break;
|
break;
|
||||||
case CAPTURE_ACK_00_28:
|
case CAPTURE_ACK_00_28:
|
||||||
|
case CAPTURE_ACK_00_28_TERM:
|
||||||
upektc_img_submit_req(ssm, upek2020_ack_00_28, sizeof(upek2020_ack_00_28),
|
upektc_img_submit_req(ssm, upek2020_ack_00_28, sizeof(upek2020_ack_00_28),
|
||||||
upekdev->seq, capture_reqs_cb);
|
upekdev->seq, capture_reqs_cb);
|
||||||
upekdev->seq++;
|
upekdev->seq++;
|
||||||
@@ -360,7 +394,7 @@ static void capture_run_state(struct fpi_ssm *ssm)
|
|||||||
static void capture_sm_complete(struct fpi_ssm *ssm)
|
static void capture_sm_complete(struct fpi_ssm *ssm)
|
||||||
{
|
{
|
||||||
struct fp_img_dev *dev = ssm->priv;
|
struct fp_img_dev *dev = ssm->priv;
|
||||||
struct upekts_img_dev *upekdev = dev->priv;
|
struct upektc_img_dev *upekdev = dev->priv;
|
||||||
int err = ssm->error;
|
int err = ssm->error;
|
||||||
|
|
||||||
fp_dbg("Capture completed, %d", err);
|
fp_dbg("Capture completed, %d", err);
|
||||||
@@ -376,7 +410,7 @@ static void capture_sm_complete(struct fpi_ssm *ssm)
|
|||||||
|
|
||||||
static void start_capture(struct fp_img_dev *dev)
|
static void start_capture(struct fp_img_dev *dev)
|
||||||
{
|
{
|
||||||
struct upekts_img_dev *upekdev = dev->priv;
|
struct upektc_img_dev *upekdev = dev->priv;
|
||||||
struct fpi_ssm *ssm;
|
struct fpi_ssm *ssm;
|
||||||
|
|
||||||
upekdev->image_size = 0;
|
upekdev->image_size = 0;
|
||||||
@@ -421,7 +455,7 @@ static void deactivate_read_data_cb(struct libusb_transfer *transfer)
|
|||||||
static void deactivate_run_state(struct fpi_ssm *ssm)
|
static void deactivate_run_state(struct fpi_ssm *ssm)
|
||||||
{
|
{
|
||||||
struct fp_img_dev *dev = ssm->priv;
|
struct fp_img_dev *dev = ssm->priv;
|
||||||
struct upekts_img_dev *upekdev = dev->priv;
|
struct upektc_img_dev *upekdev = dev->priv;
|
||||||
|
|
||||||
switch (ssm->cur_state) {
|
switch (ssm->cur_state) {
|
||||||
case DEACTIVATE_DEINIT:
|
case DEACTIVATE_DEINIT:
|
||||||
@@ -438,7 +472,7 @@ static void deactivate_run_state(struct fpi_ssm *ssm)
|
|||||||
static void deactivate_sm_complete(struct fpi_ssm *ssm)
|
static void deactivate_sm_complete(struct fpi_ssm *ssm)
|
||||||
{
|
{
|
||||||
struct fp_img_dev *dev = ssm->priv;
|
struct fp_img_dev *dev = ssm->priv;
|
||||||
struct upekts_img_dev *upekdev = dev->priv;
|
struct upektc_img_dev *upekdev = dev->priv;
|
||||||
int err = ssm->error;
|
int err = ssm->error;
|
||||||
|
|
||||||
fp_dbg("Deactivate completed");
|
fp_dbg("Deactivate completed");
|
||||||
@@ -455,7 +489,7 @@ static void deactivate_sm_complete(struct fpi_ssm *ssm)
|
|||||||
|
|
||||||
static void start_deactivation(struct fp_img_dev *dev)
|
static void start_deactivation(struct fp_img_dev *dev)
|
||||||
{
|
{
|
||||||
struct upekts_img_dev *upekdev = dev->priv;
|
struct upektc_img_dev *upekdev = dev->priv;
|
||||||
struct fpi_ssm *ssm;
|
struct fpi_ssm *ssm;
|
||||||
|
|
||||||
upekdev->image_size = 0;
|
upekdev->image_size = 0;
|
||||||
@@ -520,7 +554,7 @@ static void activate_run_state(struct fpi_ssm *ssm)
|
|||||||
{
|
{
|
||||||
struct libusb_transfer *transfer;
|
struct libusb_transfer *transfer;
|
||||||
struct fp_img_dev *dev = ssm->priv;
|
struct fp_img_dev *dev = ssm->priv;
|
||||||
struct upekts_img_dev *upekdev = dev->priv;
|
struct upektc_img_dev *upekdev = dev->priv;
|
||||||
int r;
|
int r;
|
||||||
|
|
||||||
switch (ssm->cur_state) {
|
switch (ssm->cur_state) {
|
||||||
@@ -594,7 +628,7 @@ static void activate_sm_complete(struct fpi_ssm *ssm)
|
|||||||
|
|
||||||
static int dev_activate(struct fp_img_dev *dev, enum fp_imgdev_state state)
|
static int dev_activate(struct fp_img_dev *dev, enum fp_imgdev_state state)
|
||||||
{
|
{
|
||||||
struct upekts_img_dev *upekdev = dev->priv;
|
struct upektc_img_dev *upekdev = dev->priv;
|
||||||
struct fpi_ssm *ssm = fpi_ssm_new(dev->dev, activate_run_state,
|
struct fpi_ssm *ssm = fpi_ssm_new(dev->dev, activate_run_state,
|
||||||
ACTIVATE_NUM_STATES);
|
ACTIVATE_NUM_STATES);
|
||||||
ssm->priv = dev;
|
ssm->priv = dev;
|
||||||
@@ -605,7 +639,7 @@ static int dev_activate(struct fp_img_dev *dev, enum fp_imgdev_state state)
|
|||||||
|
|
||||||
static void dev_deactivate(struct fp_img_dev *dev)
|
static void dev_deactivate(struct fp_img_dev *dev)
|
||||||
{
|
{
|
||||||
struct upekts_img_dev *upekdev = dev->priv;
|
struct upektc_img_dev *upekdev = dev->priv;
|
||||||
|
|
||||||
upekdev->deactivating = TRUE;
|
upekdev->deactivating = TRUE;
|
||||||
}
|
}
|
||||||
@@ -617,11 +651,11 @@ static int dev_init(struct fp_img_dev *dev, unsigned long driver_data)
|
|||||||
|
|
||||||
r = libusb_claim_interface(dev->udev, 0);
|
r = libusb_claim_interface(dev->udev, 0);
|
||||||
if (r < 0) {
|
if (r < 0) {
|
||||||
fp_err("could not claim interface 0");
|
fp_err("could not claim interface 0: %s", libusb_error_name(r));
|
||||||
return r;
|
return r;
|
||||||
}
|
}
|
||||||
|
|
||||||
dev->priv = g_malloc0(sizeof(struct upekts_img_dev));
|
dev->priv = g_malloc0(sizeof(struct upektc_img_dev));
|
||||||
fpi_imgdev_open_complete(dev, 0);
|
fpi_imgdev_open_complete(dev, 0);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
@@ -665,7 +699,7 @@ struct fp_img_driver upektc_img_driver = {
|
|||||||
.flags = 0,
|
.flags = 0,
|
||||||
.img_height = IMAGE_HEIGHT,
|
.img_height = IMAGE_HEIGHT,
|
||||||
.img_width = IMAGE_WIDTH,
|
.img_width = IMAGE_WIDTH,
|
||||||
.bz3_threshold = 70,
|
.bz3_threshold = 20,
|
||||||
|
|
||||||
.open = dev_init,
|
.open = dev_init,
|
||||||
.close = dev_deinit,
|
.close = dev_deinit,
|
||||||
|
|||||||
@@ -875,8 +875,10 @@ static int dev_init(struct fp_dev *dev, unsigned long driver_data)
|
|||||||
int r;
|
int r;
|
||||||
|
|
||||||
r = libusb_claim_interface(dev->udev, 0);
|
r = libusb_claim_interface(dev->udev, 0);
|
||||||
if (r < 0)
|
if (r < 0) {
|
||||||
|
fp_err("could not claim interface 0: %s", libusb_error_name(r));
|
||||||
return r;
|
return r;
|
||||||
|
}
|
||||||
|
|
||||||
upekdev = g_malloc(sizeof(*upekdev));
|
upekdev = g_malloc(sizeof(*upekdev));
|
||||||
upekdev->seq = 0xf0; /* incremented to 0x00 before first cmd */
|
upekdev->seq = 0xf0; /* incremented to 0x00 before first cmd */
|
||||||
|
|||||||
@@ -45,6 +45,8 @@
|
|||||||
#define IMAGE_HEIGHT 290
|
#define IMAGE_HEIGHT 290
|
||||||
#define IMAGE_WIDTH 384
|
#define IMAGE_WIDTH 384
|
||||||
|
|
||||||
|
#define ENC_THRESHOLD 1000
|
||||||
|
|
||||||
enum {
|
enum {
|
||||||
IRQDATA_SCANPWR_ON = 0x56aa,
|
IRQDATA_SCANPWR_ON = 0x56aa,
|
||||||
IRQDATA_FINGER_ON = 0x0101,
|
IRQDATA_FINGER_ON = 0x0101,
|
||||||
@@ -664,6 +666,34 @@ static uint32_t do_decode(uint8_t *data, int num_bytes, uint32_t key)
|
|||||||
return update_key(key);
|
return update_key(key);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static int calc_dev2(struct uru4k_image *img)
|
||||||
|
{
|
||||||
|
uint8_t *b[2] = { NULL, NULL };
|
||||||
|
int res = 0, mean = 0, i, r, j, idx;
|
||||||
|
|
||||||
|
for (i = r = idx = 0; i < array_n_elements(img->block_info) && idx < 2; i++) {
|
||||||
|
if (img->block_info[i].flags & BLOCKF_NOT_PRESENT)
|
||||||
|
continue;
|
||||||
|
for (j = 0; j < img->block_info[i].num_lines && idx < 2; j++)
|
||||||
|
b[idx++] = img->data[r++];
|
||||||
|
}
|
||||||
|
if (!b[0] || !b[1]) {
|
||||||
|
fp_dbg("NULL! %p %p", b[0], b[1]);
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
for (i = 0; i < IMAGE_WIDTH; i++)
|
||||||
|
mean += (int)b[0][i] + (int)b[1][i];
|
||||||
|
|
||||||
|
mean /= IMAGE_WIDTH;
|
||||||
|
|
||||||
|
for (i = 0; i < IMAGE_WIDTH; i++) {
|
||||||
|
int dev = (int)b[0][i] + (int)b[1][i] - mean;
|
||||||
|
res += dev * dev;
|
||||||
|
}
|
||||||
|
|
||||||
|
return res / IMAGE_WIDTH;
|
||||||
|
}
|
||||||
|
|
||||||
static void imaging_run_state(struct fpi_ssm *ssm)
|
static void imaging_run_state(struct fpi_ssm *ssm)
|
||||||
{
|
{
|
||||||
struct fp_img_dev *dev = ssm->priv;
|
struct fp_img_dev *dev = ssm->priv;
|
||||||
@@ -672,7 +702,7 @@ static void imaging_run_state(struct fpi_ssm *ssm)
|
|||||||
struct fp_img *fpimg;
|
struct fp_img *fpimg;
|
||||||
uint32_t key;
|
uint32_t key;
|
||||||
uint8_t flags, num_lines;
|
uint8_t flags, num_lines;
|
||||||
int i, r, to;
|
int i, r, to, dev2;
|
||||||
char buf[5];
|
char buf[5];
|
||||||
|
|
||||||
switch (ssm->cur_state) {
|
switch (ssm->cur_state) {
|
||||||
@@ -698,8 +728,13 @@ static void imaging_run_state(struct fpi_ssm *ssm)
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (!urudev->profile->encryption) {
|
if (!urudev->profile->encryption) {
|
||||||
fpi_ssm_jump_to_state(ssm, IMAGING_REPORT_IMAGE);
|
dev2 = calc_dev2(img);
|
||||||
return;
|
fp_dbg("dev2: %d", dev2);
|
||||||
|
if (dev2 < ENC_THRESHOLD) {
|
||||||
|
fpi_ssm_jump_to_state(ssm, IMAGING_REPORT_IMAGE);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
fp_info("image seems to be encrypted");
|
||||||
}
|
}
|
||||||
buf[0] = img->key_number;
|
buf[0] = img->key_number;
|
||||||
buf[1] = urudev->img_enc_seed;
|
buf[1] = urudev->img_enc_seed;
|
||||||
@@ -1285,7 +1320,7 @@ static int dev_init(struct fp_img_dev *dev, unsigned long driver_data)
|
|||||||
|
|
||||||
r = libusb_claim_interface(dev->udev, iface_desc->bInterfaceNumber);
|
r = libusb_claim_interface(dev->udev, iface_desc->bInterfaceNumber);
|
||||||
if (r < 0) {
|
if (r < 0) {
|
||||||
fp_err("interface claim failed");
|
fp_err("interface claim failed: %s", libusb_error_name(r));
|
||||||
goto out;
|
goto out;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -348,7 +348,7 @@ static int dev_init(struct fp_img_dev *dev, unsigned long driver_data)
|
|||||||
|
|
||||||
r = libusb_claim_interface(dev->udev, 0);
|
r = libusb_claim_interface(dev->udev, 0);
|
||||||
if (r < 0)
|
if (r < 0)
|
||||||
fp_err("could not claim interface 0");
|
fp_err("could not claim interface 0: %s", libusb_error_name(r));
|
||||||
|
|
||||||
if (r == 0)
|
if (r == 0)
|
||||||
fpi_imgdev_open_complete(dev, 0);
|
fpi_imgdev_open_complete(dev, 0);
|
||||||
|
|||||||
@@ -0,0 +1,791 @@
|
|||||||
|
/*
|
||||||
|
* Validity VFS0050 driver for libfprint
|
||||||
|
* Copyright (C) 2015-2016 Konstantin Semenov <zemen17@gmail.com>
|
||||||
|
*
|
||||||
|
* This library is free software; you can redistribute it and/or
|
||||||
|
* modify it under the terms of the GNU Lesser General Public
|
||||||
|
* License as published by the Free Software Foundation; either
|
||||||
|
* version 2.1 of the License, or (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This library is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
|
* Lesser General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU Lesser General Public
|
||||||
|
* License along with this library; if not, write to the Free Software
|
||||||
|
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||||
|
*/
|
||||||
|
|
||||||
|
#define FP_COMPONENT "vfs0050"
|
||||||
|
|
||||||
|
#include <errno.h>
|
||||||
|
#include <string.h>
|
||||||
|
#include <fp_internal.h>
|
||||||
|
#include <assembling.h>
|
||||||
|
#include "driver_ids.h"
|
||||||
|
|
||||||
|
#include "vfs0050.h"
|
||||||
|
|
||||||
|
/* USB functions */
|
||||||
|
|
||||||
|
/* Callback for async_write */
|
||||||
|
static void async_write_callback(struct libusb_transfer *transfer)
|
||||||
|
{
|
||||||
|
struct fpi_ssm *ssm = transfer->user_data;
|
||||||
|
struct fp_img_dev *idev = ssm->priv;
|
||||||
|
|
||||||
|
int transferred = transfer->actual_length, error =
|
||||||
|
transfer->status, len = transfer->length;
|
||||||
|
|
||||||
|
if (error != 0) {
|
||||||
|
fp_err("USB write transfer: %s", libusb_error_name(error));
|
||||||
|
fpi_imgdev_session_error(idev, -EIO);
|
||||||
|
fpi_ssm_mark_aborted(ssm, -EIO);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (transferred != len) {
|
||||||
|
fp_err("Written only %d of %d bytes", transferred, len);
|
||||||
|
fpi_imgdev_session_error(idev, -EIO);
|
||||||
|
fpi_ssm_mark_aborted(ssm, -EIO);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
fpi_ssm_next_state(ssm);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Send data to EP1, the only out endpoint */
|
||||||
|
static void async_write(struct fpi_ssm *ssm, void *data, int len)
|
||||||
|
{
|
||||||
|
struct fp_img_dev *idev = ssm->priv;
|
||||||
|
struct libusb_device_handle *udev = idev->udev;
|
||||||
|
struct vfs_dev_t *vdev = idev->priv;
|
||||||
|
|
||||||
|
vdev->transfer = libusb_alloc_transfer(0);
|
||||||
|
vdev->transfer->flags |= LIBUSB_TRANSFER_FREE_TRANSFER;
|
||||||
|
libusb_fill_bulk_transfer(vdev->transfer, udev, 0x01, data, len,
|
||||||
|
async_write_callback, ssm, VFS_USB_TIMEOUT);
|
||||||
|
libusb_submit_transfer(vdev->transfer);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Callback for async_read */
|
||||||
|
static void async_read_callback(struct libusb_transfer *transfer)
|
||||||
|
{
|
||||||
|
struct fpi_ssm *ssm = transfer->user_data;
|
||||||
|
struct fp_img_dev *idev = ssm->priv;
|
||||||
|
|
||||||
|
int transferred = transfer->actual_length, error =
|
||||||
|
transfer->status, len = transfer->length;
|
||||||
|
int ep = transfer->endpoint;
|
||||||
|
|
||||||
|
if (error != 0) {
|
||||||
|
fp_err("USB read transfer on endpoint %d: %s", ep - 0x80,
|
||||||
|
libusb_error_name(error));
|
||||||
|
fpi_imgdev_session_error(idev, -EIO);
|
||||||
|
fpi_ssm_mark_aborted(ssm, -EIO);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (transferred != len) {
|
||||||
|
fp_err("Received %d instead of %d bytes", transferred, len);
|
||||||
|
fpi_imgdev_session_error(idev, -EIO);
|
||||||
|
fpi_ssm_mark_aborted(ssm, -EIO);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
fpi_ssm_next_state(ssm);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Receive data from the given ep and compare with expected */
|
||||||
|
static void async_read(struct fpi_ssm *ssm, int ep, void *data, int len)
|
||||||
|
{
|
||||||
|
struct fp_img_dev *idev = ssm->priv;
|
||||||
|
struct libusb_device_handle *udev = idev->udev;
|
||||||
|
struct vfs_dev_t *vdev = idev->priv;
|
||||||
|
|
||||||
|
ep |= LIBUSB_ENDPOINT_IN;
|
||||||
|
|
||||||
|
vdev->transfer = libusb_alloc_transfer(0);
|
||||||
|
vdev->transfer->flags |= LIBUSB_TRANSFER_FREE_TRANSFER;
|
||||||
|
|
||||||
|
/* 0x83 is the only interrupt endpoint */
|
||||||
|
if (ep == EP3_IN)
|
||||||
|
libusb_fill_interrupt_transfer(vdev->transfer, udev, ep, data,
|
||||||
|
len, async_read_callback, ssm,
|
||||||
|
VFS_USB_TIMEOUT);
|
||||||
|
else
|
||||||
|
libusb_fill_bulk_transfer(vdev->transfer, udev, ep, data, len,
|
||||||
|
async_read_callback, ssm,
|
||||||
|
VFS_USB_TIMEOUT);
|
||||||
|
libusb_submit_transfer(vdev->transfer);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Callback for async_read */
|
||||||
|
static void async_abort_callback(struct libusb_transfer *transfer)
|
||||||
|
{
|
||||||
|
struct fpi_ssm *ssm = transfer->user_data;
|
||||||
|
struct fp_img_dev *idev = ssm->priv;
|
||||||
|
|
||||||
|
int transferred = transfer->actual_length, error = transfer->status;
|
||||||
|
int ep = transfer->endpoint;
|
||||||
|
|
||||||
|
/* In normal case endpoint is empty */
|
||||||
|
if (error == LIBUSB_TRANSFER_TIMED_OUT) {
|
||||||
|
fpi_ssm_next_state(ssm);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (error != 0) {
|
||||||
|
fp_err("USB write transfer: %s", libusb_error_name(error));
|
||||||
|
fpi_imgdev_session_error(idev, -EIO);
|
||||||
|
fpi_ssm_mark_aborted(ssm, -EIO);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Don't stop process, only print warning */
|
||||||
|
if (transferred > 0)
|
||||||
|
fp_warn("Endpoint %d had extra %d bytes", ep - 0x80,
|
||||||
|
transferred);
|
||||||
|
|
||||||
|
fpi_ssm_jump_to_state(ssm, ssm->cur_state);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Receive data from the given ep and compare with expected */
|
||||||
|
static void async_abort(struct fpi_ssm *ssm, int ep)
|
||||||
|
{
|
||||||
|
struct fp_img_dev *idev = ssm->priv;
|
||||||
|
struct libusb_device_handle *udev = idev->udev;
|
||||||
|
struct vfs_dev_t *vdev = idev->priv;
|
||||||
|
|
||||||
|
int len = VFS_USB_BUFFER_SIZE;
|
||||||
|
unsigned char *data = g_malloc(VFS_USB_BUFFER_SIZE);
|
||||||
|
|
||||||
|
ep |= LIBUSB_ENDPOINT_IN;
|
||||||
|
|
||||||
|
vdev->transfer = libusb_alloc_transfer(0);
|
||||||
|
vdev->transfer->flags |=
|
||||||
|
LIBUSB_TRANSFER_FREE_TRANSFER | LIBUSB_TRANSFER_FREE_BUFFER;
|
||||||
|
|
||||||
|
/* 0x83 is the only interrupt endpoint */
|
||||||
|
if (ep == EP3_IN)
|
||||||
|
libusb_fill_interrupt_transfer(vdev->transfer, udev, ep, data,
|
||||||
|
len, async_abort_callback, ssm,
|
||||||
|
VFS_USB_ABORT_TIMEOUT);
|
||||||
|
else
|
||||||
|
libusb_fill_bulk_transfer(vdev->transfer, udev, ep, data, len,
|
||||||
|
async_abort_callback, ssm,
|
||||||
|
VFS_USB_ABORT_TIMEOUT);
|
||||||
|
libusb_submit_transfer(vdev->transfer);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Image processing functions */
|
||||||
|
|
||||||
|
/* Pixel getter for fpi_assemble_lines */
|
||||||
|
static unsigned char vfs0050_get_pixel(struct fpi_line_asmbl_ctx *ctx,
|
||||||
|
GSList * line, unsigned int x)
|
||||||
|
{
|
||||||
|
return ((struct vfs_line *)line->data)->data[x];
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Deviation getter for fpi_assemble_lines */
|
||||||
|
static int vfs0050_get_difference(struct fpi_line_asmbl_ctx *ctx,
|
||||||
|
GSList * line_list_1, GSList * line_list_2)
|
||||||
|
{
|
||||||
|
struct vfs_line *line1 = line_list_1->data;
|
||||||
|
struct vfs_line *line2 = line_list_2->data;
|
||||||
|
const int shift = (VFS_IMAGE_WIDTH - VFS_NEXT_LINE_WIDTH) / 2 - 1;
|
||||||
|
int res = 0;
|
||||||
|
for (int i = 0; i < VFS_NEXT_LINE_WIDTH; ++i) {
|
||||||
|
int x =
|
||||||
|
(int)line1->next_line_part[i] - (int)line2->data[shift + i];
|
||||||
|
res += x * x;
|
||||||
|
}
|
||||||
|
return res;
|
||||||
|
}
|
||||||
|
|
||||||
|
#define VFS_NOISE_THRESHOLD 40
|
||||||
|
|
||||||
|
/* Checks whether line is noise or not using hardware parameters */
|
||||||
|
static char is_noise(struct vfs_line *line)
|
||||||
|
{
|
||||||
|
int val1 = line->noise_hash_1;
|
||||||
|
int val2 = line->noise_hash_2;
|
||||||
|
if (val1 > VFS_NOISE_THRESHOLD
|
||||||
|
&& val1 < 256 - VFS_NOISE_THRESHOLD
|
||||||
|
&& val2 > VFS_NOISE_THRESHOLD && val2 < 256 - VFS_NOISE_THRESHOLD)
|
||||||
|
return 1;
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Parameters for fpi_assemble_lines */
|
||||||
|
static struct fpi_line_asmbl_ctx assembling_ctx = {
|
||||||
|
.line_width = VFS_IMAGE_WIDTH,
|
||||||
|
.max_height = VFS_MAX_HEIGHT,
|
||||||
|
.resolution = 10,
|
||||||
|
.median_filter_size = 25,
|
||||||
|
.max_search_offset = 100,
|
||||||
|
.get_deviation = vfs0050_get_difference,
|
||||||
|
.get_pixel = vfs0050_get_pixel,
|
||||||
|
};
|
||||||
|
|
||||||
|
/* Processes image before submitting */
|
||||||
|
static struct fp_img *prepare_image(struct vfs_dev_t *vdev)
|
||||||
|
{
|
||||||
|
int height = vdev->bytes / VFS_LINE_SIZE;
|
||||||
|
|
||||||
|
/* Noise cleaning. IMHO, it works pretty well
|
||||||
|
I've not detected cases when it doesn't work or cuts a part of the finger
|
||||||
|
Noise arises at the end of scan when some water remains on the scanner */
|
||||||
|
while (height > 0) {
|
||||||
|
if (!is_noise(vdev->lines_buffer + height - 1))
|
||||||
|
break;
|
||||||
|
--height;
|
||||||
|
}
|
||||||
|
if (height > VFS_MAX_HEIGHT)
|
||||||
|
height = VFS_MAX_HEIGHT;
|
||||||
|
|
||||||
|
/* If image is not good enough */
|
||||||
|
if (height < VFS_IMAGE_WIDTH)
|
||||||
|
return NULL;
|
||||||
|
|
||||||
|
/* Building GSList */
|
||||||
|
GSList *lines = NULL;
|
||||||
|
for (int i = height - 1; i >= 0; --i)
|
||||||
|
lines = g_slist_prepend(lines, vdev->lines_buffer + i);
|
||||||
|
|
||||||
|
/* Perform line assembling */
|
||||||
|
struct fp_img *img = fpi_assemble_lines(&assembling_ctx, lines, height);
|
||||||
|
|
||||||
|
g_slist_free(lines);
|
||||||
|
return img;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Processes and submits image after fingerprint received */
|
||||||
|
static void submit_image(struct fp_img_dev *idev)
|
||||||
|
{
|
||||||
|
struct vfs_dev_t *vdev = idev->priv;
|
||||||
|
|
||||||
|
/* We were not asked to submit image actually */
|
||||||
|
if (!vdev->active)
|
||||||
|
return;
|
||||||
|
|
||||||
|
struct fp_img *img = prepare_image(vdev);
|
||||||
|
|
||||||
|
if (!img)
|
||||||
|
fpi_imgdev_abort_scan(idev, FP_VERIFY_RETRY_TOO_SHORT);
|
||||||
|
else
|
||||||
|
fpi_imgdev_image_captured(idev, img);
|
||||||
|
|
||||||
|
/* Finger not on the scanner */
|
||||||
|
fpi_imgdev_report_finger_status(idev, 0);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Proto functions */
|
||||||
|
|
||||||
|
/* SSM loop for clear_ep2 */
|
||||||
|
static void clear_ep2_ssm(struct fpi_ssm *ssm)
|
||||||
|
{
|
||||||
|
struct fp_img_dev *idev = ssm->priv;
|
||||||
|
|
||||||
|
short result;
|
||||||
|
char command04 = 0x04;
|
||||||
|
|
||||||
|
switch (ssm->cur_state) {
|
||||||
|
case SUBSM1_COMMAND_04:
|
||||||
|
async_write(ssm, &command04, sizeof(command04));
|
||||||
|
break;
|
||||||
|
|
||||||
|
case SUBSM1_RETURN_CODE:
|
||||||
|
async_read(ssm, 1, &result, sizeof(result));
|
||||||
|
break;
|
||||||
|
|
||||||
|
case SUBSM1_ABORT_2:
|
||||||
|
async_abort(ssm, 2);
|
||||||
|
break;
|
||||||
|
|
||||||
|
default:
|
||||||
|
fp_err("Unknown SUBSM1 state");
|
||||||
|
fpi_imgdev_session_error(idev, -EIO);
|
||||||
|
fpi_ssm_mark_aborted(ssm, -EIO);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Send command to clear EP2 */
|
||||||
|
static void clear_ep2(struct fpi_ssm *ssm)
|
||||||
|
{
|
||||||
|
struct fp_img_dev *idev = ssm->priv;
|
||||||
|
|
||||||
|
struct fpi_ssm *subsm =
|
||||||
|
fpi_ssm_new(idev->dev, clear_ep2_ssm, SUBSM1_STATES);
|
||||||
|
subsm->priv = idev;
|
||||||
|
fpi_ssm_start_subsm(ssm, subsm);
|
||||||
|
}
|
||||||
|
|
||||||
|
static void send_control_packet_ssm(struct fpi_ssm *ssm)
|
||||||
|
{
|
||||||
|
struct fp_img_dev *idev = ssm->priv;
|
||||||
|
struct vfs_dev_t *vdev = idev->priv;
|
||||||
|
|
||||||
|
short result;
|
||||||
|
unsigned char *commit_result = NULL;
|
||||||
|
|
||||||
|
switch (ssm->cur_state) {
|
||||||
|
case SUBSM2_SEND_CONTROL:
|
||||||
|
async_write(ssm, vdev->control_packet, VFS_CONTROL_PACKET_SIZE);
|
||||||
|
break;
|
||||||
|
|
||||||
|
case SUBSM2_RETURN_CODE:
|
||||||
|
async_read(ssm, 1, &result, sizeof(result));
|
||||||
|
break;
|
||||||
|
|
||||||
|
case SUBSM2_SEND_COMMIT:
|
||||||
|
/* next_receive_* packets could be sent only in pair */
|
||||||
|
if (vdev->control_packet == next_receive_1) {
|
||||||
|
vdev->control_packet = next_receive_2;
|
||||||
|
fpi_ssm_jump_to_state(ssm, SUBSM2_SEND_CONTROL);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
/* commit_out in Windows differs in each commit, but I send the same each time */
|
||||||
|
async_write(ssm, commit_out, sizeof(commit_out));
|
||||||
|
break;
|
||||||
|
|
||||||
|
case SUBSM2_COMMIT_RESPONSE:
|
||||||
|
commit_result = g_malloc(VFS_COMMIT_RESPONSE_SIZE);
|
||||||
|
async_read(ssm, 1, commit_result, VFS_COMMIT_RESPONSE_SIZE);
|
||||||
|
break;
|
||||||
|
|
||||||
|
case SUBSM2_READ_EMPTY_INTERRUPT:
|
||||||
|
/* I don't know how to check result, it could be different */
|
||||||
|
g_free(commit_result);
|
||||||
|
|
||||||
|
async_read(ssm, 3, vdev->interrupt, VFS_INTERRUPT_SIZE);
|
||||||
|
break;
|
||||||
|
|
||||||
|
case SUBSM2_ABORT_3:
|
||||||
|
/* Check that interrupt is empty */
|
||||||
|
if (memcmp
|
||||||
|
(vdev->interrupt, empty_interrupt, VFS_INTERRUPT_SIZE)) {
|
||||||
|
fp_err("Unknown SUBSM2 state");
|
||||||
|
fpi_imgdev_session_error(idev, -EIO);
|
||||||
|
fpi_ssm_mark_aborted(ssm, -EIO);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
async_abort(ssm, 3);
|
||||||
|
break;
|
||||||
|
|
||||||
|
case SUBSM2_CLEAR_EP2:
|
||||||
|
/* After turn_on Windows doesn't clear EP2 */
|
||||||
|
if (vdev->control_packet != turn_on)
|
||||||
|
clear_ep2(ssm);
|
||||||
|
else
|
||||||
|
fpi_ssm_next_state(ssm);
|
||||||
|
break;
|
||||||
|
|
||||||
|
default:
|
||||||
|
fp_err("Unknown SUBSM2 state");
|
||||||
|
fpi_imgdev_session_error(idev, -EIO);
|
||||||
|
fpi_ssm_mark_aborted(ssm, -EIO);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Send device state control packet */
|
||||||
|
static void send_control_packet(struct fpi_ssm *ssm)
|
||||||
|
{
|
||||||
|
struct fp_img_dev *idev = ssm->priv;
|
||||||
|
|
||||||
|
struct fpi_ssm *subsm =
|
||||||
|
fpi_ssm_new(idev->dev, send_control_packet_ssm, SUBSM2_STATES);
|
||||||
|
subsm->priv = idev;
|
||||||
|
fpi_ssm_start_subsm(ssm, subsm);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Clears all fprint data */
|
||||||
|
static void clear_data(struct vfs_dev_t *vdev)
|
||||||
|
{
|
||||||
|
g_free(vdev->lines_buffer);
|
||||||
|
vdev->lines_buffer = NULL;
|
||||||
|
vdev->memory = vdev->bytes = 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* After receiving interrupt from EP3 */
|
||||||
|
static void interrupt_callback(struct libusb_transfer *transfer)
|
||||||
|
{
|
||||||
|
struct fpi_ssm *ssm = transfer->user_data;
|
||||||
|
struct fp_img_dev *idev = ssm->priv;
|
||||||
|
struct vfs_dev_t *vdev = idev->priv;
|
||||||
|
|
||||||
|
char *interrupt = vdev->interrupt;
|
||||||
|
int error = transfer->status, transferred = transfer->actual_length;
|
||||||
|
|
||||||
|
vdev->wait_interrupt = 0;
|
||||||
|
|
||||||
|
/* When we have cancelled transfer, error is ok actually */
|
||||||
|
if (!vdev->active && error == LIBUSB_TRANSFER_CANCELLED)
|
||||||
|
return;
|
||||||
|
|
||||||
|
if (error != 0) {
|
||||||
|
fp_err("USB read interrupt transfer: %s",
|
||||||
|
libusb_error_name(error));
|
||||||
|
fpi_imgdev_session_error(idev, -EIO);
|
||||||
|
fpi_ssm_mark_aborted(ssm, -EIO);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Interrupt size is VFS_INTERRUPT_SIZE bytes in all known cases */
|
||||||
|
if (transferred != VFS_INTERRUPT_SIZE) {
|
||||||
|
fp_err("Unknown interrupt size %d", transferred);
|
||||||
|
/* Abort ssm */
|
||||||
|
fpi_imgdev_session_error(idev, -EIO);
|
||||||
|
fpi_ssm_mark_aborted(ssm, -EIO);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Standard interrupts */
|
||||||
|
if (memcmp(interrupt, interrupt1, VFS_INTERRUPT_SIZE) == 0 ||
|
||||||
|
memcmp(interrupt, interrupt2, VFS_INTERRUPT_SIZE) == 0 ||
|
||||||
|
memcmp(interrupt, interrupt3, VFS_INTERRUPT_SIZE) == 0) {
|
||||||
|
/* Go to the next ssm stage */
|
||||||
|
fpi_ssm_next_state(ssm);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* When finger is on the scanner before turn_on */
|
||||||
|
if (interrupt[0] == 0x01) {
|
||||||
|
fp_warn("Finger is already on the scanner");
|
||||||
|
|
||||||
|
/* Go to the next ssm stage */
|
||||||
|
fpi_ssm_next_state(ssm);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Unknown interrupt; abort the session */
|
||||||
|
fp_err("Unknown interrupt '%02x:%02x:%02x:%02x:%02x'!",
|
||||||
|
interrupt[0] & 0xff, interrupt[1] & 0xff, interrupt[2] & 0xff,
|
||||||
|
interrupt[3] & 0xff, interrupt[4] & 0xff);
|
||||||
|
|
||||||
|
/* Abort ssm */
|
||||||
|
fpi_imgdev_session_error(idev, -EIO);
|
||||||
|
fpi_ssm_mark_aborted(ssm, -EIO);
|
||||||
|
}
|
||||||
|
|
||||||
|
static void receive_callback(struct libusb_transfer *transfer)
|
||||||
|
{
|
||||||
|
struct fpi_ssm *ssm = transfer->user_data;
|
||||||
|
struct fp_img_dev *idev = ssm->priv;
|
||||||
|
struct vfs_dev_t *vdev = idev->priv;
|
||||||
|
|
||||||
|
int transferred = transfer->actual_length, error = transfer->status;
|
||||||
|
|
||||||
|
if (error != 0 && error != LIBUSB_TRANSFER_TIMED_OUT) {
|
||||||
|
fp_err("USB read transfer: %s", libusb_error_name(error));
|
||||||
|
|
||||||
|
fpi_imgdev_session_error(idev, -EIO);
|
||||||
|
fpi_ssm_mark_aborted(ssm, -EIO);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Check if fingerprint data is over */
|
||||||
|
if (transferred == 0) {
|
||||||
|
fpi_ssm_next_state(ssm);
|
||||||
|
} else {
|
||||||
|
vdev->bytes += transferred;
|
||||||
|
|
||||||
|
/* We need more data */
|
||||||
|
fpi_ssm_jump_to_state(ssm, ssm->cur_state);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Stub to keep SSM alive when waiting an interrupt */
|
||||||
|
static void wait_interrupt(void *data)
|
||||||
|
{
|
||||||
|
struct fpi_ssm *ssm = data;
|
||||||
|
struct fp_img_dev *idev = ssm->priv;
|
||||||
|
struct vfs_dev_t *vdev = idev->priv;
|
||||||
|
|
||||||
|
/* Keep sleeping while this flag is on */
|
||||||
|
if (vdev->wait_interrupt)
|
||||||
|
fpi_ssm_jump_to_state(ssm, ssm->cur_state);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* SSM stub to prepare device to another scan after orange light was on */
|
||||||
|
static void another_scan(void *data)
|
||||||
|
{
|
||||||
|
struct fpi_ssm *ssm = data;
|
||||||
|
fpi_ssm_jump_to_state(ssm, SSM_TURN_ON);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Another SSM stub to continue after waiting for probable vdev->active changes */
|
||||||
|
static void scan_completed(void *data)
|
||||||
|
{
|
||||||
|
struct fpi_ssm *ssm = data;
|
||||||
|
fpi_ssm_next_state(ssm);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Main SSM loop */
|
||||||
|
static void activate_ssm(struct fpi_ssm *ssm)
|
||||||
|
{
|
||||||
|
struct fp_img_dev *idev = ssm->priv;
|
||||||
|
struct libusb_device_handle *udev = idev->udev;
|
||||||
|
struct vfs_dev_t *vdev = idev->priv;
|
||||||
|
|
||||||
|
switch (ssm->cur_state) {
|
||||||
|
case SSM_INITIAL_ABORT_1:
|
||||||
|
async_abort(ssm, 1);
|
||||||
|
break;
|
||||||
|
|
||||||
|
case SSM_INITIAL_ABORT_2:
|
||||||
|
async_abort(ssm, 2);
|
||||||
|
break;
|
||||||
|
|
||||||
|
case SSM_INITIAL_ABORT_3:
|
||||||
|
async_abort(ssm, 3);
|
||||||
|
break;
|
||||||
|
|
||||||
|
case SSM_CLEAR_EP2:
|
||||||
|
clear_ep2(ssm);
|
||||||
|
break;
|
||||||
|
|
||||||
|
case SSM_TURN_OFF:
|
||||||
|
/* Set control_packet argument */
|
||||||
|
vdev->control_packet = turn_off;
|
||||||
|
|
||||||
|
send_control_packet(ssm);
|
||||||
|
break;
|
||||||
|
|
||||||
|
case SSM_TURN_ON:
|
||||||
|
if (!vdev->active) {
|
||||||
|
/* The only correct exit */
|
||||||
|
fpi_ssm_mark_completed(ssm);
|
||||||
|
|
||||||
|
if (vdev->need_report) {
|
||||||
|
fpi_imgdev_deactivate_complete(idev);
|
||||||
|
vdev->need_report = 0;
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
/* Set control_packet argument */
|
||||||
|
vdev->control_packet = turn_on;
|
||||||
|
|
||||||
|
send_control_packet(ssm);
|
||||||
|
break;
|
||||||
|
|
||||||
|
case SSM_ASK_INTERRUPT:
|
||||||
|
/* Activated, light must be blinking now */
|
||||||
|
|
||||||
|
/* If we first time here, report that activate completed */
|
||||||
|
if (vdev->need_report) {
|
||||||
|
fpi_imgdev_activate_complete(idev, 0);
|
||||||
|
vdev->need_report = 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Asyncronously enquire an interrupt */
|
||||||
|
vdev->transfer = libusb_alloc_transfer(0);
|
||||||
|
vdev->transfer->flags |= LIBUSB_TRANSFER_FREE_TRANSFER;
|
||||||
|
libusb_fill_interrupt_transfer(vdev->transfer, udev, 0x83,
|
||||||
|
vdev->interrupt,
|
||||||
|
VFS_INTERRUPT_SIZE,
|
||||||
|
interrupt_callback, ssm, 0);
|
||||||
|
libusb_submit_transfer(vdev->transfer);
|
||||||
|
|
||||||
|
/* This flag could be turned off only in callback function */
|
||||||
|
vdev->wait_interrupt = 1;
|
||||||
|
|
||||||
|
/* I've put it here to be sure that data is cleared */
|
||||||
|
clear_data(vdev);
|
||||||
|
|
||||||
|
fpi_ssm_next_state(ssm);
|
||||||
|
break;
|
||||||
|
|
||||||
|
case SSM_WAIT_INTERRUPT:
|
||||||
|
/* Check if user had interrupted the process */
|
||||||
|
if (!vdev->active) {
|
||||||
|
libusb_cancel_transfer(vdev->transfer);
|
||||||
|
fpi_ssm_jump_to_state(ssm, SSM_CLEAR_EP2);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (vdev->wait_interrupt)
|
||||||
|
fpi_timeout_add(VFS_SSM_TIMEOUT, wait_interrupt, ssm);
|
||||||
|
break;
|
||||||
|
|
||||||
|
case SSM_RECEIVE_FINGER:
|
||||||
|
if (vdev->memory == 0) {
|
||||||
|
/* Initialize fingerprint buffer */
|
||||||
|
g_free(vdev->lines_buffer);
|
||||||
|
vdev->memory = VFS_USB_BUFFER_SIZE;
|
||||||
|
vdev->lines_buffer = g_malloc(vdev->memory);
|
||||||
|
vdev->bytes = 0;
|
||||||
|
|
||||||
|
/* Finger is on the scanner */
|
||||||
|
fpi_imgdev_report_finger_status(idev, 1);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Increase buffer size while it's insufficient */
|
||||||
|
while (vdev->bytes + VFS_USB_BUFFER_SIZE > vdev->memory) {
|
||||||
|
vdev->memory <<= 1;
|
||||||
|
vdev->lines_buffer =
|
||||||
|
(struct vfs_line *)g_realloc(vdev->lines_buffer,
|
||||||
|
vdev->memory);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Receive chunk of data */
|
||||||
|
vdev->transfer = libusb_alloc_transfer(0);
|
||||||
|
vdev->transfer->flags |= LIBUSB_TRANSFER_FREE_TRANSFER;
|
||||||
|
libusb_fill_bulk_transfer(vdev->transfer, udev, 0x82,
|
||||||
|
(void *)vdev->lines_buffer +
|
||||||
|
vdev->bytes, VFS_USB_BUFFER_SIZE,
|
||||||
|
receive_callback, ssm,
|
||||||
|
VFS_USB_TIMEOUT);
|
||||||
|
libusb_submit_transfer(vdev->transfer);
|
||||||
|
break;
|
||||||
|
|
||||||
|
case SSM_SUBMIT_IMAGE:
|
||||||
|
submit_image(idev);
|
||||||
|
clear_data(vdev);
|
||||||
|
|
||||||
|
/* Wait for probable vdev->active changing */
|
||||||
|
fpi_timeout_add(VFS_SSM_TIMEOUT, scan_completed, ssm);
|
||||||
|
break;
|
||||||
|
|
||||||
|
case SSM_NEXT_RECEIVE:
|
||||||
|
if (!vdev->active) {
|
||||||
|
/* It's the last scan */
|
||||||
|
fpi_ssm_jump_to_state(ssm, SSM_CLEAR_EP2);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Set control_packet argument */
|
||||||
|
vdev->control_packet = next_receive_1;
|
||||||
|
|
||||||
|
send_control_packet(ssm);
|
||||||
|
break;
|
||||||
|
|
||||||
|
case SSM_WAIT_ANOTHER_SCAN:
|
||||||
|
/* Orange light is on now */
|
||||||
|
fpi_timeout_add(VFS_SSM_ORANGE_TIMEOUT, another_scan, ssm);
|
||||||
|
break;
|
||||||
|
|
||||||
|
default:
|
||||||
|
fp_err("Unknown state");
|
||||||
|
fpi_imgdev_session_error(idev, -EIO);
|
||||||
|
fpi_ssm_mark_aborted(ssm, -EIO);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Driver functions */
|
||||||
|
|
||||||
|
/* Callback for dev_activate ssm */
|
||||||
|
static void dev_activate_callback(struct fpi_ssm *ssm)
|
||||||
|
{
|
||||||
|
struct fp_img_dev *idev = ssm->priv;
|
||||||
|
struct vfs_dev_t *vdev = idev->priv;
|
||||||
|
|
||||||
|
vdev->ssm_active = 0;
|
||||||
|
|
||||||
|
fpi_ssm_free(ssm);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Activate device */
|
||||||
|
static int dev_activate(struct fp_img_dev *idev, enum fp_imgdev_state state)
|
||||||
|
{
|
||||||
|
struct vfs_dev_t *vdev = idev->priv;
|
||||||
|
|
||||||
|
/* Initialize flags */
|
||||||
|
vdev->active = 1;
|
||||||
|
vdev->need_report = 1;
|
||||||
|
vdev->ssm_active = 1;
|
||||||
|
|
||||||
|
struct fpi_ssm *ssm = fpi_ssm_new(idev->dev, activate_ssm, SSM_STATES);
|
||||||
|
ssm->priv = idev;
|
||||||
|
fpi_ssm_start(ssm, dev_activate_callback);
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Deactivate device */
|
||||||
|
static void dev_deactivate(struct fp_img_dev *idev)
|
||||||
|
{
|
||||||
|
struct vfs_dev_t *vdev = idev->priv;
|
||||||
|
|
||||||
|
if (!vdev->ssm_active) {
|
||||||
|
fpi_imgdev_deactivate_complete(idev);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Initialize flags */
|
||||||
|
vdev->active = 0;
|
||||||
|
vdev->need_report = 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Callback for dev_open ssm */
|
||||||
|
static void dev_open_callback(struct fpi_ssm *ssm)
|
||||||
|
{
|
||||||
|
/* Notify open complete */
|
||||||
|
fpi_imgdev_open_complete((struct fp_img_dev *)ssm->priv, 0);
|
||||||
|
fpi_ssm_free(ssm);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Open device */
|
||||||
|
static int dev_open(struct fp_img_dev *idev, unsigned long driver_data)
|
||||||
|
{
|
||||||
|
/* Claim usb interface */
|
||||||
|
int error = libusb_claim_interface(idev->udev, 0);
|
||||||
|
if (error < 0) {
|
||||||
|
/* Interface not claimed, return error */
|
||||||
|
fp_err("could not claim interface 0");
|
||||||
|
return error;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Initialize private structure */
|
||||||
|
struct vfs_dev_t *vdev = g_malloc0(sizeof(struct vfs_dev_t));
|
||||||
|
idev->priv = vdev;
|
||||||
|
|
||||||
|
/* Clearing previous device state */
|
||||||
|
struct fpi_ssm *ssm = fpi_ssm_new(idev->dev, activate_ssm, SSM_STATES);
|
||||||
|
ssm->priv = idev;
|
||||||
|
fpi_ssm_start(ssm, dev_open_callback);
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Close device */
|
||||||
|
static void dev_close(struct fp_img_dev *idev)
|
||||||
|
{
|
||||||
|
/* Release private structure */
|
||||||
|
g_free(idev->priv);
|
||||||
|
|
||||||
|
/* Release usb interface */
|
||||||
|
libusb_release_interface(idev->udev, 0);
|
||||||
|
|
||||||
|
/* Notify close complete */
|
||||||
|
fpi_imgdev_close_complete(idev);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Usb id table of device */
|
||||||
|
static const struct usb_id id_table[] = {
|
||||||
|
{.vendor = 0x138a,.product = 0x0050},
|
||||||
|
{0, 0, 0,},
|
||||||
|
};
|
||||||
|
|
||||||
|
/* Device driver definition */
|
||||||
|
struct fp_img_driver vfs0050_driver = {
|
||||||
|
/* Driver specification */
|
||||||
|
.driver = {
|
||||||
|
.id = VFS0050_ID,
|
||||||
|
.name = FP_COMPONENT,
|
||||||
|
.full_name = "Validity VFS0050",
|
||||||
|
.id_table = id_table,
|
||||||
|
.scan_type = FP_SCAN_TYPE_SWIPE,
|
||||||
|
},
|
||||||
|
|
||||||
|
/* Image specification */
|
||||||
|
.flags = 0,
|
||||||
|
.img_width = VFS_IMAGE_WIDTH,
|
||||||
|
.img_height = -1,
|
||||||
|
.bz3_threshold = 24,
|
||||||
|
|
||||||
|
/* Routine specification */
|
||||||
|
.open = dev_open,
|
||||||
|
.close = dev_close,
|
||||||
|
.activate = dev_activate,
|
||||||
|
.deactivate = dev_deactivate,
|
||||||
|
};
|
||||||
@@ -0,0 +1,382 @@
|
|||||||
|
/*
|
||||||
|
* Validity VFS0050 driver for libfprint
|
||||||
|
* Copyright (C) 2015-2016 Konstantin Semenov <zemen17@gmail.com>
|
||||||
|
*
|
||||||
|
* This library is free software; you can redistribute it and/or
|
||||||
|
* modify it under the terms of the GNU Lesser General Public
|
||||||
|
* License as published by the Free Software Foundation; either
|
||||||
|
* version 2.1 of the License, or (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This library is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
|
* Lesser General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU Lesser General Public
|
||||||
|
* License along with this library; if not, write to the Free Software
|
||||||
|
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||||
|
*/
|
||||||
|
|
||||||
|
/* Timeout for all send/recv operations, except interrupt waiting and abort */
|
||||||
|
#define VFS_USB_TIMEOUT 100
|
||||||
|
/* Timeout for usb abort */
|
||||||
|
#define VFS_USB_ABORT_TIMEOUT 20
|
||||||
|
/* Default timeout for SSM timers */
|
||||||
|
#define VFS_SSM_TIMEOUT 100
|
||||||
|
/* Timeout for orange light */
|
||||||
|
#define VFS_SSM_ORANGE_TIMEOUT 400
|
||||||
|
/* Buffer size for abort and fprint receiving */
|
||||||
|
#define VFS_USB_BUFFER_SIZE 65536
|
||||||
|
|
||||||
|
/* Line size from scanner including metainformation: line number, narrow stripe from the center, etc */
|
||||||
|
#define VFS_LINE_SIZE 148
|
||||||
|
/* Width of narrow stripe from the center */
|
||||||
|
#define VFS_NEXT_LINE_WIDTH 32
|
||||||
|
/* Image width from scanner */
|
||||||
|
#define VFS_IMAGE_WIDTH 100
|
||||||
|
/* Maximum image height after assembling */
|
||||||
|
#define VFS_MAX_HEIGHT 3000
|
||||||
|
|
||||||
|
/* Size of control packets: turn_on, turn_off, next_receive_* */
|
||||||
|
#define VFS_CONTROL_PACKET_SIZE 125
|
||||||
|
/* Size of result of commit */
|
||||||
|
#define VFS_COMMIT_RESPONSE_SIZE 1106
|
||||||
|
/* Size of interrupt from EP3 */
|
||||||
|
#define VFS_INTERRUPT_SIZE 5
|
||||||
|
/* EP3 endpoint */
|
||||||
|
#define EP3_IN 0x83
|
||||||
|
|
||||||
|
/* Fingerprint horizontal line */
|
||||||
|
struct vfs_line {
|
||||||
|
/* It must be always 0x01 */
|
||||||
|
unsigned char _0x01;
|
||||||
|
/* It must be always 0xfe */
|
||||||
|
unsigned char _0xfe;
|
||||||
|
|
||||||
|
/* line number starting from some number in Little-Endian */
|
||||||
|
unsigned short id;
|
||||||
|
|
||||||
|
/* Some hashes which are useful to detect noise */
|
||||||
|
unsigned char noise_hash_1;
|
||||||
|
unsigned char noise_hash_2;
|
||||||
|
|
||||||
|
/* The first byte of _somedata is always 0x00, the second is strange useless cyclic line number */
|
||||||
|
unsigned short _somedata;
|
||||||
|
|
||||||
|
/* Fingerprint image */
|
||||||
|
unsigned char data[VFS_IMAGE_WIDTH];
|
||||||
|
|
||||||
|
/* Narrow fingerprint part from the center used for variable speed lines assembling */
|
||||||
|
unsigned char next_line_part[VFS_NEXT_LINE_WIDTH];
|
||||||
|
|
||||||
|
/* scan_data is 0xfb except some rare cases, it's skipped */
|
||||||
|
unsigned char scan_data[8];
|
||||||
|
} __attribute__ ((__packed__));
|
||||||
|
|
||||||
|
/* The main driver structure */
|
||||||
|
struct vfs_dev_t {
|
||||||
|
/* One if we were asked to read fingerprint, zero otherwise */
|
||||||
|
char active;
|
||||||
|
|
||||||
|
/* Control packet parameter for send_control_packet */
|
||||||
|
unsigned char *control_packet;
|
||||||
|
|
||||||
|
/* For dev_deactivate to check whether ssm still running or not */
|
||||||
|
char ssm_active;
|
||||||
|
|
||||||
|
/* Current async transfer */
|
||||||
|
struct libusb_transfer *transfer;
|
||||||
|
|
||||||
|
/* Should we call fpi_imgdev_activate_complete or fpi_imgdev_deactivate_complete */
|
||||||
|
char need_report;
|
||||||
|
|
||||||
|
/* Should we wait more for interrupt */
|
||||||
|
char wait_interrupt;
|
||||||
|
|
||||||
|
/* Received fingerprint raw lines */
|
||||||
|
struct vfs_line *lines_buffer;
|
||||||
|
|
||||||
|
/* Current number of received bytes and current memory used by data */
|
||||||
|
int bytes, memory;
|
||||||
|
|
||||||
|
/* USB buffer for fingerprint */
|
||||||
|
char *usb_buffer;
|
||||||
|
|
||||||
|
/* Received interrupt data */
|
||||||
|
unsigned char interrupt[8];
|
||||||
|
};
|
||||||
|
|
||||||
|
/* SSM states for clear_ep2 */
|
||||||
|
enum SUBSM1 {
|
||||||
|
SUBSM1_COMMAND_04,
|
||||||
|
SUBSM1_RETURN_CODE,
|
||||||
|
SUBSM1_ABORT_2,
|
||||||
|
|
||||||
|
SUBSM1_STATES,
|
||||||
|
};
|
||||||
|
|
||||||
|
/* SSM states for control */
|
||||||
|
enum SUBSM2 {
|
||||||
|
SUBSM2_SEND_CONTROL,
|
||||||
|
SUBSM2_RETURN_CODE, /* If next_receive, send another control packet */
|
||||||
|
|
||||||
|
SUBSM2_SEND_COMMIT,
|
||||||
|
SUBSM2_COMMIT_RESPONSE,
|
||||||
|
SUBSM2_READ_EMPTY_INTERRUPT,
|
||||||
|
SUBSM2_ABORT_3,
|
||||||
|
SUBSM2_CLEAR_EP2,
|
||||||
|
|
||||||
|
SUBSM2_STATES,
|
||||||
|
};
|
||||||
|
|
||||||
|
/* SSM states for activate_ssm */
|
||||||
|
enum SSM_STATE {
|
||||||
|
SSM_INITIAL_ABORT_1,
|
||||||
|
SSM_INITIAL_ABORT_2,
|
||||||
|
SSM_INITIAL_ABORT_3,
|
||||||
|
SSM_CLEAR_EP2,
|
||||||
|
SSM_TURN_OFF,
|
||||||
|
|
||||||
|
/* Here the device is turned off; if not active, complete ssm */
|
||||||
|
SSM_TURN_ON,
|
||||||
|
|
||||||
|
SSM_ASK_INTERRUPT,
|
||||||
|
SSM_WAIT_INTERRUPT,
|
||||||
|
|
||||||
|
SSM_RECEIVE_FINGER,
|
||||||
|
SSM_SUBMIT_IMAGE,
|
||||||
|
|
||||||
|
/* If not active, jump to CLEAR_EP2 */
|
||||||
|
SSM_NEXT_RECEIVE,
|
||||||
|
SSM_WAIT_ANOTHER_SCAN,
|
||||||
|
/* Jump to TURN_ON */
|
||||||
|
|
||||||
|
SSM_STATES
|
||||||
|
};
|
||||||
|
|
||||||
|
/* Blocks of data from USB sniffer */
|
||||||
|
|
||||||
|
/* Turns on the light */
|
||||||
|
static unsigned char turn_on[] = {
|
||||||
|
0x39, 0x20, 0xBF, 0x02, 0x00, 0xF4, 0x01, 0x00, 0x00, 0x01, 0xD1, 0x00,
|
||||||
|
0x20, 0xD1, 0xD1, 0x00,
|
||||||
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xF4, 0x01, 0x00,
|
||||||
|
0x00, 0x01, 0x00, 0x00,
|
||||||
|
0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
|
0x00, 0xF4, 0x01, 0x00,
|
||||||
|
0x00, 0x02, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
|
0x00, 0x00, 0x00, 0x00,
|
||||||
|
0x00, 0xF4, 0x01, 0x00, 0x00, 0x02, 0xD1, 0x00, 0x20, 0x00, 0x00, 0x00,
|
||||||
|
0x00, 0x00, 0x00, 0x00,
|
||||||
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
|
0x00, 0x00, 0x00, 0x00,
|
||||||
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
|
0x00, 0x00, 0x00, 0x00,
|
||||||
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
|
0x00,
|
||||||
|
};
|
||||||
|
|
||||||
|
/* Power off */
|
||||||
|
static unsigned char turn_off[] = {
|
||||||
|
0x39, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
|
0x00, 0x00, 0x00, 0x00,
|
||||||
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
|
0x00, 0x00, 0x00, 0x00,
|
||||||
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
|
0x00, 0x00, 0x00, 0x00,
|
||||||
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
|
0x00, 0x00, 0x00, 0x00,
|
||||||
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
|
0x00, 0x00, 0x00, 0x00,
|
||||||
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
|
0x00, 0x00, 0x00, 0x00,
|
||||||
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
|
0x00, 0x00, 0x00, 0x00,
|
||||||
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
|
0x00,
|
||||||
|
};
|
||||||
|
|
||||||
|
/* Turns on orange light */
|
||||||
|
static unsigned char next_receive_1[] = {
|
||||||
|
0x39, 0xB8, 0x0B, 0x00, 0x00, 0xB8, 0x0B, 0x00, 0x00, 0x01, 0xD1, 0x00,
|
||||||
|
0x20, 0x00, 0x00, 0x00,
|
||||||
|
0x00, 0x00, 0x00, 0x00, 0x00, 0xD1, 0xD1, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
|
0x00, 0x01, 0x00, 0x00,
|
||||||
|
0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
|
0x00, 0x00, 0x00, 0x00,
|
||||||
|
0x00, 0x02, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
|
0x00, 0x00, 0x00, 0x00,
|
||||||
|
0x00, 0xB8, 0x0B, 0x00, 0x00, 0x02, 0xD1, 0x00, 0x20, 0x00, 0x00, 0x00,
|
||||||
|
0x00, 0x00, 0x00, 0x00,
|
||||||
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
|
0x00, 0x00, 0x00, 0x00,
|
||||||
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
|
0x00, 0x00, 0x00, 0x00,
|
||||||
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
|
0x00,
|
||||||
|
};
|
||||||
|
|
||||||
|
/* Packet directly after next_receive_1 */
|
||||||
|
static unsigned char next_receive_2[] = {
|
||||||
|
0x39, 0xE8, 0x03, 0x00, 0x00, 0xE8, 0x03, 0x00, 0x00, 0x01, 0xD1, 0x00,
|
||||||
|
0x20, 0x00, 0x00, 0x00,
|
||||||
|
0x00, 0x00, 0x00, 0x00, 0x00, 0xD1, 0xD1, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
|
0x00, 0x01, 0x00, 0x00,
|
||||||
|
0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
|
0x00, 0x00, 0x00, 0x00,
|
||||||
|
0x00, 0x02, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
|
0x00, 0x00, 0x00, 0x00,
|
||||||
|
0x00, 0xE8, 0x03, 0x00, 0x00, 0x02, 0xD1, 0x00, 0x20, 0x00, 0x00, 0x00,
|
||||||
|
0x00, 0x00, 0x00, 0x00,
|
||||||
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
|
0x00, 0x00, 0x00, 0x00,
|
||||||
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
|
0x00, 0x00, 0x00, 0x00,
|
||||||
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
|
0x00,
|
||||||
|
};
|
||||||
|
|
||||||
|
/* Commit message */
|
||||||
|
static unsigned char commit_out[] = {
|
||||||
|
0x02, 0x94, 0x00, 0x00, 0x00, 0x20, 0x00, 0x08, 0x00, 0x2C, 0x03, 0x00,
|
||||||
|
0x30, 0x1B, 0x00, 0x00,
|
||||||
|
0x00, 0x20, 0x00, 0x08, 0x00, 0x20, 0x03, 0x00, 0x30, 0x3D, 0x10, 0x00,
|
||||||
|
0x00, 0x20, 0x00, 0x08,
|
||||||
|
0x00, 0x18, 0x03, 0x00, 0x30, 0x00, 0x00, 0x00, 0x00, 0x20, 0x00, 0x08,
|
||||||
|
0x00, 0x24, 0x03, 0x00,
|
||||||
|
0x30, 0x08, 0x00, 0x00, 0x00, 0x20, 0x00, 0x08, 0x00, 0x28, 0x03, 0x00,
|
||||||
|
0x30, 0x08, 0x00, 0x00,
|
||||||
|
0x00, 0x20, 0x00, 0x08, 0x00, 0x30, 0x03, 0x00, 0x30, 0x00, 0x00, 0x00,
|
||||||
|
0x00, 0x20, 0x00, 0x08,
|
||||||
|
0x00, 0x38, 0x03, 0x00, 0x30, 0x00, 0x00, 0x00, 0x00, 0x20, 0x00, 0x08,
|
||||||
|
0x00, 0x3C, 0x03, 0x00,
|
||||||
|
0x30, 0x00, 0x00, 0x00, 0x00, 0x20, 0x00, 0x08, 0x00, 0x44, 0x03, 0x00,
|
||||||
|
0x30, 0x14, 0x00, 0x00,
|
||||||
|
0x00, 0x20, 0x00, 0x08, 0x00, 0x48, 0x03, 0x00, 0x30, 0x01, 0x04, 0x02,
|
||||||
|
0x00, 0x20, 0x00, 0x08,
|
||||||
|
0x00, 0x4C, 0x03, 0x00, 0x30, 0x01, 0x0C, 0x02, 0x00, 0x20, 0x00, 0x08,
|
||||||
|
0x00, 0x54, 0x03, 0x00,
|
||||||
|
0x30, 0x20, 0x00, 0x00, 0x00, 0x20, 0x00, 0x08, 0x00, 0x5C, 0x03, 0x00,
|
||||||
|
0x30, 0x90, 0x01, 0x02,
|
||||||
|
0x00, 0x20, 0x00, 0x08, 0x00, 0x60, 0x03, 0x00, 0x30, 0x2C, 0x01, 0x19,
|
||||||
|
0x00, 0x20, 0x00, 0x08,
|
||||||
|
0x00, 0x64, 0x03, 0x00, 0x30, 0x00, 0x00, 0x00, 0x00, 0x20, 0x00, 0x08,
|
||||||
|
0x00, 0x6C, 0x03, 0x00,
|
||||||
|
0x30, 0x1E, 0x00, 0x00, 0x00, 0x20, 0x00, 0x08, 0x00, 0x70, 0x03, 0x00,
|
||||||
|
0x30, 0x21, 0x80, 0x00,
|
||||||
|
0x00, 0x20, 0x00, 0x08, 0x00, 0x78, 0x03, 0x00, 0x30, 0x09, 0x00, 0x02,
|
||||||
|
0x00, 0x20, 0x00, 0x08,
|
||||||
|
0x00, 0x7C, 0x03, 0x00, 0x30, 0x0B, 0x00, 0x19, 0x00, 0x20, 0x00, 0x08,
|
||||||
|
0x00, 0x80, 0x03, 0x00,
|
||||||
|
0x30, 0x00, 0x00, 0x00, 0x00, 0x20, 0x00, 0x08, 0x00, 0x84, 0x03, 0x00,
|
||||||
|
0x30, 0x3A, 0x00, 0x00,
|
||||||
|
0x00, 0x20, 0x00, 0x08, 0x00, 0x88, 0x03, 0x00, 0x30, 0x14, 0x00, 0x00,
|
||||||
|
0x00, 0x20, 0x00, 0x08,
|
||||||
|
0x00, 0x8C, 0x03, 0x00, 0x30, 0x02, 0x00, 0x00, 0x00, 0x20, 0x00, 0x08,
|
||||||
|
0x00, 0x90, 0x03, 0x00,
|
||||||
|
0x30, 0x02, 0x00, 0x00, 0x00, 0x20, 0x00, 0x08, 0x00, 0x94, 0x03, 0x00,
|
||||||
|
0x30, 0x08, 0x00, 0x00,
|
||||||
|
0x00, 0x20, 0x00, 0x08, 0x00, 0x98, 0x03, 0x00, 0x30, 0x00, 0x00, 0xA1,
|
||||||
|
0x01, 0x20, 0x00, 0x08,
|
||||||
|
0x00, 0x9C, 0x03, 0x00, 0x30, 0x00, 0x00, 0xA1, 0x01, 0x20, 0x00, 0x08,
|
||||||
|
0x00, 0xA8, 0x03, 0x00,
|
||||||
|
0x30, 0x64, 0x01, 0x00, 0x00, 0x20, 0x00, 0x08, 0x00, 0xAC, 0x03, 0x00,
|
||||||
|
0x30, 0x64, 0x01, 0x00,
|
||||||
|
0x00, 0x20, 0x00, 0x08, 0x00, 0xB0, 0x03, 0x00, 0x30, 0x00, 0x01, 0x00,
|
||||||
|
0x00, 0x20, 0x00, 0x08,
|
||||||
|
0x00, 0xB4, 0x03, 0x00, 0x30, 0x00, 0x01, 0x00, 0x00, 0x20, 0x00, 0x08,
|
||||||
|
0x00, 0xB8, 0x03, 0x00,
|
||||||
|
0x30, 0x05, 0x00, 0x00, 0x00, 0x20, 0x00, 0x08, 0x00, 0xBC, 0x03, 0x00,
|
||||||
|
0x30, 0x05, 0x00, 0x00,
|
||||||
|
0x00, 0x20, 0x00, 0x08, 0x00, 0xC0, 0x03, 0x00, 0x30, 0x00, 0x00, 0x00,
|
||||||
|
0x00, 0x20, 0x00, 0x08,
|
||||||
|
0x00, 0x84, 0x03, 0x00, 0x30, 0x3B, 0x00, 0x00, 0x00, 0x20, 0x00, 0x08,
|
||||||
|
0x00, 0x08, 0x07, 0x00,
|
||||||
|
0x30, 0x03, 0x00, 0x00, 0x00, 0x20, 0x00, 0x08, 0x00, 0x0C, 0x07, 0x00,
|
||||||
|
0x30, 0x00, 0x00, 0x00,
|
||||||
|
0x00, 0x20, 0x00, 0x08, 0x00, 0x14, 0x07, 0x00, 0x30, 0x20, 0x00, 0x00,
|
||||||
|
0x00, 0x20, 0x00, 0x08,
|
||||||
|
0x00, 0x1C, 0x07, 0x00, 0x30, 0x1A, 0x00, 0x00, 0x00, 0x20, 0x00, 0x08,
|
||||||
|
0x00, 0x70, 0x0D, 0x00,
|
||||||
|
0x30, 0x01, 0x00, 0x00, 0x00, 0x25, 0x00, 0x28, 0x00, 0x10, 0x00, 0x00,
|
||||||
|
0x00, 0x00, 0x00, 0x00,
|
||||||
|
0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
|
0x00, 0x00, 0x00, 0x00,
|
||||||
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
|
0x00, 0x00, 0x00, 0x00,
|
||||||
|
0x00, 0x02, 0x00, 0x90, 0x00, 0x00, 0x00, 0x2B, 0xFF, 0x2B, 0xFF, 0x2B,
|
||||||
|
0xED, 0x00, 0x00, 0x2B,
|
||||||
|
0xFB, 0x00, 0x00, 0x2B, 0xC5, 0x00, 0x00, 0x2B, 0x05, 0x80, 0x70, 0x00,
|
||||||
|
0x00, 0x00, 0x00, 0x00,
|
||||||
|
0x00, 0x24, 0xD3, 0x2E, 0xC0, 0x2C, 0x3B, 0x08, 0xF0, 0x3B, 0x09, 0x24,
|
||||||
|
0xBB, 0x3B, 0x0B, 0x24,
|
||||||
|
0xAA, 0x3B, 0x1F, 0xF8, 0x00, 0x3B, 0x3F, 0xF0, 0x00, 0x3B, 0x35, 0xC0,
|
||||||
|
0x00, 0x38, 0x80, 0x2C,
|
||||||
|
0x00, 0x70, 0x00, 0x00, 0x00, 0x00, 0xC0, 0x38, 0x80, 0x2C, 0x70, 0x00,
|
||||||
|
0x00, 0x00, 0x00, 0xC0,
|
||||||
|
0x3A, 0x80, 0x2C, 0x70, 0x00, 0x00, 0x00, 0x00, 0xC0, 0x3B, 0x0A, 0x80,
|
||||||
|
0x2E, 0x83, 0x24, 0xDB,
|
||||||
|
0x00, 0x70, 0x00, 0x00, 0x00, 0x00, 0xC3, 0x2C, 0x31, 0x83, 0x2C, 0x70,
|
||||||
|
0x00, 0x00, 0x00, 0x00,
|
||||||
|
0xCB, 0x33, 0x1B, 0x83, 0x2C, 0x70, 0x00, 0x00, 0x00, 0x00, 0xCB, 0x31,
|
||||||
|
0x83, 0x2C, 0x70, 0x00,
|
||||||
|
0x00, 0x00, 0x00, 0xCB, 0x00, 0x33, 0x1E, 0x83, 0x2E, 0x25, 0xFF, 0xC4,
|
||||||
|
0x00, 0x2F, 0x06, 0x84,
|
||||||
|
0x2E, 0x00, 0x00, 0x10, 0x20, 0x29, 0x00, 0x04, 0x00, 0x10, 0x00, 0x00,
|
||||||
|
0x00, 0x23, 0x00, 0x00,
|
||||||
|
0x00, 0x21, 0x00, 0x10, 0x00, 0x48, 0x03, 0x00, 0x30, 0xFF, 0xF0, 0xFF,
|
||||||
|
0xFF, 0x00, 0x00, 0x00,
|
||||||
|
0x00, 0x00, 0x04, 0x00, 0x00, 0x21, 0x00, 0x10, 0x00, 0x4C, 0x03, 0x00,
|
||||||
|
0x30, 0xFF, 0xF0, 0xFF,
|
||||||
|
0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0C, 0x00, 0x00, 0x21, 0x00, 0x10,
|
||||||
|
0x00, 0x20, 0x03, 0x00,
|
||||||
|
0x30, 0x7F, 0x00, 0xFC, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x80, 0x10, 0x00,
|
||||||
|
0x00, 0x20, 0x00, 0x08,
|
||||||
|
0x00, 0x24, 0x03, 0x00, 0x30, 0x08, 0x00, 0x00, 0x00, 0x20, 0x00, 0x08,
|
||||||
|
0x00, 0x1C, 0x07, 0x00,
|
||||||
|
0x30, 0x1A, 0x00, 0x00, 0x00, 0x21, 0x00, 0x10, 0x00, 0x20, 0x03, 0x00,
|
||||||
|
0x30, 0xC3, 0xFF, 0xFF,
|
||||||
|
0xFF, 0x00, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00, 0x20, 0x00, 0x08,
|
||||||
|
0x00, 0x80, 0x03, 0x00,
|
||||||
|
0x30, 0x02, 0x00, 0x00, 0x00, 0x24, 0x00, 0x84, 0x00, 0x31, 0x65, 0x77,
|
||||||
|
0x77, 0x77, 0x78, 0x88,
|
||||||
|
0x77, 0x77, 0x76, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x78, 0x77, 0x67,
|
||||||
|
0x66, 0x66, 0x66, 0x66,
|
||||||
|
0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x76, 0x67, 0x66, 0x66, 0x66, 0x66,
|
||||||
|
0x66, 0x77, 0x66, 0x66,
|
||||||
|
0x66, 0x66, 0x67, 0x66, 0x66, 0x66, 0x66, 0x66, 0x76, 0x76, 0x66, 0x56,
|
||||||
|
0x66, 0x66, 0x56, 0x55,
|
||||||
|
0x65, 0x66, 0x66, 0x66, 0x65, 0x66, 0x66, 0x55, 0x66, 0x66, 0x65, 0x66,
|
||||||
|
0x76, 0x76, 0x77, 0x77,
|
||||||
|
0x66, 0x66, 0x66, 0x76, 0x67, 0x66, 0x77, 0x67, 0x66, 0x66, 0x66, 0x56,
|
||||||
|
0x65, 0x66, 0x65, 0x66,
|
||||||
|
0x66, 0x55, 0x55, 0x54, 0x55, 0x65, 0x66, 0x66, 0x66, 0x76, 0x77, 0x87,
|
||||||
|
0x88, 0x77, 0x66, 0x66,
|
||||||
|
0x66, 0x66, 0x66, 0x66, 0x66, 0x65, 0x66, 0x55, 0x55, 0x65, 0x56, 0x55,
|
||||||
|
0x55, 0x55, 0x54, 0x45,
|
||||||
|
0x54, 0x55, 0x55, 0x55, 0x66, 0x66, 0x66, 0x66, 0x66, 0x77, 0x77, 0x77,
|
||||||
|
0x66, 0x26, 0x00, 0x28,
|
||||||
|
0x00, 0xFF, 0x00, 0x0F, 0x00, 0xF0, 0xF0, 0x0F, 0x00, 0x20, 0x00, 0x00,
|
||||||
|
0x00, 0x30, 0x01, 0x02,
|
||||||
|
0x00, 0x2C, 0x01, 0x28, 0x00, 0x20, 0x80, 0x00, 0x00, 0x0A, 0x00, 0x02,
|
||||||
|
0x00, 0x0B, 0x00, 0x19,
|
||||||
|
0x00, 0x40, 0x1F, 0x10, 0x27, 0x00, 0x0F, 0x03, 0x00,
|
||||||
|
};
|
||||||
|
|
||||||
|
/* Known interrupts */
|
||||||
|
|
||||||
|
static unsigned char empty_interrupt[] = {
|
||||||
|
0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
|
};
|
||||||
|
|
||||||
|
static unsigned char interrupt1[] = {
|
||||||
|
0x02, 0x00, 0x0E, 0x00, 0xF0,
|
||||||
|
};
|
||||||
|
|
||||||
|
static unsigned char interrupt2[] = {
|
||||||
|
0x02, 0x04, 0x0A, 0x00, 0xF0,
|
||||||
|
};
|
||||||
|
|
||||||
|
static unsigned char interrupt3[] = {
|
||||||
|
0x02, 0x00, 0x0A, 0x00, 0xF0,
|
||||||
|
};
|
||||||
@@ -653,7 +653,7 @@ static int action_completed(struct fp_img_dev *dev)
|
|||||||
struct vfs101_dev *vdev = dev->priv;
|
struct vfs101_dev *vdev = dev->priv;
|
||||||
|
|
||||||
if ((dev->action == IMG_ACTION_ENROLL) &&
|
if ((dev->action == IMG_ACTION_ENROLL) &&
|
||||||
(vdev->enroll_stage < 1))
|
(vdev->enroll_stage < dev->dev->nr_enroll_stages))
|
||||||
/* Enroll not completed, return false */
|
/* Enroll not completed, return false */
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
|
||||||
@@ -1504,7 +1504,7 @@ static int dev_open(struct fp_img_dev *dev, unsigned long driver_data)
|
|||||||
if (r < 0)
|
if (r < 0)
|
||||||
{
|
{
|
||||||
/* Interface not claimed, return error */
|
/* Interface not claimed, return error */
|
||||||
fp_err("could not claim interface 0");
|
fp_err("could not claim interface 0: %s", libusb_error_name(r));
|
||||||
return r;
|
return r;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -240,7 +240,7 @@ static int dev_open(struct fp_img_dev *dev, unsigned long driver_data)
|
|||||||
r = libusb_claim_interface(dev->udev, 0);
|
r = libusb_claim_interface(dev->udev, 0);
|
||||||
if (r < 0) {
|
if (r < 0) {
|
||||||
/* Interface not claimed, return error */
|
/* Interface not claimed, return error */
|
||||||
fp_err("could not claim interface 0");
|
fp_err("could not claim interface 0: %s", libusb_error_name(r));
|
||||||
return r;
|
return r;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+96
-205
@@ -23,6 +23,7 @@
|
|||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <libusb.h>
|
#include <libusb.h>
|
||||||
#include <fp_internal.h>
|
#include <fp_internal.h>
|
||||||
|
#include <assembling.h>
|
||||||
#include "driver_ids.h"
|
#include "driver_ids.h"
|
||||||
|
|
||||||
#include "vfs5011_proto.h"
|
#include "vfs5011_proto.h"
|
||||||
@@ -77,6 +78,8 @@ struct usbexchange_data {
|
|||||||
int timeout;
|
int timeout;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
static void start_scan(struct fp_img_dev *dev);
|
||||||
|
|
||||||
static void async_send_cb(struct libusb_transfer *transfer)
|
static void async_send_cb(struct libusb_transfer *transfer)
|
||||||
{
|
{
|
||||||
struct fpi_ssm *ssm = transfer->user_data;
|
struct fpi_ssm *ssm = transfer->user_data;
|
||||||
@@ -249,43 +252,16 @@ static void usb_exchange_async(struct fpi_ssm *ssm,
|
|||||||
|
|
||||||
/* ====================== utils ======================= */
|
/* ====================== utils ======================= */
|
||||||
|
|
||||||
#if VFS5011_LINE_SIZE > INT_MAX/(256*256)
|
|
||||||
#error We might get integer overflow while computing standard deviation!
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* Calculade squared standand deviation */
|
|
||||||
static int get_deviation(unsigned char *buf, int size)
|
|
||||||
{
|
|
||||||
int res = 0, mean = 0, i;
|
|
||||||
for (i = 0; i < size; i++)
|
|
||||||
mean += buf[i];
|
|
||||||
|
|
||||||
mean /= size;
|
|
||||||
|
|
||||||
for (i = 0; i < size; i++) {
|
|
||||||
int dev = (int)buf[i] - mean;
|
|
||||||
res += dev*dev;
|
|
||||||
}
|
|
||||||
|
|
||||||
return res / size;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Calculate mean square difference of two lines */
|
|
||||||
static int get_diff_norm(unsigned char *buf1, unsigned char *buf2, int size)
|
|
||||||
{
|
|
||||||
int res = 0, i;
|
|
||||||
for (i = 0; i < size; i++) {
|
|
||||||
int dev = (int)buf1[i] - (int)buf2[i];
|
|
||||||
res += dev*dev;
|
|
||||||
}
|
|
||||||
|
|
||||||
return res / size;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Calculade squared standand deviation of sum of two lines */
|
/* Calculade squared standand deviation of sum of two lines */
|
||||||
static int get_deviation2(unsigned char *buf1, unsigned char *buf2, int size)
|
static int vfs5011_get_deviation2(struct fpi_line_asmbl_ctx *ctx, GSList *row1, GSList *row2)
|
||||||
{
|
{
|
||||||
|
unsigned char *buf1, *buf2;
|
||||||
int res = 0, mean = 0, i;
|
int res = 0, mean = 0, i;
|
||||||
|
const int size = 64;
|
||||||
|
|
||||||
|
buf1 = row1->data + 56;
|
||||||
|
buf2 = row2->data + 168;
|
||||||
|
|
||||||
for (i = 0; i < size; i++)
|
for (i = 0; i < size; i++)
|
||||||
mean += (int)buf1[i] + (int)buf2[i];
|
mean += (int)buf1[i] + (int)buf2[i];
|
||||||
|
|
||||||
@@ -299,121 +275,13 @@ static int get_deviation2(unsigned char *buf1, unsigned char *buf2, int size)
|
|||||||
return res / size;
|
return res / size;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int cmpint(const void *p1, const void *p2, gpointer data)
|
static unsigned char vfs5011_get_pixel(struct fpi_line_asmbl_ctx *ctx,
|
||||||
|
GSList *row,
|
||||||
|
unsigned x)
|
||||||
{
|
{
|
||||||
int a = *((int *)p1);
|
unsigned char *data = row->data + 8;
|
||||||
int b = *((int *)p2);
|
|
||||||
if (a < b)
|
|
||||||
return -1;
|
|
||||||
else if (a == b)
|
|
||||||
return 0;
|
|
||||||
else
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
static void median_filter(int *data, int size, int filtersize)
|
return data[x];
|
||||||
{
|
|
||||||
int i;
|
|
||||||
int *result = (int *)g_malloc0(size*sizeof(int));
|
|
||||||
int *sortbuf = (int *)g_malloc0(filtersize*sizeof(int));
|
|
||||||
for (i = 0; i < size; i++) {
|
|
||||||
int i1 = i - (filtersize-1)/2;
|
|
||||||
int i2 = i + (filtersize-1)/2;
|
|
||||||
if (i1 < 0)
|
|
||||||
i1 = 0;
|
|
||||||
if (i2 >= size)
|
|
||||||
i2 = size-1;
|
|
||||||
g_memmove(sortbuf, data+i1, (i2-i1+1)*sizeof(int));
|
|
||||||
g_qsort_with_data(sortbuf, i2-i1+1, sizeof(int), cmpint, NULL);
|
|
||||||
result[i] = sortbuf[(i2-i1+1)/2];
|
|
||||||
}
|
|
||||||
memmove(data, result, size*sizeof(int));
|
|
||||||
g_free(result);
|
|
||||||
g_free(sortbuf);
|
|
||||||
}
|
|
||||||
|
|
||||||
void interpolate_lines(unsigned char *line1, float y1, unsigned char *line2,
|
|
||||||
float y2, unsigned char *output, float yi, int size)
|
|
||||||
{
|
|
||||||
int i;
|
|
||||||
for (i = 0; i < size; i++)
|
|
||||||
output[i] = (float)line1[i]
|
|
||||||
+ (yi-y1)/(y2-y1)*(line2[i]-line1[i]);
|
|
||||||
}
|
|
||||||
|
|
||||||
int min(int a, int b) {return (a < b) ? a : b; }
|
|
||||||
|
|
||||||
/* Rescale image to account for variable swiping speed */
|
|
||||||
int vfs5011_rescale_image(unsigned char *image, int input_lines,
|
|
||||||
unsigned char *output, int max_output_lines)
|
|
||||||
{
|
|
||||||
/* Number of output lines per distance between two scanners */
|
|
||||||
enum {
|
|
||||||
RESOLUTION = 10,
|
|
||||||
MEDIAN_FILTER_SIZE = 13,
|
|
||||||
MAX_OFFSET = 10,
|
|
||||||
GOOD_OFFSETS_CRITERION = 20,
|
|
||||||
GOOD_OFFSETS_THRESHOLD = 3
|
|
||||||
};
|
|
||||||
int i;
|
|
||||||
float y = 0.0;
|
|
||||||
int line_ind = 0;
|
|
||||||
int *offsets = (int *)g_malloc0(input_lines * sizeof(int));
|
|
||||||
#ifdef ENABLE_DEBUG_LOGGING
|
|
||||||
gint64 start_time = g_get_real_time();
|
|
||||||
#endif
|
|
||||||
|
|
||||||
for (i = 0; i < input_lines-1; i += 2) {
|
|
||||||
int bestmatch = i;
|
|
||||||
int bestdiff = 0;
|
|
||||||
int j;
|
|
||||||
|
|
||||||
int firstrow, lastrow;
|
|
||||||
firstrow = i+1;
|
|
||||||
lastrow = min(i + MAX_OFFSET, input_lines-1);
|
|
||||||
|
|
||||||
for (j = firstrow; j <= lastrow; j++) {
|
|
||||||
int diff = get_deviation2(
|
|
||||||
image + i*VFS5011_LINE_SIZE + 56,
|
|
||||||
image + j*VFS5011_LINE_SIZE + 168,
|
|
||||||
64);
|
|
||||||
if ((j == firstrow) || (diff < bestdiff)) {
|
|
||||||
bestdiff = diff;
|
|
||||||
bestmatch = j;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
offsets[i/2] = bestmatch - i;
|
|
||||||
fp_dbg("offsets: %llu - %d", start_time, offsets[i/2]);
|
|
||||||
}
|
|
||||||
|
|
||||||
median_filter(offsets, input_lines-1, MEDIAN_FILTER_SIZE);
|
|
||||||
|
|
||||||
fp_dbg("offsets_filtered: %llu", g_get_real_time());
|
|
||||||
for (i = 0; i <= input_lines/2-1; i++)
|
|
||||||
fp_dbg("%d", offsets[i]);
|
|
||||||
for (i = 0; i < input_lines-1; i++) {
|
|
||||||
int offset = offsets[i/2];
|
|
||||||
if (offset > 0) {
|
|
||||||
float ynext = y + (float)RESOLUTION / offset;
|
|
||||||
while (line_ind < ynext) {
|
|
||||||
if (line_ind > max_output_lines-1) {
|
|
||||||
g_free(offsets);
|
|
||||||
return line_ind;
|
|
||||||
}
|
|
||||||
interpolate_lines(
|
|
||||||
image + i*VFS5011_LINE_SIZE + 8, y,
|
|
||||||
image + (i+1)*VFS5011_LINE_SIZE + 8,
|
|
||||||
ynext,
|
|
||||||
output + line_ind*VFS5011_IMAGE_WIDTH,
|
|
||||||
line_ind,
|
|
||||||
VFS5011_IMAGE_WIDTH);
|
|
||||||
line_ind++;
|
|
||||||
}
|
|
||||||
y = ynext;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
g_free(offsets);
|
|
||||||
return line_ind;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* ====================== main stuff ======================= */
|
/* ====================== main stuff ======================= */
|
||||||
@@ -424,18 +292,29 @@ enum {
|
|||||||
MAX_CAPTURE_LINES = 100000,
|
MAX_CAPTURE_LINES = 100000,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
static struct fpi_line_asmbl_ctx assembling_ctx = {
|
||||||
|
.line_width = VFS5011_IMAGE_WIDTH,
|
||||||
|
.max_height = MAXLINES,
|
||||||
|
.resolution = 10,
|
||||||
|
.median_filter_size = 25,
|
||||||
|
.max_search_offset = 30,
|
||||||
|
.get_deviation = vfs5011_get_deviation2,
|
||||||
|
.get_pixel = vfs5011_get_pixel,
|
||||||
|
};
|
||||||
|
|
||||||
struct vfs5011_data {
|
struct vfs5011_data {
|
||||||
unsigned char *total_buffer;
|
unsigned char *total_buffer;
|
||||||
unsigned char *capture_buffer;
|
unsigned char *capture_buffer;
|
||||||
unsigned char *image_buffer;
|
unsigned char *row_buffer;
|
||||||
unsigned char *lastline;
|
unsigned char *lastline;
|
||||||
unsigned char *rescale_buffer;
|
GSList *rows;
|
||||||
int lines_captured, lines_recorded, empty_lines;
|
int lines_captured, lines_recorded, empty_lines;
|
||||||
int max_lines_captured, max_lines_recorded;
|
int max_lines_captured, max_lines_recorded;
|
||||||
int lines_total, lines_total_allocated;
|
int lines_total, lines_total_allocated;
|
||||||
gboolean loop_running;
|
gboolean loop_running;
|
||||||
gboolean deactivating;
|
gboolean deactivating;
|
||||||
struct usbexchange_data init_sequence;
|
struct usbexchange_data init_sequence;
|
||||||
|
struct libusb_transfer *flying_transfer;
|
||||||
};
|
};
|
||||||
|
|
||||||
enum {
|
enum {
|
||||||
@@ -483,7 +362,7 @@ static int process_chunk(struct vfs5011_data *data, int transferred)
|
|||||||
unsigned char *linebuf = data->capture_buffer
|
unsigned char *linebuf = data->capture_buffer
|
||||||
+ i * VFS5011_LINE_SIZE;
|
+ i * VFS5011_LINE_SIZE;
|
||||||
|
|
||||||
if (get_deviation(linebuf + 8, VFS5011_IMAGE_WIDTH)
|
if (fpi_std_sq_dev(linebuf + 8, VFS5011_IMAGE_WIDTH)
|
||||||
< DEVIATION_THRESHOLD) {
|
< DEVIATION_THRESHOLD) {
|
||||||
if (data->lines_captured == 0)
|
if (data->lines_captured == 0)
|
||||||
continue;
|
continue;
|
||||||
@@ -505,14 +384,13 @@ static int process_chunk(struct vfs5011_data *data, int transferred)
|
|||||||
}
|
}
|
||||||
|
|
||||||
if ((data->lastline == NULL)
|
if ((data->lastline == NULL)
|
||||||
|| (get_diff_norm(
|
|| (fpi_mean_sq_diff_norm(
|
||||||
data->lastline + 8,
|
data->lastline + 8,
|
||||||
linebuf + 8,
|
linebuf + 8,
|
||||||
VFS5011_IMAGE_WIDTH) >= DIFFERENCE_THRESHOLD)) {
|
VFS5011_IMAGE_WIDTH) >= DIFFERENCE_THRESHOLD)) {
|
||||||
data->lastline = data->image_buffer
|
data->lastline = g_malloc(VFS5011_LINE_SIZE);
|
||||||
+ data->lines_recorded
|
data->rows = g_slist_prepend(data->rows, data->lastline);
|
||||||
* VFS5011_LINE_SIZE;
|
g_memmove(data->lastline, linebuf, VFS5011_LINE_SIZE);
|
||||||
memmove(data->lastline, linebuf, VFS5011_LINE_SIZE);
|
|
||||||
data->lines_recorded++;
|
data->lines_recorded++;
|
||||||
if (data->lines_recorded >= data->max_lines_recorded) {
|
if (data->lines_recorded >= data->max_lines_recorded) {
|
||||||
fp_dbg("process_chunk: recorded %d lines, finishing",
|
fp_dbg("process_chunk: recorded %d lines, finishing",
|
||||||
@@ -527,20 +405,14 @@ static int process_chunk(struct vfs5011_data *data, int transferred)
|
|||||||
void submit_image(struct fpi_ssm *ssm, struct vfs5011_data *data)
|
void submit_image(struct fpi_ssm *ssm, struct vfs5011_data *data)
|
||||||
{
|
{
|
||||||
struct fp_img_dev *dev = (struct fp_img_dev *)ssm->priv;
|
struct fp_img_dev *dev = (struct fp_img_dev *)ssm->priv;
|
||||||
int height = vfs5011_rescale_image(data->image_buffer,
|
struct fp_img *img;
|
||||||
data->lines_recorded,
|
|
||||||
data->rescale_buffer, MAXLINES);
|
|
||||||
struct fp_img *img = fpi_img_new(VFS5011_IMAGE_WIDTH * height);
|
|
||||||
|
|
||||||
if (img == NULL) {
|
data->rows = g_slist_reverse(data->rows);
|
||||||
fp_err("Failed to create image");
|
|
||||||
fpi_ssm_mark_aborted(ssm, -1);
|
|
||||||
}
|
|
||||||
|
|
||||||
img->flags = FP_IMG_V_FLIPPED;
|
img = fpi_assemble_lines(&assembling_ctx, data->rows, data->lines_recorded);
|
||||||
img->width = VFS5011_IMAGE_WIDTH;
|
|
||||||
img->height = height;
|
g_slist_free_full(data->rows, g_free);
|
||||||
memmove(img->data, data->rescale_buffer, VFS5011_IMAGE_WIDTH * height);
|
data->rows = NULL;
|
||||||
|
|
||||||
fp_dbg("Image captured, commiting");
|
fp_dbg("Image captured, commiting");
|
||||||
|
|
||||||
@@ -564,10 +436,15 @@ static void chunk_capture_callback(struct libusb_transfer *transfer)
|
|||||||
else
|
else
|
||||||
fpi_ssm_jump_to_state(ssm, DEV_ACTIVATE_READ_DATA);
|
fpi_ssm_jump_to_state(ssm, DEV_ACTIVATE_READ_DATA);
|
||||||
} else {
|
} else {
|
||||||
fp_err("Failed to capture data");
|
if (!data->deactivating) {
|
||||||
fpi_ssm_mark_aborted(ssm, -1);
|
fp_err("Failed to capture data");
|
||||||
|
fpi_ssm_mark_aborted(ssm, -1);
|
||||||
|
} else {
|
||||||
|
fpi_ssm_mark_completed(ssm);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
libusb_free_transfer(transfer);
|
libusb_free_transfer(transfer);
|
||||||
|
data->flying_transfer = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int capture_chunk_async(struct vfs5011_data *data,
|
static int capture_chunk_async(struct vfs5011_data *data,
|
||||||
@@ -582,12 +459,12 @@ static int capture_chunk_async(struct vfs5011_data *data,
|
|||||||
STOP_CHECK_LINES = 50
|
STOP_CHECK_LINES = 50
|
||||||
};
|
};
|
||||||
|
|
||||||
struct libusb_transfer *transfer = libusb_alloc_transfer(0);
|
data->flying_transfer = libusb_alloc_transfer(0);
|
||||||
libusb_fill_bulk_transfer(transfer, handle, VFS5011_IN_ENDPOINT_DATA,
|
libusb_fill_bulk_transfer(data->flying_transfer, handle, VFS5011_IN_ENDPOINT_DATA,
|
||||||
data->capture_buffer,
|
data->capture_buffer,
|
||||||
nline * VFS5011_LINE_SIZE,
|
nline * VFS5011_LINE_SIZE,
|
||||||
chunk_capture_callback, ssm, timeout);
|
chunk_capture_callback, ssm, timeout);
|
||||||
return libusb_submit_transfer(transfer);
|
return libusb_submit_transfer(data->flying_transfer);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void async_sleep_cb(void *data)
|
static void async_sleep_cb(void *data)
|
||||||
@@ -796,6 +673,12 @@ static void activate_loop(struct fpi_ssm *ssm)
|
|||||||
|
|
||||||
fp_dbg("main_loop: state %d", ssm->cur_state);
|
fp_dbg("main_loop: state %d", ssm->cur_state);
|
||||||
|
|
||||||
|
if (data->deactivating) {
|
||||||
|
fp_dbg("deactivating, marking completed");
|
||||||
|
fpi_ssm_mark_completed(ssm);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
switch (ssm->cur_state) {
|
switch (ssm->cur_state) {
|
||||||
case DEV_ACTIVATE_REQUEST_FPRINT:
|
case DEV_ACTIVATE_REQUEST_FPRINT:
|
||||||
data->init_sequence.stepcount =
|
data->init_sequence.stepcount =
|
||||||
@@ -819,17 +702,12 @@ static void activate_loop(struct fpi_ssm *ssm)
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case DEV_ACTIVATE_READ_DATA:
|
case DEV_ACTIVATE_READ_DATA:
|
||||||
if (data->deactivating) {
|
r = capture_chunk_async(data, dev->udev, CAPTURE_LINES,
|
||||||
fp_dbg("deactivating, marking completed");
|
READ_TIMEOUT, ssm);
|
||||||
fpi_ssm_mark_completed(ssm);
|
if (r != 0) {
|
||||||
} else {
|
fp_err("Failed to capture data");
|
||||||
r = capture_chunk_async(data, dev->udev, CAPTURE_LINES,
|
fpi_imgdev_session_error(dev, r);
|
||||||
READ_TIMEOUT, ssm);
|
fpi_ssm_mark_aborted(ssm, r);
|
||||||
if (r != 0) {
|
|
||||||
fp_err("Failed to capture data");
|
|
||||||
fpi_imgdev_session_error(dev, r);
|
|
||||||
fpi_ssm_mark_aborted(ssm, r);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
@@ -869,19 +747,25 @@ static void activate_loop_complete(struct fpi_ssm *ssm)
|
|||||||
if (data->init_sequence.receive_buf != NULL)
|
if (data->init_sequence.receive_buf != NULL)
|
||||||
g_free(data->init_sequence.receive_buf);
|
g_free(data->init_sequence.receive_buf);
|
||||||
data->init_sequence.receive_buf = NULL;
|
data->init_sequence.receive_buf = NULL;
|
||||||
data->loop_running = FALSE;
|
/* We don't want to submit image if we're in deactivating process */
|
||||||
submit_image(ssm, data);
|
if (!data->deactivating) {
|
||||||
fpi_imgdev_report_finger_status(dev, FALSE);
|
submit_image(ssm, data);
|
||||||
|
fpi_imgdev_report_finger_status(dev, FALSE);
|
||||||
|
}
|
||||||
fpi_ssm_free(ssm);
|
fpi_ssm_free(ssm);
|
||||||
|
|
||||||
if (r)
|
data->loop_running = FALSE;
|
||||||
fpi_imgdev_session_error(dev, r);
|
|
||||||
|
|
||||||
if (data->deactivating)
|
if (data->deactivating) {
|
||||||
fpi_imgdev_deactivate_complete(dev);
|
fpi_imgdev_deactivate_complete(dev);
|
||||||
|
} else if (r) {
|
||||||
|
fpi_imgdev_session_error(dev, r);
|
||||||
|
} else {
|
||||||
|
start_scan(dev);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
static void open_loop(struct fpi_ssm *ssm)
|
static void open_loop(struct fpi_ssm *ssm)
|
||||||
{
|
{
|
||||||
struct fp_img_dev *dev = (struct fp_img_dev *)ssm->priv;
|
struct fp_img_dev *dev = (struct fp_img_dev *)ssm->priv;
|
||||||
@@ -922,14 +806,8 @@ static int dev_open(struct fp_img_dev *dev, unsigned long driver_data)
|
|||||||
data = (struct vfs5011_data *)g_malloc0(sizeof(*data));
|
data = (struct vfs5011_data *)g_malloc0(sizeof(*data));
|
||||||
data->capture_buffer =
|
data->capture_buffer =
|
||||||
(unsigned char *)g_malloc0(CAPTURE_LINES * VFS5011_LINE_SIZE);
|
(unsigned char *)g_malloc0(CAPTURE_LINES * VFS5011_LINE_SIZE);
|
||||||
data->image_buffer =
|
|
||||||
(unsigned char *)g_malloc0(MAXLINES * VFS5011_LINE_SIZE);
|
|
||||||
data->rescale_buffer =
|
|
||||||
(unsigned char *)g_malloc0(MAXLINES * VFS5011_IMAGE_WIDTH);
|
|
||||||
dev->priv = data;
|
dev->priv = data;
|
||||||
|
|
||||||
dev->dev->nr_enroll_stages = 1;
|
|
||||||
|
|
||||||
r = libusb_reset_device(dev->udev);
|
r = libusb_reset_device(dev->udev);
|
||||||
if (r != 0) {
|
if (r != 0) {
|
||||||
fp_err("Failed to reset the device");
|
fp_err("Failed to reset the device");
|
||||||
@@ -938,7 +816,7 @@ static int dev_open(struct fp_img_dev *dev, unsigned long driver_data)
|
|||||||
|
|
||||||
r = libusb_claim_interface(dev->udev, 0);
|
r = libusb_claim_interface(dev->udev, 0);
|
||||||
if (r != 0) {
|
if (r != 0) {
|
||||||
fp_err("Failed to claim interface");
|
fp_err("Failed to claim interface: %s", libusb_error_name(r));
|
||||||
return r;
|
return r;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -956,42 +834,55 @@ static void dev_close(struct fp_img_dev *dev)
|
|||||||
struct vfs5011_data *data = (struct vfs5011_data *)dev->priv;
|
struct vfs5011_data *data = (struct vfs5011_data *)dev->priv;
|
||||||
if (data != NULL) {
|
if (data != NULL) {
|
||||||
g_free(data->capture_buffer);
|
g_free(data->capture_buffer);
|
||||||
g_free(data->image_buffer);
|
g_slist_free_full(data->rows, g_free);
|
||||||
g_free(data->rescale_buffer);
|
|
||||||
g_free(data);
|
g_free(data);
|
||||||
}
|
}
|
||||||
fpi_imgdev_close_complete(dev);
|
fpi_imgdev_close_complete(dev);
|
||||||
}
|
}
|
||||||
|
|
||||||
static int dev_activate(struct fp_img_dev *dev, enum fp_imgdev_state state)
|
static void start_scan(struct fp_img_dev *dev)
|
||||||
{
|
{
|
||||||
struct vfs5011_data *data = (struct vfs5011_data *)dev->priv;
|
struct vfs5011_data *data = (struct vfs5011_data *)dev->priv;
|
||||||
struct fpi_ssm *ssm;
|
struct fpi_ssm *ssm;
|
||||||
|
|
||||||
fp_dbg("device initialized");
|
|
||||||
data->deactivating = FALSE;
|
|
||||||
data->loop_running = TRUE;
|
data->loop_running = TRUE;
|
||||||
|
|
||||||
fp_dbg("creating ssm");
|
fp_dbg("creating ssm");
|
||||||
ssm = fpi_ssm_new(dev->dev, activate_loop, DEV_ACTIVATE_NUM_STATES);
|
ssm = fpi_ssm_new(dev->dev, activate_loop, DEV_ACTIVATE_NUM_STATES);
|
||||||
ssm->priv = dev;
|
ssm->priv = dev;
|
||||||
fp_dbg("starting ssm");
|
fp_dbg("starting ssm");
|
||||||
fpi_ssm_start(ssm, activate_loop_complete);
|
fpi_ssm_start(ssm, activate_loop_complete);
|
||||||
fp_dbg("ssm done, getting out");
|
fp_dbg("ssm done, getting out");
|
||||||
|
}
|
||||||
|
|
||||||
|
static int dev_activate(struct fp_img_dev *dev, enum fp_imgdev_state state)
|
||||||
|
{
|
||||||
|
struct vfs5011_data *data = (struct vfs5011_data *)dev->priv;
|
||||||
|
|
||||||
|
fp_dbg("device initialized");
|
||||||
|
data->deactivating = FALSE;
|
||||||
|
|
||||||
|
start_scan(dev);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void dev_deactivate(struct fp_img_dev *dev)
|
static void dev_deactivate(struct fp_img_dev *dev)
|
||||||
{
|
{
|
||||||
|
int r;
|
||||||
struct vfs5011_data *data = dev->priv;
|
struct vfs5011_data *data = dev->priv;
|
||||||
if (data->loop_running)
|
if (data->loop_running) {
|
||||||
data->deactivating = TRUE;
|
data->deactivating = TRUE;
|
||||||
else
|
if (data->flying_transfer) {
|
||||||
|
r = libusb_cancel_transfer(data->flying_transfer);
|
||||||
|
if (r < 0)
|
||||||
|
fp_dbg("cancel failed error %d", r);
|
||||||
|
}
|
||||||
|
} else
|
||||||
fpi_imgdev_deactivate_complete(dev);
|
fpi_imgdev_deactivate_complete(dev);
|
||||||
}
|
}
|
||||||
|
|
||||||
static const struct usb_id id_table[] = {
|
static const struct usb_id id_table[] = {
|
||||||
|
{ .vendor = 0x138a, .product = 0x0010 /* Validity device from some Toshiba laptops */ },
|
||||||
{ .vendor = 0x138a, .product = 0x0011 /* vfs5011 */ },
|
{ .vendor = 0x138a, .product = 0x0011 /* vfs5011 */ },
|
||||||
{ .vendor = 0x138a, .product = 0x0017 /* Validity device from Lenovo T440 laptops */ },
|
{ .vendor = 0x138a, .product = 0x0017 /* Validity device from Lenovo T440 laptops */ },
|
||||||
{ .vendor = 0x138a, .product = 0x0018 /* one more Validity device */ },
|
{ .vendor = 0x138a, .product = 0x0018 /* one more Validity device */ },
|
||||||
|
|||||||
@@ -305,6 +305,9 @@ extern struct fp_img_driver upektc_img_driver;
|
|||||||
#ifdef ENABLE_ETES603
|
#ifdef ENABLE_ETES603
|
||||||
extern struct fp_img_driver etes603_driver;
|
extern struct fp_img_driver etes603_driver;
|
||||||
#endif
|
#endif
|
||||||
|
#ifdef ENABLE_VFS0050
|
||||||
|
extern struct fp_img_driver vfs0050_driver;
|
||||||
|
#endif
|
||||||
|
|
||||||
extern libusb_context *fpi_usb_ctx;
|
extern libusb_context *fpi_usb_ctx;
|
||||||
extern GSList *opened_devices;
|
extern GSList *opened_devices;
|
||||||
@@ -376,6 +379,7 @@ struct fp_minutiae {
|
|||||||
#define FP_IMG_H_FLIPPED (1<<1)
|
#define FP_IMG_H_FLIPPED (1<<1)
|
||||||
#define FP_IMG_COLORS_INVERTED (1<<2)
|
#define FP_IMG_COLORS_INVERTED (1<<2)
|
||||||
#define FP_IMG_BINARIZED_FORM (1<<3)
|
#define FP_IMG_BINARIZED_FORM (1<<3)
|
||||||
|
#define FP_IMG_PARTIAL (1<<4)
|
||||||
|
|
||||||
#define FP_IMG_STANDARDIZATION_FLAGS (FP_IMG_V_FLIPPED | FP_IMG_H_FLIPPED \
|
#define FP_IMG_STANDARDIZATION_FLAGS (FP_IMG_V_FLIPPED | FP_IMG_H_FLIPPED \
|
||||||
| FP_IMG_COLORS_INVERTED)
|
| FP_IMG_COLORS_INVERTED)
|
||||||
@@ -482,7 +486,12 @@ void fpi_imgdev_deactivate_complete(struct fp_img_dev *imgdev);
|
|||||||
void fpi_imgdev_report_finger_status(struct fp_img_dev *imgdev,
|
void fpi_imgdev_report_finger_status(struct fp_img_dev *imgdev,
|
||||||
gboolean present);
|
gboolean present);
|
||||||
void fpi_imgdev_image_captured(struct fp_img_dev *imgdev, struct fp_img *img);
|
void fpi_imgdev_image_captured(struct fp_img_dev *imgdev, struct fp_img *img);
|
||||||
|
void fpi_imgdev_abort_scan(struct fp_img_dev *imgdev, int result);
|
||||||
void fpi_imgdev_session_error(struct fp_img_dev *imgdev, int error);
|
void fpi_imgdev_session_error(struct fp_img_dev *imgdev, int error);
|
||||||
|
|
||||||
|
/* utils */
|
||||||
|
int fpi_std_sq_dev(const unsigned char *buf, int size);
|
||||||
|
int fpi_mean_sq_diff_norm(unsigned char *buf1, unsigned char *buf2, int size);
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|||||||
@@ -25,6 +25,8 @@
|
|||||||
|
|
||||||
static const struct usb_id whitelist_id_table[] = {
|
static const struct usb_id whitelist_id_table[] = {
|
||||||
{ .vendor = 0x08ff, .product = 0x2810 },
|
{ .vendor = 0x08ff, .product = 0x2810 },
|
||||||
|
/* https://bugzilla.redhat.com/show_bug.cgi?id=1173367 */
|
||||||
|
{ .vendor = 0x138a, .product = 0x0017 },
|
||||||
{ 0, 0, 0, },
|
{ 0, 0, 0, },
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -283,6 +283,9 @@ int fpi_img_detect_minutiae(struct fp_img *img)
|
|||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Remove perimeter points from partial image */
|
||||||
|
g_lfsparms_V2.remove_perimeter_pts = img->flags & FP_IMG_PARTIAL ? TRUE : FALSE;
|
||||||
|
|
||||||
/* 25.4 mm per inch */
|
/* 25.4 mm per inch */
|
||||||
timer = g_timer_new();
|
timer = g_timer_new();
|
||||||
r = get_minutiae(&minutiae, &quality_map, &direction_map,
|
r = get_minutiae(&minutiae, &quality_map, &direction_map,
|
||||||
@@ -508,3 +511,37 @@ API_EXPORTED struct fp_minutia **fp_img_get_minutiae(struct fp_img *img,
|
|||||||
return img->minutiae->list;
|
return img->minutiae->list;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Calculate squared standand deviation */
|
||||||
|
int fpi_std_sq_dev(const unsigned char *buf, int size)
|
||||||
|
{
|
||||||
|
int res = 0, mean = 0, i;
|
||||||
|
|
||||||
|
if (size > (INT_MAX / 65536)) {
|
||||||
|
fp_err("%s: we might get an overflow!", __func__);
|
||||||
|
return -EOVERFLOW;
|
||||||
|
}
|
||||||
|
|
||||||
|
for (i = 0; i < size; i++)
|
||||||
|
mean += buf[i];
|
||||||
|
|
||||||
|
mean /= size;
|
||||||
|
|
||||||
|
for (i = 0; i < size; i++) {
|
||||||
|
int dev = (int)buf[i] - mean;
|
||||||
|
res += dev*dev;
|
||||||
|
}
|
||||||
|
|
||||||
|
return res / size;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Calculate normalized mean square difference of two lines */
|
||||||
|
int fpi_mean_sq_diff_norm(unsigned char *buf1, unsigned char *buf2, int size)
|
||||||
|
{
|
||||||
|
int res = 0, i;
|
||||||
|
for (i = 0; i < size; i++) {
|
||||||
|
int dev = (int)buf1[i] - (int)buf2[i];
|
||||||
|
res += dev * dev;
|
||||||
|
}
|
||||||
|
|
||||||
|
return res / size;
|
||||||
|
}
|
||||||
|
|||||||
@@ -164,15 +164,18 @@ void fpi_imgdev_report_finger_status(struct fp_img_dev *imgdev,
|
|||||||
break;
|
break;
|
||||||
case IMG_ACTION_VERIFY:
|
case IMG_ACTION_VERIFY:
|
||||||
fpi_drvcb_report_verify_result(imgdev->dev, r, img);
|
fpi_drvcb_report_verify_result(imgdev->dev, r, img);
|
||||||
|
imgdev->action_result = 0;
|
||||||
fp_print_data_free(data);
|
fp_print_data_free(data);
|
||||||
break;
|
break;
|
||||||
case IMG_ACTION_IDENTIFY:
|
case IMG_ACTION_IDENTIFY:
|
||||||
fpi_drvcb_report_identify_result(imgdev->dev, r,
|
fpi_drvcb_report_identify_result(imgdev->dev, r,
|
||||||
imgdev->identify_match_offset, img);
|
imgdev->identify_match_offset, img);
|
||||||
|
imgdev->action_result = 0;
|
||||||
fp_print_data_free(data);
|
fp_print_data_free(data);
|
||||||
break;
|
break;
|
||||||
case IMG_ACTION_CAPTURE:
|
case IMG_ACTION_CAPTURE:
|
||||||
fpi_drvcb_report_capture_result(imgdev->dev, r, img);
|
fpi_drvcb_report_capture_result(imgdev->dev, r, img);
|
||||||
|
imgdev->action_result = 0;
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
fp_err("unhandled action %d", imgdev->action);
|
fp_err("unhandled action %d", imgdev->action);
|
||||||
@@ -217,6 +220,13 @@ static void identify_process_img(struct fp_img_dev *imgdev)
|
|||||||
imgdev->identify_match_offset = match_offset;
|
imgdev->identify_match_offset = match_offset;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void fpi_imgdev_abort_scan(struct fp_img_dev *imgdev, int result)
|
||||||
|
{
|
||||||
|
imgdev->action_result = result;
|
||||||
|
imgdev->action_state = IMG_ACQUIRE_STATE_AWAIT_FINGER_OFF;
|
||||||
|
dev_change_state(imgdev, IMGDEV_STATE_AWAIT_FINGER_OFF);
|
||||||
|
}
|
||||||
|
|
||||||
void fpi_imgdev_image_captured(struct fp_img_dev *imgdev, struct fp_img *img)
|
void fpi_imgdev_image_captured(struct fp_img_dev *imgdev, struct fp_img *img)
|
||||||
{
|
{
|
||||||
struct fp_print_data *print;
|
struct fp_print_data *print;
|
||||||
|
|||||||
@@ -236,6 +236,8 @@ typedef struct lfsparms{
|
|||||||
int pores_steps_bwd;
|
int pores_steps_bwd;
|
||||||
double pores_min_dist2;
|
double pores_min_dist2;
|
||||||
double pores_max_ratio;
|
double pores_max_ratio;
|
||||||
|
int remove_perimeter_pts;
|
||||||
|
int min_pp_distance;
|
||||||
|
|
||||||
/* Ridge Counting Controls */
|
/* Ridge Counting Controls */
|
||||||
int max_nbrs;
|
int max_nbrs;
|
||||||
@@ -585,6 +587,9 @@ typedef struct lfsparms{
|
|||||||
/* contour points to be considered a pore. */
|
/* contour points to be considered a pore. */
|
||||||
#define PORES_MAX_RATIO 2.25
|
#define PORES_MAX_RATIO 2.25
|
||||||
|
|
||||||
|
/* Points which are closer than this distance to scan perimeter will be removed */
|
||||||
|
#define PERIMETER_PTS_DISTANCE 10
|
||||||
|
|
||||||
|
|
||||||
/***** RIDGE COUNTING CONSTANTS *****/
|
/***** RIDGE COUNTING CONSTANTS *****/
|
||||||
|
|
||||||
|
|||||||
@@ -129,6 +129,8 @@ LFSPARMS g_lfsparms = {
|
|||||||
PORES_STEPS_BWD,
|
PORES_STEPS_BWD,
|
||||||
PORES_MIN_DIST2,
|
PORES_MIN_DIST2,
|
||||||
PORES_MAX_RATIO,
|
PORES_MAX_RATIO,
|
||||||
|
FALSE, /* not removing perimeter points by default */
|
||||||
|
PERIMETER_PTS_DISTANCE,
|
||||||
|
|
||||||
/* Ridge Counting Controls */
|
/* Ridge Counting Controls */
|
||||||
MAX_NBRS,
|
MAX_NBRS,
|
||||||
@@ -213,6 +215,8 @@ LFSPARMS g_lfsparms_V2 = {
|
|||||||
PORES_STEPS_BWD,
|
PORES_STEPS_BWD,
|
||||||
PORES_MIN_DIST2,
|
PORES_MIN_DIST2,
|
||||||
PORES_MAX_RATIO,
|
PORES_MAX_RATIO,
|
||||||
|
FALSE, /* not removing perimeter points by default */
|
||||||
|
PERIMETER_PTS_DISTANCE,
|
||||||
|
|
||||||
/* Ridge Counting Controls */
|
/* Ridge Counting Controls */
|
||||||
MAX_NBRS,
|
MAX_NBRS,
|
||||||
|
|||||||
@@ -1350,6 +1350,159 @@ static int remove_overlaps(MINUTIAE *minutiae,
|
|||||||
return(0);
|
return(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void mark_minutiae_in_range(MINUTIAE *minutiae, int *to_remove, int x, int y,
|
||||||
|
const LFSPARMS *lfsparms)
|
||||||
|
{
|
||||||
|
int i, dist;
|
||||||
|
for (i = 0; i < minutiae->num; i++) {
|
||||||
|
if (to_remove[i])
|
||||||
|
continue;
|
||||||
|
dist = (int)sqrt((x - minutiae->list[i]->x) * (x - minutiae->list[i]->x) +
|
||||||
|
(y - minutiae->list[i]->y) * (y - minutiae->list[i]->y));
|
||||||
|
if (dist < lfsparms->min_pp_distance) {
|
||||||
|
to_remove[i] = 1;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/*************************************************************************
|
||||||
|
**************************************************************************
|
||||||
|
#cat: remove_perimeter_pts - Takes a list of true and false minutiae and
|
||||||
|
#cat: attempts to detect and remove those false minutiae that
|
||||||
|
#cat: belong to image edge
|
||||||
|
|
||||||
|
Input:
|
||||||
|
minutiae - list of true and false minutiae
|
||||||
|
bdata - binary image data (0==while & 1==black)
|
||||||
|
iw - width (in pixels) of image
|
||||||
|
ih - height (in pixels) of image
|
||||||
|
lfsparms - parameters and thresholds for controlling LFS
|
||||||
|
Output:
|
||||||
|
minutiae - list of pruned minutiae
|
||||||
|
Return Code:
|
||||||
|
Zero - successful completion
|
||||||
|
Negative - system error
|
||||||
|
**************************************************************************/
|
||||||
|
static int remove_perimeter_pts(MINUTIAE *minutiae,
|
||||||
|
unsigned char *bdata, const int iw, const int ih,
|
||||||
|
const LFSPARMS *lfsparms)
|
||||||
|
{
|
||||||
|
int i, j, ret, *to_remove;
|
||||||
|
int *left, *left_up, *left_down;
|
||||||
|
int *right, *right_up, *right_down;
|
||||||
|
int removed = 0;
|
||||||
|
int left_min, right_max;
|
||||||
|
|
||||||
|
if (!lfsparms->remove_perimeter_pts)
|
||||||
|
return(0);
|
||||||
|
|
||||||
|
to_remove = calloc(minutiae->num, sizeof(int));
|
||||||
|
left = calloc(ih, sizeof(int));
|
||||||
|
left_up = calloc(ih, sizeof(int));
|
||||||
|
left_down = calloc(ih, sizeof(int));
|
||||||
|
right = calloc(ih, sizeof(int));
|
||||||
|
right_up = calloc(ih, sizeof(int));
|
||||||
|
right_down = calloc(ih, sizeof(int));
|
||||||
|
|
||||||
|
/* Pass downwards */
|
||||||
|
left_min = iw - 1;
|
||||||
|
right_max = 0;
|
||||||
|
for (i = 0; i < ih; i++) {
|
||||||
|
for (j = 0; j < left_min; j++) {
|
||||||
|
if ((bdata[i * iw + j] != 0)) {
|
||||||
|
left_min = j;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (left_min == (iw - 1))
|
||||||
|
left_down[i] = -1;
|
||||||
|
else
|
||||||
|
left_down[i] = left_min;
|
||||||
|
for (j = iw - 1; j >= right_max; j--) {
|
||||||
|
if ((bdata[i * iw + j] != 0)) {
|
||||||
|
right_max = j;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (right_max == 0)
|
||||||
|
right_down[i] = -1;
|
||||||
|
else
|
||||||
|
right_down[i] = right_max;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Pass upwards */
|
||||||
|
left_min = iw - 1;
|
||||||
|
right_max = 0;
|
||||||
|
for (i = ih - 1; i >= 0; i--) {
|
||||||
|
for (j = 0; j < left_min; j++) {
|
||||||
|
if ((bdata[i * iw + j] != 0)) {
|
||||||
|
left_min = j;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (left_min == (iw - 1))
|
||||||
|
left_up[i] = -1;
|
||||||
|
else
|
||||||
|
left_up[i] = left_min;
|
||||||
|
for (j = iw - 1; j >= right_max; j--) {
|
||||||
|
if ((bdata[i * iw + j] != 0)) {
|
||||||
|
right_max = j;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (right_max == 0)
|
||||||
|
right_up[i] = -1;
|
||||||
|
else
|
||||||
|
right_up[i] = right_max;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Merge */
|
||||||
|
left_min = left_down[ih - 1];
|
||||||
|
right_max = right_down[ih - 1];
|
||||||
|
for (i = 0; i < ih; i++) {
|
||||||
|
if (left_down[i] != left_min)
|
||||||
|
left[i] = left_down[i];
|
||||||
|
else
|
||||||
|
left[i] = left_up[i];
|
||||||
|
|
||||||
|
if (right_down[i] != right_max)
|
||||||
|
right[i] = right_down[i];
|
||||||
|
else
|
||||||
|
right[i] = right_up[i];
|
||||||
|
}
|
||||||
|
free(left_up);
|
||||||
|
free(left_down);
|
||||||
|
free(right_up);
|
||||||
|
free(right_down);
|
||||||
|
|
||||||
|
/* Mark minitiae close to the edge */
|
||||||
|
for (i = 0; i < ih; i++) {
|
||||||
|
if (left[i] != -1)
|
||||||
|
mark_minutiae_in_range(minutiae, to_remove, left[i], i, lfsparms);
|
||||||
|
if (right[i] != -1)
|
||||||
|
mark_minutiae_in_range(minutiae, to_remove, right[i], i, lfsparms);
|
||||||
|
}
|
||||||
|
|
||||||
|
free(left);
|
||||||
|
free(right);
|
||||||
|
|
||||||
|
for (i = minutiae->num - 1; i >= 0; i--) {
|
||||||
|
/* If the current minutia index is flagged for removal ... */
|
||||||
|
if (to_remove[i]){
|
||||||
|
removed ++;
|
||||||
|
/* Remove the minutia from the minutiae list. */
|
||||||
|
if((ret = remove_minutia(i, minutiae))){
|
||||||
|
free(to_remove);
|
||||||
|
return(ret);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
free(to_remove);
|
||||||
|
|
||||||
|
return (0);
|
||||||
|
}
|
||||||
|
|
||||||
/*************************************************************************
|
/*************************************************************************
|
||||||
**************************************************************************
|
**************************************************************************
|
||||||
#cat: remove_pores_V2 - Attempts to detect and remove minutia points located on
|
#cat: remove_pores_V2 - Attempts to detect and remove minutia points located on
|
||||||
@@ -2104,6 +2257,11 @@ int remove_false_minutia_V2(MINUTIAE *minutiae,
|
|||||||
return(ret);
|
return(ret);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* 11. Remove minutiae on image edge */
|
||||||
|
if((ret = remove_perimeter_pts(minutiae, bdata, iw, ih, lfsparms))) {
|
||||||
|
return (ret);
|
||||||
|
}
|
||||||
|
|
||||||
return(0);
|
return(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Vendored
+8369
File diff suppressed because it is too large
Load Diff
Vendored
+437
@@ -0,0 +1,437 @@
|
|||||||
|
# Helper functions for option handling. -*- Autoconf -*-
|
||||||
|
#
|
||||||
|
# Copyright (C) 2004-2005, 2007-2009, 2011-2015 Free Software
|
||||||
|
# Foundation, Inc.
|
||||||
|
# Written by Gary V. Vaughan, 2004
|
||||||
|
#
|
||||||
|
# This file is free software; the Free Software Foundation gives
|
||||||
|
# unlimited permission to copy and/or distribute it, with or without
|
||||||
|
# modifications, as long as this notice is preserved.
|
||||||
|
|
||||||
|
# serial 8 ltoptions.m4
|
||||||
|
|
||||||
|
# This is to help aclocal find these macros, as it can't see m4_define.
|
||||||
|
AC_DEFUN([LTOPTIONS_VERSION], [m4_if([1])])
|
||||||
|
|
||||||
|
|
||||||
|
# _LT_MANGLE_OPTION(MACRO-NAME, OPTION-NAME)
|
||||||
|
# ------------------------------------------
|
||||||
|
m4_define([_LT_MANGLE_OPTION],
|
||||||
|
[[_LT_OPTION_]m4_bpatsubst($1__$2, [[^a-zA-Z0-9_]], [_])])
|
||||||
|
|
||||||
|
|
||||||
|
# _LT_SET_OPTION(MACRO-NAME, OPTION-NAME)
|
||||||
|
# ---------------------------------------
|
||||||
|
# Set option OPTION-NAME for macro MACRO-NAME, and if there is a
|
||||||
|
# matching handler defined, dispatch to it. Other OPTION-NAMEs are
|
||||||
|
# saved as a flag.
|
||||||
|
m4_define([_LT_SET_OPTION],
|
||||||
|
[m4_define(_LT_MANGLE_OPTION([$1], [$2]))dnl
|
||||||
|
m4_ifdef(_LT_MANGLE_DEFUN([$1], [$2]),
|
||||||
|
_LT_MANGLE_DEFUN([$1], [$2]),
|
||||||
|
[m4_warning([Unknown $1 option '$2'])])[]dnl
|
||||||
|
])
|
||||||
|
|
||||||
|
|
||||||
|
# _LT_IF_OPTION(MACRO-NAME, OPTION-NAME, IF-SET, [IF-NOT-SET])
|
||||||
|
# ------------------------------------------------------------
|
||||||
|
# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
|
||||||
|
m4_define([_LT_IF_OPTION],
|
||||||
|
[m4_ifdef(_LT_MANGLE_OPTION([$1], [$2]), [$3], [$4])])
|
||||||
|
|
||||||
|
|
||||||
|
# _LT_UNLESS_OPTIONS(MACRO-NAME, OPTION-LIST, IF-NOT-SET)
|
||||||
|
# -------------------------------------------------------
|
||||||
|
# Execute IF-NOT-SET unless all options in OPTION-LIST for MACRO-NAME
|
||||||
|
# are set.
|
||||||
|
m4_define([_LT_UNLESS_OPTIONS],
|
||||||
|
[m4_foreach([_LT_Option], m4_split(m4_normalize([$2])),
|
||||||
|
[m4_ifdef(_LT_MANGLE_OPTION([$1], _LT_Option),
|
||||||
|
[m4_define([$0_found])])])[]dnl
|
||||||
|
m4_ifdef([$0_found], [m4_undefine([$0_found])], [$3
|
||||||
|
])[]dnl
|
||||||
|
])
|
||||||
|
|
||||||
|
|
||||||
|
# _LT_SET_OPTIONS(MACRO-NAME, OPTION-LIST)
|
||||||
|
# ----------------------------------------
|
||||||
|
# OPTION-LIST is a space-separated list of Libtool options associated
|
||||||
|
# with MACRO-NAME. If any OPTION has a matching handler declared with
|
||||||
|
# LT_OPTION_DEFINE, dispatch to that macro; otherwise complain about
|
||||||
|
# the unknown option and exit.
|
||||||
|
m4_defun([_LT_SET_OPTIONS],
|
||||||
|
[# Set options
|
||||||
|
m4_foreach([_LT_Option], m4_split(m4_normalize([$2])),
|
||||||
|
[_LT_SET_OPTION([$1], _LT_Option)])
|
||||||
|
|
||||||
|
m4_if([$1],[LT_INIT],[
|
||||||
|
dnl
|
||||||
|
dnl Simply set some default values (i.e off) if boolean options were not
|
||||||
|
dnl specified:
|
||||||
|
_LT_UNLESS_OPTIONS([LT_INIT], [dlopen], [enable_dlopen=no
|
||||||
|
])
|
||||||
|
_LT_UNLESS_OPTIONS([LT_INIT], [win32-dll], [enable_win32_dll=no
|
||||||
|
])
|
||||||
|
dnl
|
||||||
|
dnl If no reference was made to various pairs of opposing options, then
|
||||||
|
dnl we run the default mode handler for the pair. For example, if neither
|
||||||
|
dnl 'shared' nor 'disable-shared' was passed, we enable building of shared
|
||||||
|
dnl archives by default:
|
||||||
|
_LT_UNLESS_OPTIONS([LT_INIT], [shared disable-shared], [_LT_ENABLE_SHARED])
|
||||||
|
_LT_UNLESS_OPTIONS([LT_INIT], [static disable-static], [_LT_ENABLE_STATIC])
|
||||||
|
_LT_UNLESS_OPTIONS([LT_INIT], [pic-only no-pic], [_LT_WITH_PIC])
|
||||||
|
_LT_UNLESS_OPTIONS([LT_INIT], [fast-install disable-fast-install],
|
||||||
|
[_LT_ENABLE_FAST_INSTALL])
|
||||||
|
_LT_UNLESS_OPTIONS([LT_INIT], [aix-soname=aix aix-soname=both aix-soname=svr4],
|
||||||
|
[_LT_WITH_AIX_SONAME([aix])])
|
||||||
|
])
|
||||||
|
])# _LT_SET_OPTIONS
|
||||||
|
|
||||||
|
|
||||||
|
## --------------------------------- ##
|
||||||
|
## Macros to handle LT_INIT options. ##
|
||||||
|
## --------------------------------- ##
|
||||||
|
|
||||||
|
# _LT_MANGLE_DEFUN(MACRO-NAME, OPTION-NAME)
|
||||||
|
# -----------------------------------------
|
||||||
|
m4_define([_LT_MANGLE_DEFUN],
|
||||||
|
[[_LT_OPTION_DEFUN_]m4_bpatsubst(m4_toupper([$1__$2]), [[^A-Z0-9_]], [_])])
|
||||||
|
|
||||||
|
|
||||||
|
# LT_OPTION_DEFINE(MACRO-NAME, OPTION-NAME, CODE)
|
||||||
|
# -----------------------------------------------
|
||||||
|
m4_define([LT_OPTION_DEFINE],
|
||||||
|
[m4_define(_LT_MANGLE_DEFUN([$1], [$2]), [$3])[]dnl
|
||||||
|
])# LT_OPTION_DEFINE
|
||||||
|
|
||||||
|
|
||||||
|
# dlopen
|
||||||
|
# ------
|
||||||
|
LT_OPTION_DEFINE([LT_INIT], [dlopen], [enable_dlopen=yes
|
||||||
|
])
|
||||||
|
|
||||||
|
AU_DEFUN([AC_LIBTOOL_DLOPEN],
|
||||||
|
[_LT_SET_OPTION([LT_INIT], [dlopen])
|
||||||
|
AC_DIAGNOSE([obsolete],
|
||||||
|
[$0: Remove this warning and the call to _LT_SET_OPTION when you
|
||||||
|
put the 'dlopen' option into LT_INIT's first parameter.])
|
||||||
|
])
|
||||||
|
|
||||||
|
dnl aclocal-1.4 backwards compatibility:
|
||||||
|
dnl AC_DEFUN([AC_LIBTOOL_DLOPEN], [])
|
||||||
|
|
||||||
|
|
||||||
|
# win32-dll
|
||||||
|
# ---------
|
||||||
|
# Declare package support for building win32 dll's.
|
||||||
|
LT_OPTION_DEFINE([LT_INIT], [win32-dll],
|
||||||
|
[enable_win32_dll=yes
|
||||||
|
|
||||||
|
case $host in
|
||||||
|
*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-cegcc*)
|
||||||
|
AC_CHECK_TOOL(AS, as, false)
|
||||||
|
AC_CHECK_TOOL(DLLTOOL, dlltool, false)
|
||||||
|
AC_CHECK_TOOL(OBJDUMP, objdump, false)
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
test -z "$AS" && AS=as
|
||||||
|
_LT_DECL([], [AS], [1], [Assembler program])dnl
|
||||||
|
|
||||||
|
test -z "$DLLTOOL" && DLLTOOL=dlltool
|
||||||
|
_LT_DECL([], [DLLTOOL], [1], [DLL creation program])dnl
|
||||||
|
|
||||||
|
test -z "$OBJDUMP" && OBJDUMP=objdump
|
||||||
|
_LT_DECL([], [OBJDUMP], [1], [Object dumper program])dnl
|
||||||
|
])# win32-dll
|
||||||
|
|
||||||
|
AU_DEFUN([AC_LIBTOOL_WIN32_DLL],
|
||||||
|
[AC_REQUIRE([AC_CANONICAL_HOST])dnl
|
||||||
|
_LT_SET_OPTION([LT_INIT], [win32-dll])
|
||||||
|
AC_DIAGNOSE([obsolete],
|
||||||
|
[$0: Remove this warning and the call to _LT_SET_OPTION when you
|
||||||
|
put the 'win32-dll' option into LT_INIT's first parameter.])
|
||||||
|
])
|
||||||
|
|
||||||
|
dnl aclocal-1.4 backwards compatibility:
|
||||||
|
dnl AC_DEFUN([AC_LIBTOOL_WIN32_DLL], [])
|
||||||
|
|
||||||
|
|
||||||
|
# _LT_ENABLE_SHARED([DEFAULT])
|
||||||
|
# ----------------------------
|
||||||
|
# implement the --enable-shared flag, and supports the 'shared' and
|
||||||
|
# 'disable-shared' LT_INIT options.
|
||||||
|
# DEFAULT is either 'yes' or 'no'. If omitted, it defaults to 'yes'.
|
||||||
|
m4_define([_LT_ENABLE_SHARED],
|
||||||
|
[m4_define([_LT_ENABLE_SHARED_DEFAULT], [m4_if($1, no, no, yes)])dnl
|
||||||
|
AC_ARG_ENABLE([shared],
|
||||||
|
[AS_HELP_STRING([--enable-shared@<:@=PKGS@:>@],
|
||||||
|
[build shared libraries @<:@default=]_LT_ENABLE_SHARED_DEFAULT[@:>@])],
|
||||||
|
[p=${PACKAGE-default}
|
||||||
|
case $enableval in
|
||||||
|
yes) enable_shared=yes ;;
|
||||||
|
no) enable_shared=no ;;
|
||||||
|
*)
|
||||||
|
enable_shared=no
|
||||||
|
# Look at the argument we got. We use all the common list separators.
|
||||||
|
lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR,
|
||||||
|
for pkg in $enableval; do
|
||||||
|
IFS=$lt_save_ifs
|
||||||
|
if test "X$pkg" = "X$p"; then
|
||||||
|
enable_shared=yes
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
IFS=$lt_save_ifs
|
||||||
|
;;
|
||||||
|
esac],
|
||||||
|
[enable_shared=]_LT_ENABLE_SHARED_DEFAULT)
|
||||||
|
|
||||||
|
_LT_DECL([build_libtool_libs], [enable_shared], [0],
|
||||||
|
[Whether or not to build shared libraries])
|
||||||
|
])# _LT_ENABLE_SHARED
|
||||||
|
|
||||||
|
LT_OPTION_DEFINE([LT_INIT], [shared], [_LT_ENABLE_SHARED([yes])])
|
||||||
|
LT_OPTION_DEFINE([LT_INIT], [disable-shared], [_LT_ENABLE_SHARED([no])])
|
||||||
|
|
||||||
|
# Old names:
|
||||||
|
AC_DEFUN([AC_ENABLE_SHARED],
|
||||||
|
[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[shared])
|
||||||
|
])
|
||||||
|
|
||||||
|
AC_DEFUN([AC_DISABLE_SHARED],
|
||||||
|
[_LT_SET_OPTION([LT_INIT], [disable-shared])
|
||||||
|
])
|
||||||
|
|
||||||
|
AU_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)])
|
||||||
|
AU_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)])
|
||||||
|
|
||||||
|
dnl aclocal-1.4 backwards compatibility:
|
||||||
|
dnl AC_DEFUN([AM_ENABLE_SHARED], [])
|
||||||
|
dnl AC_DEFUN([AM_DISABLE_SHARED], [])
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
# _LT_ENABLE_STATIC([DEFAULT])
|
||||||
|
# ----------------------------
|
||||||
|
# implement the --enable-static flag, and support the 'static' and
|
||||||
|
# 'disable-static' LT_INIT options.
|
||||||
|
# DEFAULT is either 'yes' or 'no'. If omitted, it defaults to 'yes'.
|
||||||
|
m4_define([_LT_ENABLE_STATIC],
|
||||||
|
[m4_define([_LT_ENABLE_STATIC_DEFAULT], [m4_if($1, no, no, yes)])dnl
|
||||||
|
AC_ARG_ENABLE([static],
|
||||||
|
[AS_HELP_STRING([--enable-static@<:@=PKGS@:>@],
|
||||||
|
[build static libraries @<:@default=]_LT_ENABLE_STATIC_DEFAULT[@:>@])],
|
||||||
|
[p=${PACKAGE-default}
|
||||||
|
case $enableval in
|
||||||
|
yes) enable_static=yes ;;
|
||||||
|
no) enable_static=no ;;
|
||||||
|
*)
|
||||||
|
enable_static=no
|
||||||
|
# Look at the argument we got. We use all the common list separators.
|
||||||
|
lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR,
|
||||||
|
for pkg in $enableval; do
|
||||||
|
IFS=$lt_save_ifs
|
||||||
|
if test "X$pkg" = "X$p"; then
|
||||||
|
enable_static=yes
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
IFS=$lt_save_ifs
|
||||||
|
;;
|
||||||
|
esac],
|
||||||
|
[enable_static=]_LT_ENABLE_STATIC_DEFAULT)
|
||||||
|
|
||||||
|
_LT_DECL([build_old_libs], [enable_static], [0],
|
||||||
|
[Whether or not to build static libraries])
|
||||||
|
])# _LT_ENABLE_STATIC
|
||||||
|
|
||||||
|
LT_OPTION_DEFINE([LT_INIT], [static], [_LT_ENABLE_STATIC([yes])])
|
||||||
|
LT_OPTION_DEFINE([LT_INIT], [disable-static], [_LT_ENABLE_STATIC([no])])
|
||||||
|
|
||||||
|
# Old names:
|
||||||
|
AC_DEFUN([AC_ENABLE_STATIC],
|
||||||
|
[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[static])
|
||||||
|
])
|
||||||
|
|
||||||
|
AC_DEFUN([AC_DISABLE_STATIC],
|
||||||
|
[_LT_SET_OPTION([LT_INIT], [disable-static])
|
||||||
|
])
|
||||||
|
|
||||||
|
AU_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)])
|
||||||
|
AU_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)])
|
||||||
|
|
||||||
|
dnl aclocal-1.4 backwards compatibility:
|
||||||
|
dnl AC_DEFUN([AM_ENABLE_STATIC], [])
|
||||||
|
dnl AC_DEFUN([AM_DISABLE_STATIC], [])
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
# _LT_ENABLE_FAST_INSTALL([DEFAULT])
|
||||||
|
# ----------------------------------
|
||||||
|
# implement the --enable-fast-install flag, and support the 'fast-install'
|
||||||
|
# and 'disable-fast-install' LT_INIT options.
|
||||||
|
# DEFAULT is either 'yes' or 'no'. If omitted, it defaults to 'yes'.
|
||||||
|
m4_define([_LT_ENABLE_FAST_INSTALL],
|
||||||
|
[m4_define([_LT_ENABLE_FAST_INSTALL_DEFAULT], [m4_if($1, no, no, yes)])dnl
|
||||||
|
AC_ARG_ENABLE([fast-install],
|
||||||
|
[AS_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@],
|
||||||
|
[optimize for fast installation @<:@default=]_LT_ENABLE_FAST_INSTALL_DEFAULT[@:>@])],
|
||||||
|
[p=${PACKAGE-default}
|
||||||
|
case $enableval in
|
||||||
|
yes) enable_fast_install=yes ;;
|
||||||
|
no) enable_fast_install=no ;;
|
||||||
|
*)
|
||||||
|
enable_fast_install=no
|
||||||
|
# Look at the argument we got. We use all the common list separators.
|
||||||
|
lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR,
|
||||||
|
for pkg in $enableval; do
|
||||||
|
IFS=$lt_save_ifs
|
||||||
|
if test "X$pkg" = "X$p"; then
|
||||||
|
enable_fast_install=yes
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
IFS=$lt_save_ifs
|
||||||
|
;;
|
||||||
|
esac],
|
||||||
|
[enable_fast_install=]_LT_ENABLE_FAST_INSTALL_DEFAULT)
|
||||||
|
|
||||||
|
_LT_DECL([fast_install], [enable_fast_install], [0],
|
||||||
|
[Whether or not to optimize for fast installation])dnl
|
||||||
|
])# _LT_ENABLE_FAST_INSTALL
|
||||||
|
|
||||||
|
LT_OPTION_DEFINE([LT_INIT], [fast-install], [_LT_ENABLE_FAST_INSTALL([yes])])
|
||||||
|
LT_OPTION_DEFINE([LT_INIT], [disable-fast-install], [_LT_ENABLE_FAST_INSTALL([no])])
|
||||||
|
|
||||||
|
# Old names:
|
||||||
|
AU_DEFUN([AC_ENABLE_FAST_INSTALL],
|
||||||
|
[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[fast-install])
|
||||||
|
AC_DIAGNOSE([obsolete],
|
||||||
|
[$0: Remove this warning and the call to _LT_SET_OPTION when you put
|
||||||
|
the 'fast-install' option into LT_INIT's first parameter.])
|
||||||
|
])
|
||||||
|
|
||||||
|
AU_DEFUN([AC_DISABLE_FAST_INSTALL],
|
||||||
|
[_LT_SET_OPTION([LT_INIT], [disable-fast-install])
|
||||||
|
AC_DIAGNOSE([obsolete],
|
||||||
|
[$0: Remove this warning and the call to _LT_SET_OPTION when you put
|
||||||
|
the 'disable-fast-install' option into LT_INIT's first parameter.])
|
||||||
|
])
|
||||||
|
|
||||||
|
dnl aclocal-1.4 backwards compatibility:
|
||||||
|
dnl AC_DEFUN([AC_ENABLE_FAST_INSTALL], [])
|
||||||
|
dnl AC_DEFUN([AM_DISABLE_FAST_INSTALL], [])
|
||||||
|
|
||||||
|
|
||||||
|
# _LT_WITH_AIX_SONAME([DEFAULT])
|
||||||
|
# ----------------------------------
|
||||||
|
# implement the --with-aix-soname flag, and support the `aix-soname=aix'
|
||||||
|
# and `aix-soname=both' and `aix-soname=svr4' LT_INIT options. DEFAULT
|
||||||
|
# is either `aix', `both' or `svr4'. If omitted, it defaults to `aix'.
|
||||||
|
m4_define([_LT_WITH_AIX_SONAME],
|
||||||
|
[m4_define([_LT_WITH_AIX_SONAME_DEFAULT], [m4_if($1, svr4, svr4, m4_if($1, both, both, aix))])dnl
|
||||||
|
shared_archive_member_spec=
|
||||||
|
case $host,$enable_shared in
|
||||||
|
power*-*-aix[[5-9]]*,yes)
|
||||||
|
AC_MSG_CHECKING([which variant of shared library versioning to provide])
|
||||||
|
AC_ARG_WITH([aix-soname],
|
||||||
|
[AS_HELP_STRING([--with-aix-soname=aix|svr4|both],
|
||||||
|
[shared library versioning (aka "SONAME") variant to provide on AIX, @<:@default=]_LT_WITH_AIX_SONAME_DEFAULT[@:>@.])],
|
||||||
|
[case $withval in
|
||||||
|
aix|svr4|both)
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
AC_MSG_ERROR([Unknown argument to --with-aix-soname])
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
lt_cv_with_aix_soname=$with_aix_soname],
|
||||||
|
[AC_CACHE_VAL([lt_cv_with_aix_soname],
|
||||||
|
[lt_cv_with_aix_soname=]_LT_WITH_AIX_SONAME_DEFAULT)
|
||||||
|
with_aix_soname=$lt_cv_with_aix_soname])
|
||||||
|
AC_MSG_RESULT([$with_aix_soname])
|
||||||
|
if test aix != "$with_aix_soname"; then
|
||||||
|
# For the AIX way of multilib, we name the shared archive member
|
||||||
|
# based on the bitwidth used, traditionally 'shr.o' or 'shr_64.o',
|
||||||
|
# and 'shr.imp' or 'shr_64.imp', respectively, for the Import File.
|
||||||
|
# Even when GNU compilers ignore OBJECT_MODE but need '-maix64' flag,
|
||||||
|
# the AIX toolchain works better with OBJECT_MODE set (default 32).
|
||||||
|
if test 64 = "${OBJECT_MODE-32}"; then
|
||||||
|
shared_archive_member_spec=shr_64
|
||||||
|
else
|
||||||
|
shared_archive_member_spec=shr
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
with_aix_soname=aix
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
_LT_DECL([], [shared_archive_member_spec], [0],
|
||||||
|
[Shared archive member basename, for filename based shared library versioning on AIX])dnl
|
||||||
|
])# _LT_WITH_AIX_SONAME
|
||||||
|
|
||||||
|
LT_OPTION_DEFINE([LT_INIT], [aix-soname=aix], [_LT_WITH_AIX_SONAME([aix])])
|
||||||
|
LT_OPTION_DEFINE([LT_INIT], [aix-soname=both], [_LT_WITH_AIX_SONAME([both])])
|
||||||
|
LT_OPTION_DEFINE([LT_INIT], [aix-soname=svr4], [_LT_WITH_AIX_SONAME([svr4])])
|
||||||
|
|
||||||
|
|
||||||
|
# _LT_WITH_PIC([MODE])
|
||||||
|
# --------------------
|
||||||
|
# implement the --with-pic flag, and support the 'pic-only' and 'no-pic'
|
||||||
|
# LT_INIT options.
|
||||||
|
# MODE is either 'yes' or 'no'. If omitted, it defaults to 'both'.
|
||||||
|
m4_define([_LT_WITH_PIC],
|
||||||
|
[AC_ARG_WITH([pic],
|
||||||
|
[AS_HELP_STRING([--with-pic@<:@=PKGS@:>@],
|
||||||
|
[try to use only PIC/non-PIC objects @<:@default=use both@:>@])],
|
||||||
|
[lt_p=${PACKAGE-default}
|
||||||
|
case $withval in
|
||||||
|
yes|no) pic_mode=$withval ;;
|
||||||
|
*)
|
||||||
|
pic_mode=default
|
||||||
|
# Look at the argument we got. We use all the common list separators.
|
||||||
|
lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR,
|
||||||
|
for lt_pkg in $withval; do
|
||||||
|
IFS=$lt_save_ifs
|
||||||
|
if test "X$lt_pkg" = "X$lt_p"; then
|
||||||
|
pic_mode=yes
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
IFS=$lt_save_ifs
|
||||||
|
;;
|
||||||
|
esac],
|
||||||
|
[pic_mode=m4_default([$1], [default])])
|
||||||
|
|
||||||
|
_LT_DECL([], [pic_mode], [0], [What type of objects to build])dnl
|
||||||
|
])# _LT_WITH_PIC
|
||||||
|
|
||||||
|
LT_OPTION_DEFINE([LT_INIT], [pic-only], [_LT_WITH_PIC([yes])])
|
||||||
|
LT_OPTION_DEFINE([LT_INIT], [no-pic], [_LT_WITH_PIC([no])])
|
||||||
|
|
||||||
|
# Old name:
|
||||||
|
AU_DEFUN([AC_LIBTOOL_PICMODE],
|
||||||
|
[_LT_SET_OPTION([LT_INIT], [pic-only])
|
||||||
|
AC_DIAGNOSE([obsolete],
|
||||||
|
[$0: Remove this warning and the call to _LT_SET_OPTION when you
|
||||||
|
put the 'pic-only' option into LT_INIT's first parameter.])
|
||||||
|
])
|
||||||
|
|
||||||
|
dnl aclocal-1.4 backwards compatibility:
|
||||||
|
dnl AC_DEFUN([AC_LIBTOOL_PICMODE], [])
|
||||||
|
|
||||||
|
## ----------------- ##
|
||||||
|
## LTDL_INIT Options ##
|
||||||
|
## ----------------- ##
|
||||||
|
|
||||||
|
m4_define([_LTDL_MODE], [])
|
||||||
|
LT_OPTION_DEFINE([LTDL_INIT], [nonrecursive],
|
||||||
|
[m4_define([_LTDL_MODE], [nonrecursive])])
|
||||||
|
LT_OPTION_DEFINE([LTDL_INIT], [recursive],
|
||||||
|
[m4_define([_LTDL_MODE], [recursive])])
|
||||||
|
LT_OPTION_DEFINE([LTDL_INIT], [subproject],
|
||||||
|
[m4_define([_LTDL_MODE], [subproject])])
|
||||||
|
|
||||||
|
m4_define([_LTDL_TYPE], [])
|
||||||
|
LT_OPTION_DEFINE([LTDL_INIT], [installable],
|
||||||
|
[m4_define([_LTDL_TYPE], [installable])])
|
||||||
|
LT_OPTION_DEFINE([LTDL_INIT], [convenience],
|
||||||
|
[m4_define([_LTDL_TYPE], [convenience])])
|
||||||
Vendored
+124
@@ -0,0 +1,124 @@
|
|||||||
|
# ltsugar.m4 -- libtool m4 base layer. -*-Autoconf-*-
|
||||||
|
#
|
||||||
|
# Copyright (C) 2004-2005, 2007-2008, 2011-2015 Free Software
|
||||||
|
# Foundation, Inc.
|
||||||
|
# Written by Gary V. Vaughan, 2004
|
||||||
|
#
|
||||||
|
# This file is free software; the Free Software Foundation gives
|
||||||
|
# unlimited permission to copy and/or distribute it, with or without
|
||||||
|
# modifications, as long as this notice is preserved.
|
||||||
|
|
||||||
|
# serial 6 ltsugar.m4
|
||||||
|
|
||||||
|
# This is to help aclocal find these macros, as it can't see m4_define.
|
||||||
|
AC_DEFUN([LTSUGAR_VERSION], [m4_if([0.1])])
|
||||||
|
|
||||||
|
|
||||||
|
# lt_join(SEP, ARG1, [ARG2...])
|
||||||
|
# -----------------------------
|
||||||
|
# Produce ARG1SEPARG2...SEPARGn, omitting [] arguments and their
|
||||||
|
# associated separator.
|
||||||
|
# Needed until we can rely on m4_join from Autoconf 2.62, since all earlier
|
||||||
|
# versions in m4sugar had bugs.
|
||||||
|
m4_define([lt_join],
|
||||||
|
[m4_if([$#], [1], [],
|
||||||
|
[$#], [2], [[$2]],
|
||||||
|
[m4_if([$2], [], [], [[$2]_])$0([$1], m4_shift(m4_shift($@)))])])
|
||||||
|
m4_define([_lt_join],
|
||||||
|
[m4_if([$#$2], [2], [],
|
||||||
|
[m4_if([$2], [], [], [[$1$2]])$0([$1], m4_shift(m4_shift($@)))])])
|
||||||
|
|
||||||
|
|
||||||
|
# lt_car(LIST)
|
||||||
|
# lt_cdr(LIST)
|
||||||
|
# ------------
|
||||||
|
# Manipulate m4 lists.
|
||||||
|
# These macros are necessary as long as will still need to support
|
||||||
|
# Autoconf-2.59, which quotes differently.
|
||||||
|
m4_define([lt_car], [[$1]])
|
||||||
|
m4_define([lt_cdr],
|
||||||
|
[m4_if([$#], 0, [m4_fatal([$0: cannot be called without arguments])],
|
||||||
|
[$#], 1, [],
|
||||||
|
[m4_dquote(m4_shift($@))])])
|
||||||
|
m4_define([lt_unquote], $1)
|
||||||
|
|
||||||
|
|
||||||
|
# lt_append(MACRO-NAME, STRING, [SEPARATOR])
|
||||||
|
# ------------------------------------------
|
||||||
|
# Redefine MACRO-NAME to hold its former content plus 'SEPARATOR''STRING'.
|
||||||
|
# Note that neither SEPARATOR nor STRING are expanded; they are appended
|
||||||
|
# to MACRO-NAME as is (leaving the expansion for when MACRO-NAME is invoked).
|
||||||
|
# No SEPARATOR is output if MACRO-NAME was previously undefined (different
|
||||||
|
# than defined and empty).
|
||||||
|
#
|
||||||
|
# This macro is needed until we can rely on Autoconf 2.62, since earlier
|
||||||
|
# versions of m4sugar mistakenly expanded SEPARATOR but not STRING.
|
||||||
|
m4_define([lt_append],
|
||||||
|
[m4_define([$1],
|
||||||
|
m4_ifdef([$1], [m4_defn([$1])[$3]])[$2])])
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
# lt_combine(SEP, PREFIX-LIST, INFIX, SUFFIX1, [SUFFIX2...])
|
||||||
|
# ----------------------------------------------------------
|
||||||
|
# Produce a SEP delimited list of all paired combinations of elements of
|
||||||
|
# PREFIX-LIST with SUFFIX1 through SUFFIXn. Each element of the list
|
||||||
|
# has the form PREFIXmINFIXSUFFIXn.
|
||||||
|
# Needed until we can rely on m4_combine added in Autoconf 2.62.
|
||||||
|
m4_define([lt_combine],
|
||||||
|
[m4_if(m4_eval([$# > 3]), [1],
|
||||||
|
[m4_pushdef([_Lt_sep], [m4_define([_Lt_sep], m4_defn([lt_car]))])]]dnl
|
||||||
|
[[m4_foreach([_Lt_prefix], [$2],
|
||||||
|
[m4_foreach([_Lt_suffix],
|
||||||
|
]m4_dquote(m4_dquote(m4_shift(m4_shift(m4_shift($@)))))[,
|
||||||
|
[_Lt_sep([$1])[]m4_defn([_Lt_prefix])[$3]m4_defn([_Lt_suffix])])])])])
|
||||||
|
|
||||||
|
|
||||||
|
# lt_if_append_uniq(MACRO-NAME, VARNAME, [SEPARATOR], [UNIQ], [NOT-UNIQ])
|
||||||
|
# -----------------------------------------------------------------------
|
||||||
|
# Iff MACRO-NAME does not yet contain VARNAME, then append it (delimited
|
||||||
|
# by SEPARATOR if supplied) and expand UNIQ, else NOT-UNIQ.
|
||||||
|
m4_define([lt_if_append_uniq],
|
||||||
|
[m4_ifdef([$1],
|
||||||
|
[m4_if(m4_index([$3]m4_defn([$1])[$3], [$3$2$3]), [-1],
|
||||||
|
[lt_append([$1], [$2], [$3])$4],
|
||||||
|
[$5])],
|
||||||
|
[lt_append([$1], [$2], [$3])$4])])
|
||||||
|
|
||||||
|
|
||||||
|
# lt_dict_add(DICT, KEY, VALUE)
|
||||||
|
# -----------------------------
|
||||||
|
m4_define([lt_dict_add],
|
||||||
|
[m4_define([$1($2)], [$3])])
|
||||||
|
|
||||||
|
|
||||||
|
# lt_dict_add_subkey(DICT, KEY, SUBKEY, VALUE)
|
||||||
|
# --------------------------------------------
|
||||||
|
m4_define([lt_dict_add_subkey],
|
||||||
|
[m4_define([$1($2:$3)], [$4])])
|
||||||
|
|
||||||
|
|
||||||
|
# lt_dict_fetch(DICT, KEY, [SUBKEY])
|
||||||
|
# ----------------------------------
|
||||||
|
m4_define([lt_dict_fetch],
|
||||||
|
[m4_ifval([$3],
|
||||||
|
m4_ifdef([$1($2:$3)], [m4_defn([$1($2:$3)])]),
|
||||||
|
m4_ifdef([$1($2)], [m4_defn([$1($2)])]))])
|
||||||
|
|
||||||
|
|
||||||
|
# lt_if_dict_fetch(DICT, KEY, [SUBKEY], VALUE, IF-TRUE, [IF-FALSE])
|
||||||
|
# -----------------------------------------------------------------
|
||||||
|
m4_define([lt_if_dict_fetch],
|
||||||
|
[m4_if(lt_dict_fetch([$1], [$2], [$3]), [$4],
|
||||||
|
[$5],
|
||||||
|
[$6])])
|
||||||
|
|
||||||
|
|
||||||
|
# lt_dict_filter(DICT, [SUBKEY], VALUE, [SEPARATOR], KEY, [...])
|
||||||
|
# --------------------------------------------------------------
|
||||||
|
m4_define([lt_dict_filter],
|
||||||
|
[m4_if([$5], [], [],
|
||||||
|
[lt_join(m4_quote(m4_default([$4], [[, ]])),
|
||||||
|
lt_unquote(m4_split(m4_normalize(m4_foreach(_Lt_key, lt_car([m4_shiftn(4, $@)]),
|
||||||
|
[lt_if_dict_fetch([$1], _Lt_key, [$2], [$3], [_Lt_key ])])))))])[]dnl
|
||||||
|
])
|
||||||
Vendored
+23
@@ -0,0 +1,23 @@
|
|||||||
|
# ltversion.m4 -- version numbers -*- Autoconf -*-
|
||||||
|
#
|
||||||
|
# Copyright (C) 2004, 2011-2015 Free Software Foundation, Inc.
|
||||||
|
# Written by Scott James Remnant, 2004
|
||||||
|
#
|
||||||
|
# This file is free software; the Free Software Foundation gives
|
||||||
|
# unlimited permission to copy and/or distribute it, with or without
|
||||||
|
# modifications, as long as this notice is preserved.
|
||||||
|
|
||||||
|
# @configure_input@
|
||||||
|
|
||||||
|
# serial 4179 ltversion.m4
|
||||||
|
# This file is part of GNU Libtool
|
||||||
|
|
||||||
|
m4_define([LT_PACKAGE_VERSION], [2.4.6])
|
||||||
|
m4_define([LT_PACKAGE_REVISION], [2.4.6])
|
||||||
|
|
||||||
|
AC_DEFUN([LTVERSION_VERSION],
|
||||||
|
[macro_version='2.4.6'
|
||||||
|
macro_revision='2.4.6'
|
||||||
|
_LT_DECL(, macro_version, 0, [Which release of libtool.m4 was used?])
|
||||||
|
_LT_DECL(, macro_revision, 0)
|
||||||
|
])
|
||||||
Vendored
+99
@@ -0,0 +1,99 @@
|
|||||||
|
# lt~obsolete.m4 -- aclocal satisfying obsolete definitions. -*-Autoconf-*-
|
||||||
|
#
|
||||||
|
# Copyright (C) 2004-2005, 2007, 2009, 2011-2015 Free Software
|
||||||
|
# Foundation, Inc.
|
||||||
|
# Written by Scott James Remnant, 2004.
|
||||||
|
#
|
||||||
|
# This file is free software; the Free Software Foundation gives
|
||||||
|
# unlimited permission to copy and/or distribute it, with or without
|
||||||
|
# modifications, as long as this notice is preserved.
|
||||||
|
|
||||||
|
# serial 5 lt~obsolete.m4
|
||||||
|
|
||||||
|
# These exist entirely to fool aclocal when bootstrapping libtool.
|
||||||
|
#
|
||||||
|
# In the past libtool.m4 has provided macros via AC_DEFUN (or AU_DEFUN),
|
||||||
|
# which have later been changed to m4_define as they aren't part of the
|
||||||
|
# exported API, or moved to Autoconf or Automake where they belong.
|
||||||
|
#
|
||||||
|
# The trouble is, aclocal is a bit thick. It'll see the old AC_DEFUN
|
||||||
|
# in /usr/share/aclocal/libtool.m4 and remember it, then when it sees us
|
||||||
|
# using a macro with the same name in our local m4/libtool.m4 it'll
|
||||||
|
# pull the old libtool.m4 in (it doesn't see our shiny new m4_define
|
||||||
|
# and doesn't know about Autoconf macros at all.)
|
||||||
|
#
|
||||||
|
# So we provide this file, which has a silly filename so it's always
|
||||||
|
# included after everything else. This provides aclocal with the
|
||||||
|
# AC_DEFUNs it wants, but when m4 processes it, it doesn't do anything
|
||||||
|
# because those macros already exist, or will be overwritten later.
|
||||||
|
# We use AC_DEFUN over AU_DEFUN for compatibility with aclocal-1.6.
|
||||||
|
#
|
||||||
|
# Anytime we withdraw an AC_DEFUN or AU_DEFUN, remember to add it here.
|
||||||
|
# Yes, that means every name once taken will need to remain here until
|
||||||
|
# we give up compatibility with versions before 1.7, at which point
|
||||||
|
# we need to keep only those names which we still refer to.
|
||||||
|
|
||||||
|
# This is to help aclocal find these macros, as it can't see m4_define.
|
||||||
|
AC_DEFUN([LTOBSOLETE_VERSION], [m4_if([1])])
|
||||||
|
|
||||||
|
m4_ifndef([AC_LIBTOOL_LINKER_OPTION], [AC_DEFUN([AC_LIBTOOL_LINKER_OPTION])])
|
||||||
|
m4_ifndef([AC_PROG_EGREP], [AC_DEFUN([AC_PROG_EGREP])])
|
||||||
|
m4_ifndef([_LT_AC_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH])])
|
||||||
|
m4_ifndef([_LT_AC_SHELL_INIT], [AC_DEFUN([_LT_AC_SHELL_INIT])])
|
||||||
|
m4_ifndef([_LT_AC_SYS_LIBPATH_AIX], [AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX])])
|
||||||
|
m4_ifndef([_LT_PROG_LTMAIN], [AC_DEFUN([_LT_PROG_LTMAIN])])
|
||||||
|
m4_ifndef([_LT_AC_TAGVAR], [AC_DEFUN([_LT_AC_TAGVAR])])
|
||||||
|
m4_ifndef([AC_LTDL_ENABLE_INSTALL], [AC_DEFUN([AC_LTDL_ENABLE_INSTALL])])
|
||||||
|
m4_ifndef([AC_LTDL_PREOPEN], [AC_DEFUN([AC_LTDL_PREOPEN])])
|
||||||
|
m4_ifndef([_LT_AC_SYS_COMPILER], [AC_DEFUN([_LT_AC_SYS_COMPILER])])
|
||||||
|
m4_ifndef([_LT_AC_LOCK], [AC_DEFUN([_LT_AC_LOCK])])
|
||||||
|
m4_ifndef([AC_LIBTOOL_SYS_OLD_ARCHIVE], [AC_DEFUN([AC_LIBTOOL_SYS_OLD_ARCHIVE])])
|
||||||
|
m4_ifndef([_LT_AC_TRY_DLOPEN_SELF], [AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF])])
|
||||||
|
m4_ifndef([AC_LIBTOOL_PROG_CC_C_O], [AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O])])
|
||||||
|
m4_ifndef([AC_LIBTOOL_SYS_HARD_LINK_LOCKS], [AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS])])
|
||||||
|
m4_ifndef([AC_LIBTOOL_OBJDIR], [AC_DEFUN([AC_LIBTOOL_OBJDIR])])
|
||||||
|
m4_ifndef([AC_LTDL_OBJDIR], [AC_DEFUN([AC_LTDL_OBJDIR])])
|
||||||
|
m4_ifndef([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH], [AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH])])
|
||||||
|
m4_ifndef([AC_LIBTOOL_SYS_LIB_STRIP], [AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP])])
|
||||||
|
m4_ifndef([AC_PATH_MAGIC], [AC_DEFUN([AC_PATH_MAGIC])])
|
||||||
|
m4_ifndef([AC_PROG_LD_GNU], [AC_DEFUN([AC_PROG_LD_GNU])])
|
||||||
|
m4_ifndef([AC_PROG_LD_RELOAD_FLAG], [AC_DEFUN([AC_PROG_LD_RELOAD_FLAG])])
|
||||||
|
m4_ifndef([AC_DEPLIBS_CHECK_METHOD], [AC_DEFUN([AC_DEPLIBS_CHECK_METHOD])])
|
||||||
|
m4_ifndef([AC_LIBTOOL_PROG_COMPILER_NO_RTTI], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI])])
|
||||||
|
m4_ifndef([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE], [AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE])])
|
||||||
|
m4_ifndef([AC_LIBTOOL_PROG_COMPILER_PIC], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC])])
|
||||||
|
m4_ifndef([AC_LIBTOOL_PROG_LD_SHLIBS], [AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS])])
|
||||||
|
m4_ifndef([AC_LIBTOOL_POSTDEP_PREDEP], [AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP])])
|
||||||
|
m4_ifndef([LT_AC_PROG_EGREP], [AC_DEFUN([LT_AC_PROG_EGREP])])
|
||||||
|
m4_ifndef([LT_AC_PROG_SED], [AC_DEFUN([LT_AC_PROG_SED])])
|
||||||
|
m4_ifndef([_LT_CC_BASENAME], [AC_DEFUN([_LT_CC_BASENAME])])
|
||||||
|
m4_ifndef([_LT_COMPILER_BOILERPLATE], [AC_DEFUN([_LT_COMPILER_BOILERPLATE])])
|
||||||
|
m4_ifndef([_LT_LINKER_BOILERPLATE], [AC_DEFUN([_LT_LINKER_BOILERPLATE])])
|
||||||
|
m4_ifndef([_AC_PROG_LIBTOOL], [AC_DEFUN([_AC_PROG_LIBTOOL])])
|
||||||
|
m4_ifndef([AC_LIBTOOL_SETUP], [AC_DEFUN([AC_LIBTOOL_SETUP])])
|
||||||
|
m4_ifndef([_LT_AC_CHECK_DLFCN], [AC_DEFUN([_LT_AC_CHECK_DLFCN])])
|
||||||
|
m4_ifndef([AC_LIBTOOL_SYS_DYNAMIC_LINKER], [AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER])])
|
||||||
|
m4_ifndef([_LT_AC_TAGCONFIG], [AC_DEFUN([_LT_AC_TAGCONFIG])])
|
||||||
|
m4_ifndef([AC_DISABLE_FAST_INSTALL], [AC_DEFUN([AC_DISABLE_FAST_INSTALL])])
|
||||||
|
m4_ifndef([_LT_AC_LANG_CXX], [AC_DEFUN([_LT_AC_LANG_CXX])])
|
||||||
|
m4_ifndef([_LT_AC_LANG_F77], [AC_DEFUN([_LT_AC_LANG_F77])])
|
||||||
|
m4_ifndef([_LT_AC_LANG_GCJ], [AC_DEFUN([_LT_AC_LANG_GCJ])])
|
||||||
|
m4_ifndef([AC_LIBTOOL_LANG_C_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG])])
|
||||||
|
m4_ifndef([_LT_AC_LANG_C_CONFIG], [AC_DEFUN([_LT_AC_LANG_C_CONFIG])])
|
||||||
|
m4_ifndef([AC_LIBTOOL_LANG_CXX_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG])])
|
||||||
|
m4_ifndef([_LT_AC_LANG_CXX_CONFIG], [AC_DEFUN([_LT_AC_LANG_CXX_CONFIG])])
|
||||||
|
m4_ifndef([AC_LIBTOOL_LANG_F77_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG])])
|
||||||
|
m4_ifndef([_LT_AC_LANG_F77_CONFIG], [AC_DEFUN([_LT_AC_LANG_F77_CONFIG])])
|
||||||
|
m4_ifndef([AC_LIBTOOL_LANG_GCJ_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG])])
|
||||||
|
m4_ifndef([_LT_AC_LANG_GCJ_CONFIG], [AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG])])
|
||||||
|
m4_ifndef([AC_LIBTOOL_LANG_RC_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG])])
|
||||||
|
m4_ifndef([_LT_AC_LANG_RC_CONFIG], [AC_DEFUN([_LT_AC_LANG_RC_CONFIG])])
|
||||||
|
m4_ifndef([AC_LIBTOOL_CONFIG], [AC_DEFUN([AC_LIBTOOL_CONFIG])])
|
||||||
|
m4_ifndef([_LT_AC_FILE_LTDLL_C], [AC_DEFUN([_LT_AC_FILE_LTDLL_C])])
|
||||||
|
m4_ifndef([_LT_REQUIRED_DARWIN_CHECKS], [AC_DEFUN([_LT_REQUIRED_DARWIN_CHECKS])])
|
||||||
|
m4_ifndef([_LT_AC_PROG_CXXCPP], [AC_DEFUN([_LT_AC_PROG_CXXCPP])])
|
||||||
|
m4_ifndef([_LT_PREPARE_SED_QUOTE_VARS], [AC_DEFUN([_LT_PREPARE_SED_QUOTE_VARS])])
|
||||||
|
m4_ifndef([_LT_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_PROG_ECHO_BACKSLASH])])
|
||||||
|
m4_ifndef([_LT_PROG_F77], [AC_DEFUN([_LT_PROG_F77])])
|
||||||
|
m4_ifndef([_LT_PROG_FC], [AC_DEFUN([_LT_PROG_FC])])
|
||||||
|
m4_ifndef([_LT_PROG_CXX], [AC_DEFUN([_LT_PROG_CXX])])
|
||||||
@@ -0,0 +1,215 @@
|
|||||||
|
#! /bin/sh
|
||||||
|
# Common wrapper for a few potentially missing GNU programs.
|
||||||
|
|
||||||
|
scriptversion=2013-10-28.13; # UTC
|
||||||
|
|
||||||
|
# Copyright (C) 1996-2014 Free Software Foundation, Inc.
|
||||||
|
# Originally written by Fran,cois Pinard <pinard@iro.umontreal.ca>, 1996.
|
||||||
|
|
||||||
|
# This program is free software; you can redistribute it and/or modify
|
||||||
|
# it under the terms of the GNU General Public License as published by
|
||||||
|
# the Free Software Foundation; either version 2, or (at your option)
|
||||||
|
# any later version.
|
||||||
|
|
||||||
|
# This program is distributed in the hope that it will be useful,
|
||||||
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
# GNU General Public License for more details.
|
||||||
|
|
||||||
|
# You should have received a copy of the GNU General Public License
|
||||||
|
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
# As a special exception to the GNU General Public License, if you
|
||||||
|
# distribute this file as part of a program that contains a
|
||||||
|
# configuration script generated by Autoconf, you may include it under
|
||||||
|
# the same distribution terms that you use for the rest of that program.
|
||||||
|
|
||||||
|
if test $# -eq 0; then
|
||||||
|
echo 1>&2 "Try '$0 --help' for more information"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
case $1 in
|
||||||
|
|
||||||
|
--is-lightweight)
|
||||||
|
# Used by our autoconf macros to check whether the available missing
|
||||||
|
# script is modern enough.
|
||||||
|
exit 0
|
||||||
|
;;
|
||||||
|
|
||||||
|
--run)
|
||||||
|
# Back-compat with the calling convention used by older automake.
|
||||||
|
shift
|
||||||
|
;;
|
||||||
|
|
||||||
|
-h|--h|--he|--hel|--help)
|
||||||
|
echo "\
|
||||||
|
$0 [OPTION]... PROGRAM [ARGUMENT]...
|
||||||
|
|
||||||
|
Run 'PROGRAM [ARGUMENT]...', returning a proper advice when this fails due
|
||||||
|
to PROGRAM being missing or too old.
|
||||||
|
|
||||||
|
Options:
|
||||||
|
-h, --help display this help and exit
|
||||||
|
-v, --version output version information and exit
|
||||||
|
|
||||||
|
Supported PROGRAM values:
|
||||||
|
aclocal autoconf autoheader autom4te automake makeinfo
|
||||||
|
bison yacc flex lex help2man
|
||||||
|
|
||||||
|
Version suffixes to PROGRAM as well as the prefixes 'gnu-', 'gnu', and
|
||||||
|
'g' are ignored when checking the name.
|
||||||
|
|
||||||
|
Send bug reports to <bug-automake@gnu.org>."
|
||||||
|
exit $?
|
||||||
|
;;
|
||||||
|
|
||||||
|
-v|--v|--ve|--ver|--vers|--versi|--versio|--version)
|
||||||
|
echo "missing $scriptversion (GNU Automake)"
|
||||||
|
exit $?
|
||||||
|
;;
|
||||||
|
|
||||||
|
-*)
|
||||||
|
echo 1>&2 "$0: unknown '$1' option"
|
||||||
|
echo 1>&2 "Try '$0 --help' for more information"
|
||||||
|
exit 1
|
||||||
|
;;
|
||||||
|
|
||||||
|
esac
|
||||||
|
|
||||||
|
# Run the given program, remember its exit status.
|
||||||
|
"$@"; st=$?
|
||||||
|
|
||||||
|
# If it succeeded, we are done.
|
||||||
|
test $st -eq 0 && exit 0
|
||||||
|
|
||||||
|
# Also exit now if we it failed (or wasn't found), and '--version' was
|
||||||
|
# passed; such an option is passed most likely to detect whether the
|
||||||
|
# program is present and works.
|
||||||
|
case $2 in --version|--help) exit $st;; esac
|
||||||
|
|
||||||
|
# Exit code 63 means version mismatch. This often happens when the user
|
||||||
|
# tries to use an ancient version of a tool on a file that requires a
|
||||||
|
# minimum version.
|
||||||
|
if test $st -eq 63; then
|
||||||
|
msg="probably too old"
|
||||||
|
elif test $st -eq 127; then
|
||||||
|
# Program was missing.
|
||||||
|
msg="missing on your system"
|
||||||
|
else
|
||||||
|
# Program was found and executed, but failed. Give up.
|
||||||
|
exit $st
|
||||||
|
fi
|
||||||
|
|
||||||
|
perl_URL=http://www.perl.org/
|
||||||
|
flex_URL=http://flex.sourceforge.net/
|
||||||
|
gnu_software_URL=http://www.gnu.org/software
|
||||||
|
|
||||||
|
program_details ()
|
||||||
|
{
|
||||||
|
case $1 in
|
||||||
|
aclocal|automake)
|
||||||
|
echo "The '$1' program is part of the GNU Automake package:"
|
||||||
|
echo "<$gnu_software_URL/automake>"
|
||||||
|
echo "It also requires GNU Autoconf, GNU m4 and Perl in order to run:"
|
||||||
|
echo "<$gnu_software_URL/autoconf>"
|
||||||
|
echo "<$gnu_software_URL/m4/>"
|
||||||
|
echo "<$perl_URL>"
|
||||||
|
;;
|
||||||
|
autoconf|autom4te|autoheader)
|
||||||
|
echo "The '$1' program is part of the GNU Autoconf package:"
|
||||||
|
echo "<$gnu_software_URL/autoconf/>"
|
||||||
|
echo "It also requires GNU m4 and Perl in order to run:"
|
||||||
|
echo "<$gnu_software_URL/m4/>"
|
||||||
|
echo "<$perl_URL>"
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
}
|
||||||
|
|
||||||
|
give_advice ()
|
||||||
|
{
|
||||||
|
# Normalize program name to check for.
|
||||||
|
normalized_program=`echo "$1" | sed '
|
||||||
|
s/^gnu-//; t
|
||||||
|
s/^gnu//; t
|
||||||
|
s/^g//; t'`
|
||||||
|
|
||||||
|
printf '%s\n' "'$1' is $msg."
|
||||||
|
|
||||||
|
configure_deps="'configure.ac' or m4 files included by 'configure.ac'"
|
||||||
|
case $normalized_program in
|
||||||
|
autoconf*)
|
||||||
|
echo "You should only need it if you modified 'configure.ac',"
|
||||||
|
echo "or m4 files included by it."
|
||||||
|
program_details 'autoconf'
|
||||||
|
;;
|
||||||
|
autoheader*)
|
||||||
|
echo "You should only need it if you modified 'acconfig.h' or"
|
||||||
|
echo "$configure_deps."
|
||||||
|
program_details 'autoheader'
|
||||||
|
;;
|
||||||
|
automake*)
|
||||||
|
echo "You should only need it if you modified 'Makefile.am' or"
|
||||||
|
echo "$configure_deps."
|
||||||
|
program_details 'automake'
|
||||||
|
;;
|
||||||
|
aclocal*)
|
||||||
|
echo "You should only need it if you modified 'acinclude.m4' or"
|
||||||
|
echo "$configure_deps."
|
||||||
|
program_details 'aclocal'
|
||||||
|
;;
|
||||||
|
autom4te*)
|
||||||
|
echo "You might have modified some maintainer files that require"
|
||||||
|
echo "the 'autom4te' program to be rebuilt."
|
||||||
|
program_details 'autom4te'
|
||||||
|
;;
|
||||||
|
bison*|yacc*)
|
||||||
|
echo "You should only need it if you modified a '.y' file."
|
||||||
|
echo "You may want to install the GNU Bison package:"
|
||||||
|
echo "<$gnu_software_URL/bison/>"
|
||||||
|
;;
|
||||||
|
lex*|flex*)
|
||||||
|
echo "You should only need it if you modified a '.l' file."
|
||||||
|
echo "You may want to install the Fast Lexical Analyzer package:"
|
||||||
|
echo "<$flex_URL>"
|
||||||
|
;;
|
||||||
|
help2man*)
|
||||||
|
echo "You should only need it if you modified a dependency" \
|
||||||
|
"of a man page."
|
||||||
|
echo "You may want to install the GNU Help2man package:"
|
||||||
|
echo "<$gnu_software_URL/help2man/>"
|
||||||
|
;;
|
||||||
|
makeinfo*)
|
||||||
|
echo "You should only need it if you modified a '.texi' file, or"
|
||||||
|
echo "any other file indirectly affecting the aspect of the manual."
|
||||||
|
echo "You might want to install the Texinfo package:"
|
||||||
|
echo "<$gnu_software_URL/texinfo/>"
|
||||||
|
echo "The spurious makeinfo call might also be the consequence of"
|
||||||
|
echo "using a buggy 'make' (AIX, DU, IRIX), in which case you might"
|
||||||
|
echo "want to install GNU make:"
|
||||||
|
echo "<$gnu_software_URL/make/>"
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
echo "You might have modified some files without having the proper"
|
||||||
|
echo "tools for further handling them. Check the 'README' file, it"
|
||||||
|
echo "often tells you about the needed prerequisites for installing"
|
||||||
|
echo "this package. You may also peek at any GNU archive site, in"
|
||||||
|
echo "case some other package contains this missing '$1' program."
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
}
|
||||||
|
|
||||||
|
give_advice "$1" | sed -e '1s/^/WARNING: /' \
|
||||||
|
-e '2,$s/^/ /' >&2
|
||||||
|
|
||||||
|
# Propagate the correct exit status (expected to be 127 for a program
|
||||||
|
# not found, 63 for a program that failed due to version mismatch).
|
||||||
|
exit $st
|
||||||
|
|
||||||
|
# Local variables:
|
||||||
|
# eval: (add-hook 'write-file-hooks 'time-stamp)
|
||||||
|
# time-stamp-start: "scriptversion="
|
||||||
|
# time-stamp-format: "%:y-%02m-%02d.%02H"
|
||||||
|
# time-stamp-time-zone: "UTC"
|
||||||
|
# time-stamp-end: "; # UTC"
|
||||||
|
# End:
|
||||||
Reference in New Issue
Block a user