mirror of
https://gitlab.freedesktop.org/libfprint/libfprint.git
synced 2026-06-11 10:34:18 +00:00
Created Async libusb branch. Still working on it.
This commit is contained in:
@@ -0,0 +1 @@
|
||||
# dummy
|
||||
@@ -0,0 +1 @@
|
||||
# dummy
|
||||
@@ -0,0 +1 @@
|
||||
# dummy
|
||||
@@ -0,0 +1 @@
|
||||
# dummy
|
||||
@@ -0,0 +1 @@
|
||||
# dummy
|
||||
@@ -0,0 +1,516 @@
|
||||
# Makefile.in generated by automake 1.10.1 from Makefile.am.
|
||||
# examples/Makefile. Generated from Makefile.in by configure.
|
||||
|
||||
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
|
||||
# 2003, 2004, 2005, 2006, 2007, 2008 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.
|
||||
|
||||
|
||||
|
||||
|
||||
pkgdatadir = $(datadir)/libfprint
|
||||
pkglibdir = $(libdir)/libfprint
|
||||
pkgincludedir = $(includedir)/libfprint
|
||||
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 = x86_64-pc-linux-gnu
|
||||
host_triplet = x86_64-pc-linux-gnu
|
||||
noinst_PROGRAMS = verify_live$(EXEEXT) enroll$(EXEEXT) verify$(EXEEXT) \
|
||||
img_capture$(EXEEXT) $(am__EXEEXT_1)
|
||||
#am__append_1 = img_capture_continuous
|
||||
subdir = examples
|
||||
DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
|
||||
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
|
||||
am__aclocal_m4_deps = $(top_srcdir)/configure.ac
|
||||
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
|
||||
$(ACLOCAL_M4)
|
||||
mkinstalldirs = $(install_sh) -d
|
||||
CONFIG_HEADER = $(top_builddir)/config.h
|
||||
CONFIG_CLEAN_FILES =
|
||||
#am__EXEEXT_1 = \
|
||||
# img_capture_continuous$(EXEEXT)
|
||||
PROGRAMS = $(noinst_PROGRAMS)
|
||||
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
|
||||
#am_img_capture_continuous_OBJECTS = img_capture_continuous-img_capture_continuous.$(OBJEXT)
|
||||
img_capture_continuous_OBJECTS = $(am_img_capture_continuous_OBJECTS)
|
||||
am__DEPENDENCIES_1 =
|
||||
#img_capture_continuous_DEPENDENCIES = \
|
||||
# ../libfprint/libfprint.la \
|
||||
# $(am__DEPENDENCIES_1) \
|
||||
# $(X_EXTRA_LIBS);
|
||||
img_capture_continuous_LINK = $(LIBTOOL) --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
|
||||
DEFAULT_INCLUDES = -I. -I$(top_builddir)
|
||||
depcomp = $(SHELL) $(top_srcdir)/depcomp
|
||||
am__depfiles_maybe = depfiles
|
||||
COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
|
||||
$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
|
||||
LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
|
||||
--mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
|
||||
$(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
|
||||
CCLD = $(CC)
|
||||
LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
|
||||
--mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \
|
||||
$(LDFLAGS) -o $@
|
||||
SOURCES = $(enroll_SOURCES) $(img_capture_SOURCES) \
|
||||
$(img_capture_continuous_SOURCES) $(verify_SOURCES) \
|
||||
$(verify_live_SOURCES)
|
||||
DIST_SOURCES = $(enroll_SOURCES) $(img_capture_SOURCES) \
|
||||
$(am__img_capture_continuous_SOURCES_DIST) $(verify_SOURCES) \
|
||||
$(verify_live_SOURCES)
|
||||
ETAGS = etags
|
||||
CTAGS = ctags
|
||||
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
|
||||
ACLOCAL = ${SHELL} /home/vlady/debian/packages/fprint/libfprint/async-lib/trunk/missing --run aclocal-1.10
|
||||
AMTAR = ${SHELL} /home/vlady/debian/packages/fprint/libfprint/async-lib/trunk/missing --run tar
|
||||
AM_CFLAGS = -std=gnu99 -fgnu89-inline -Wall -Wundef -Wunused -Wstrict-prototypes -Werror-implicit-function-declaration -Wno-pointer-sign -Wshadow
|
||||
AR = ar
|
||||
AUTOCONF = ${SHELL} /home/vlady/debian/packages/fprint/libfprint/async-lib/trunk/missing --run autoconf
|
||||
AUTOHEADER = ${SHELL} /home/vlady/debian/packages/fprint/libfprint/async-lib/trunk/missing --run autoheader
|
||||
AUTOMAKE = ${SHELL} /home/vlady/debian/packages/fprint/libfprint/async-lib/trunk/missing --run automake-1.10
|
||||
AWK = gawk
|
||||
CC = x86_64-linux-gnu-gcc
|
||||
CCDEPMODE = depmode=gcc3
|
||||
CFLAGS = -g -O2
|
||||
CPP = x86_64-linux-gnu-gcc -E
|
||||
CPPFLAGS =
|
||||
CRYPTO_CFLAGS =
|
||||
CRYPTO_LIBS = -lcrypto
|
||||
CXX = x86_64-linux-gnu-g++
|
||||
CXXCPP = x86_64-linux-gnu-g++ -E
|
||||
CXXDEPMODE = depmode=gcc3
|
||||
CXXFLAGS = -g -O2
|
||||
CYGPATH_W = echo
|
||||
DEFS = -DHAVE_CONFIG_H
|
||||
DEPDIR = .deps
|
||||
DSYMUTIL =
|
||||
ECHO = echo
|
||||
ECHO_C =
|
||||
ECHO_N = -n
|
||||
ECHO_T =
|
||||
EGREP = /bin/grep -E
|
||||
EXEEXT =
|
||||
F77 =
|
||||
FFLAGS = -g -O2
|
||||
GLIB_CFLAGS = -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include
|
||||
GLIB_LIBS = -lglib-2.0
|
||||
GREP = /bin/grep
|
||||
IMAGEMAGICK_CFLAGS =
|
||||
IMAGEMAGICK_LIBS = -lWand -lMagick
|
||||
INSTALL = /usr/bin/install -c
|
||||
INSTALL_DATA = ${INSTALL} -m 644
|
||||
INSTALL_PROGRAM = ${INSTALL}
|
||||
INSTALL_SCRIPT = ${INSTALL}
|
||||
INSTALL_STRIP_PROGRAM = $(install_sh) -c -s
|
||||
LDFLAGS = -Wl,-z,defs
|
||||
LIBOBJS =
|
||||
LIBS =
|
||||
LIBTOOL = $(SHELL) $(top_builddir)/libtool
|
||||
LIBUSB_CFLAGS = -I/usr/include/libusb-1.0
|
||||
LIBUSB_LIBS = -lusb-1.0
|
||||
LN_S = ln -s
|
||||
LTLIBOBJS =
|
||||
MAKEINFO = ${SHELL} /home/vlady/debian/packages/fprint/libfprint/async-lib/trunk/missing --run makeinfo
|
||||
MKDIR_P = /bin/mkdir -p
|
||||
NMEDIT =
|
||||
OBJEXT = o
|
||||
PACKAGE = libfprint
|
||||
PACKAGE_BUGREPORT =
|
||||
PACKAGE_NAME = libfprint
|
||||
PACKAGE_STRING = libfprint 0.1.0-pre
|
||||
PACKAGE_TARNAME = libfprint
|
||||
PACKAGE_VERSION = 0.1.0-pre
|
||||
PATH_SEPARATOR = :
|
||||
PKG_CONFIG = /usr/bin/pkg-config
|
||||
RANLIB = ranlib
|
||||
SED = /bin/sed
|
||||
SET_MAKE =
|
||||
SHELL = /bin/sh
|
||||
STRIP = strip
|
||||
VERSION = 0.1.0-pre
|
||||
XV_CFLAGS =
|
||||
XV_LIBS =
|
||||
abs_builddir = /home/vlady/debian/packages/fprint/libfprint/async-lib/trunk/examples
|
||||
abs_srcdir = /home/vlady/debian/packages/fprint/libfprint/async-lib/trunk/examples
|
||||
abs_top_builddir = /home/vlady/debian/packages/fprint/libfprint/async-lib/trunk
|
||||
abs_top_srcdir = /home/vlady/debian/packages/fprint/libfprint/async-lib/trunk
|
||||
ac_ct_CC =
|
||||
ac_ct_CXX =
|
||||
ac_ct_F77 =
|
||||
am__include = include
|
||||
am__leading_dot = .
|
||||
am__quote =
|
||||
am__tar = ${AMTAR} chof - "$$tardir"
|
||||
am__untar = ${AMTAR} xf -
|
||||
bindir = ${exec_prefix}/bin
|
||||
build = x86_64-pc-linux-gnu
|
||||
build_alias = x86_64-linux-gnu
|
||||
build_cpu = x86_64
|
||||
build_os = linux-gnu
|
||||
build_vendor = pc
|
||||
builddir = .
|
||||
datadir = ${datarootdir}
|
||||
datarootdir = ${prefix}/share
|
||||
docdir = ${datarootdir}/doc/${PACKAGE_TARNAME}
|
||||
dvidir = ${docdir}
|
||||
exec_prefix = ${prefix}
|
||||
host = x86_64-pc-linux-gnu
|
||||
host_alias = x86_64-linux-gnu
|
||||
host_cpu = x86_64
|
||||
host_os = linux-gnu
|
||||
host_vendor = pc
|
||||
htmldir = ${docdir}
|
||||
includedir = ${prefix}/include
|
||||
infodir = ${prefix}/share/info
|
||||
install_sh = $(SHELL) /home/vlady/debian/packages/fprint/libfprint/async-lib/trunk/install-sh
|
||||
libdir = ${exec_prefix}/lib
|
||||
libexecdir = ${exec_prefix}/libexec
|
||||
localedir = ${datarootdir}/locale
|
||||
localstatedir = ${prefix}/var
|
||||
lt_age = 0
|
||||
lt_major = 0
|
||||
lt_revision = 0
|
||||
mandir = ${prefix}/share/man
|
||||
mkdir_p = /bin/mkdir -p
|
||||
oldincludedir = /usr/include
|
||||
pdfdir = ${docdir}
|
||||
prefix = /usr
|
||||
program_transform_name = s,x,x,
|
||||
psdir = ${docdir}
|
||||
sbindir = ${exec_prefix}/sbin
|
||||
sharedstatedir = ${prefix}/com
|
||||
srcdir = .
|
||||
sysconfdir = ${prefix}/etc
|
||||
target_alias =
|
||||
top_builddir = ..
|
||||
top_srcdir = ..
|
||||
INCLUDES = -I$(top_srcdir)
|
||||
verify_live_SOURCES = verify_live.c
|
||||
verify_live_LDADD = ../libfprint/libfprint.la -lfprint
|
||||
enroll_SOURCES = enroll.c
|
||||
enroll_LDADD = ../libfprint/libfprint.la -lfprint
|
||||
verify_SOURCES = verify.c
|
||||
verify_LDADD = ../libfprint/libfprint.la -lfprint
|
||||
img_capture_SOURCES = img_capture.c
|
||||
img_capture_LDADD = ../libfprint/libfprint.la -lfprint
|
||||
#img_capture_continuous_CFLAGS = $(X_CFLAGS) $(XV_CFLAGS)
|
||||
#img_capture_continuous_SOURCES = img_capture_continuous.c
|
||||
#img_capture_continuous_LDADD = ../libfprint/libfprint.la -lfprint $(X_LIBS) $(X_PRE_LIBS) $(XV_LIBS) -lX11 $(X_EXTRA_LIBS);
|
||||
all: all-am
|
||||
|
||||
.SUFFIXES:
|
||||
.SUFFIXES: .c .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 \
|
||||
&& exit 0; \
|
||||
exit 1;; \
|
||||
esac; \
|
||||
done; \
|
||||
echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu examples/Makefile'; \
|
||||
cd $(top_srcdir) && \
|
||||
$(AUTOMAKE) --gnu examples/Makefile
|
||||
.PRECIOUS: 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
|
||||
|
||||
clean-noinstPROGRAMS:
|
||||
@list='$(noinst_PROGRAMS)'; for p in $$list; do \
|
||||
f=`echo $$p|sed 's/$(EXEEXT)$$//'`; \
|
||||
echo " rm -f $$p $$f"; \
|
||||
rm -f $$p $$f ; \
|
||||
done
|
||||
enroll$(EXEEXT): $(enroll_OBJECTS) $(enroll_DEPENDENCIES)
|
||||
@rm -f enroll$(EXEEXT)
|
||||
$(LINK) $(enroll_OBJECTS) $(enroll_LDADD) $(LIBS)
|
||||
img_capture$(EXEEXT): $(img_capture_OBJECTS) $(img_capture_DEPENDENCIES)
|
||||
@rm -f img_capture$(EXEEXT)
|
||||
$(LINK) $(img_capture_OBJECTS) $(img_capture_LDADD) $(LIBS)
|
||||
img_capture_continuous$(EXEEXT): $(img_capture_continuous_OBJECTS) $(img_capture_continuous_DEPENDENCIES)
|
||||
@rm -f img_capture_continuous$(EXEEXT)
|
||||
$(img_capture_continuous_LINK) $(img_capture_continuous_OBJECTS) $(img_capture_continuous_LDADD) $(LIBS)
|
||||
verify$(EXEEXT): $(verify_OBJECTS) $(verify_DEPENDENCIES)
|
||||
@rm -f verify$(EXEEXT)
|
||||
$(LINK) $(verify_OBJECTS) $(verify_LDADD) $(LIBS)
|
||||
verify_live$(EXEEXT): $(verify_live_OBJECTS) $(verify_live_DEPENDENCIES)
|
||||
@rm -f verify_live$(EXEEXT)
|
||||
$(LINK) $(verify_live_OBJECTS) $(verify_live_LDADD) $(LIBS)
|
||||
|
||||
mostlyclean-compile:
|
||||
-rm -f *.$(OBJEXT)
|
||||
|
||||
distclean-compile:
|
||||
-rm -f *.tab.c
|
||||
|
||||
include ./$(DEPDIR)/enroll.Po
|
||||
include ./$(DEPDIR)/img_capture.Po
|
||||
include ./$(DEPDIR)/img_capture_continuous-img_capture_continuous.Po
|
||||
include ./$(DEPDIR)/verify.Po
|
||||
include ./$(DEPDIR)/verify_live.Po
|
||||
|
||||
.c.o:
|
||||
$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
|
||||
mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
|
||||
# source='$<' object='$@' libtool=no \
|
||||
# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \
|
||||
# $(COMPILE) -c $<
|
||||
|
||||
.c.obj:
|
||||
$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
|
||||
mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
|
||||
# source='$<' object='$@' libtool=no \
|
||||
# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \
|
||||
# $(COMPILE) -c `$(CYGPATH_W) '$<'`
|
||||
|
||||
.c.lo:
|
||||
$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
|
||||
mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
|
||||
# source='$<' object='$@' libtool=yes \
|
||||
# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \
|
||||
# $(LTCOMPILE) -c -o $@ $<
|
||||
|
||||
img_capture_continuous-img_capture_continuous.o: img_capture_continuous.c
|
||||
$(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
|
||||
mv -f $(DEPDIR)/img_capture_continuous-img_capture_continuous.Tpo $(DEPDIR)/img_capture_continuous-img_capture_continuous.Po
|
||||
# source='img_capture_continuous.c' object='img_capture_continuous-img_capture_continuous.o' libtool=no \
|
||||
# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \
|
||||
# $(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
|
||||
$(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`
|
||||
mv -f $(DEPDIR)/img_capture_continuous-img_capture_continuous.Tpo $(DEPDIR)/img_capture_continuous-img_capture_continuous.Po
|
||||
# source='img_capture_continuous.c' object='img_capture_continuous-img_capture_continuous.obj' libtool=no \
|
||||
# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \
|
||||
# $(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`
|
||||
|
||||
mostlyclean-libtool:
|
||||
-rm -f *.lo
|
||||
|
||||
clean-libtool:
|
||||
-rm -rf .libs _libs
|
||||
|
||||
ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
|
||||
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
|
||||
unique=`for i in $$list; do \
|
||||
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
|
||||
done | \
|
||||
$(AWK) '{ files[$$0] = 1; nonemtpy = 1; } \
|
||||
END { if (nonempty) { for (i in files) print i; }; }'`; \
|
||||
mkid -fID $$unique
|
||||
tags: TAGS
|
||||
|
||||
TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
|
||||
$(TAGS_FILES) $(LISP)
|
||||
tags=; \
|
||||
here=`pwd`; \
|
||||
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
|
||||
unique=`for i in $$list; do \
|
||||
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
|
||||
done | \
|
||||
$(AWK) '{ files[$$0] = 1; nonempty = 1; } \
|
||||
END { if (nonempty) { for (i in files) print i; }; }'`; \
|
||||
if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \
|
||||
test -n "$$unique" || unique=$$empty_fix; \
|
||||
$(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
|
||||
$$tags $$unique; \
|
||||
fi
|
||||
ctags: CTAGS
|
||||
CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
|
||||
$(TAGS_FILES) $(LISP)
|
||||
tags=; \
|
||||
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
|
||||
unique=`for i in $$list; do \
|
||||
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
|
||||
done | \
|
||||
$(AWK) '{ files[$$0] = 1; nonempty = 1; } \
|
||||
END { if (nonempty) { for (i in files) print i; }; }'`; \
|
||||
test -z "$(CTAGS_ARGS)$$tags$$unique" \
|
||||
|| $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
|
||||
$$tags $$unique
|
||||
|
||||
GTAGS:
|
||||
here=`$(am__cd) $(top_builddir) && pwd` \
|
||||
&& cd $(top_srcdir) \
|
||||
&& gtags -i $(GTAGS_ARGS) $$here
|
||||
|
||||
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 $(srcdir)/$$file && test $$d != $(srcdir); then \
|
||||
cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
|
||||
fi; \
|
||||
cp -pR $$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:
|
||||
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
|
||||
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
|
||||
`test -z '$(STRIP)' || \
|
||||
echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
|
||||
mostlyclean-generic:
|
||||
|
||||
clean-generic:
|
||||
|
||||
distclean-generic:
|
||||
-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_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
|
||||
|
||||
info: info-am
|
||||
|
||||
info-am:
|
||||
|
||||
install-data-am:
|
||||
|
||||
install-dvi: install-dvi-am
|
||||
|
||||
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
|
||||
|
||||
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 all all-am check check-am clean clean-generic \
|
||||
clean-libtool clean-noinstPROGRAMS ctags 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 uninstall uninstall-am
|
||||
|
||||
# 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,23 @@
|
||||
INCLUDES = -I$(top_srcdir)
|
||||
noinst_PROGRAMS = verify_live enroll verify img_capture
|
||||
|
||||
verify_live_SOURCES = verify_live.c
|
||||
verify_live_LDADD = ../libfprint/libfprint.la -lfprint
|
||||
|
||||
enroll_SOURCES = enroll.c
|
||||
enroll_LDADD = ../libfprint/libfprint.la -lfprint
|
||||
|
||||
verify_SOURCES = verify.c
|
||||
verify_LDADD = ../libfprint/libfprint.la -lfprint
|
||||
|
||||
img_capture_SOURCES = img_capture.c
|
||||
img_capture_LDADD = ../libfprint/libfprint.la -lfprint
|
||||
|
||||
if BUILD_X11_EXAMPLES
|
||||
noinst_PROGRAMS += img_capture_continuous
|
||||
|
||||
img_capture_continuous_CFLAGS = $(X_CFLAGS) $(XV_CFLAGS)
|
||||
img_capture_continuous_SOURCES = img_capture_continuous.c
|
||||
img_capture_continuous_LDADD = ../libfprint/libfprint.la -lfprint $(X_LIBS) $(X_PRE_LIBS) $(XV_LIBS) -lX11 $(X_EXTRA_LIBS);
|
||||
endif
|
||||
|
||||
@@ -0,0 +1,516 @@
|
||||
# Makefile.in generated by automake 1.10.1 from Makefile.am.
|
||||
# @configure_input@
|
||||
|
||||
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
|
||||
# 2003, 2004, 2005, 2006, 2007, 2008 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@
|
||||
pkgdatadir = $(datadir)/@PACKAGE@
|
||||
pkglibdir = $(libdir)/@PACKAGE@
|
||||
pkgincludedir = $(includedir)/@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) $(am__EXEEXT_1)
|
||||
@BUILD_X11_EXAMPLES_TRUE@am__append_1 = img_capture_continuous
|
||||
subdir = examples
|
||||
DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
|
||||
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
|
||||
am__aclocal_m4_deps = $(top_srcdir)/configure.ac
|
||||
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
|
||||
$(ACLOCAL_M4)
|
||||
mkinstalldirs = $(install_sh) -d
|
||||
CONFIG_HEADER = $(top_builddir)/config.h
|
||||
CONFIG_CLEAN_FILES =
|
||||
@BUILD_X11_EXAMPLES_TRUE@am__EXEEXT_1 = \
|
||||
@BUILD_X11_EXAMPLES_TRUE@ img_capture_continuous$(EXEEXT)
|
||||
PROGRAMS = $(noinst_PROGRAMS)
|
||||
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) --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
|
||||
DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)
|
||||
depcomp = $(SHELL) $(top_srcdir)/depcomp
|
||||
am__depfiles_maybe = depfiles
|
||||
COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
|
||||
$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
|
||||
LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
|
||||
--mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
|
||||
$(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
|
||||
CCLD = $(CC)
|
||||
LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
|
||||
--mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \
|
||||
$(LDFLAGS) -o $@
|
||||
SOURCES = $(enroll_SOURCES) $(img_capture_SOURCES) \
|
||||
$(img_capture_continuous_SOURCES) $(verify_SOURCES) \
|
||||
$(verify_live_SOURCES)
|
||||
DIST_SOURCES = $(enroll_SOURCES) $(img_capture_SOURCES) \
|
||||
$(am__img_capture_continuous_SOURCES_DIST) $(verify_SOURCES) \
|
||||
$(verify_live_SOURCES)
|
||||
ETAGS = etags
|
||||
CTAGS = ctags
|
||||
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
|
||||
ACLOCAL = @ACLOCAL@
|
||||
AMTAR = @AMTAR@
|
||||
AM_CFLAGS = @AM_CFLAGS@
|
||||
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@
|
||||
DSYMUTIL = @DSYMUTIL@
|
||||
ECHO = @ECHO@
|
||||
ECHO_C = @ECHO_C@
|
||||
ECHO_N = @ECHO_N@
|
||||
ECHO_T = @ECHO_T@
|
||||
EGREP = @EGREP@
|
||||
EXEEXT = @EXEEXT@
|
||||
F77 = @F77@
|
||||
FFLAGS = @FFLAGS@
|
||||
GLIB_CFLAGS = @GLIB_CFLAGS@
|
||||
GLIB_LIBS = @GLIB_LIBS@
|
||||
GREP = @GREP@
|
||||
IMAGEMAGICK_CFLAGS = @IMAGEMAGICK_CFLAGS@
|
||||
IMAGEMAGICK_LIBS = @IMAGEMAGICK_LIBS@
|
||||
INSTALL = @INSTALL@
|
||||
INSTALL_DATA = @INSTALL_DATA@
|
||||
INSTALL_PROGRAM = @INSTALL_PROGRAM@
|
||||
INSTALL_SCRIPT = @INSTALL_SCRIPT@
|
||||
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
|
||||
LDFLAGS = @LDFLAGS@
|
||||
LIBOBJS = @LIBOBJS@
|
||||
LIBS = @LIBS@
|
||||
LIBTOOL = @LIBTOOL@
|
||||
LIBUSB_CFLAGS = @LIBUSB_CFLAGS@
|
||||
LIBUSB_LIBS = @LIBUSB_LIBS@
|
||||
LN_S = @LN_S@
|
||||
LTLIBOBJS = @LTLIBOBJS@
|
||||
MAKEINFO = @MAKEINFO@
|
||||
MKDIR_P = @MKDIR_P@
|
||||
NMEDIT = @NMEDIT@
|
||||
OBJEXT = @OBJEXT@
|
||||
PACKAGE = @PACKAGE@
|
||||
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
|
||||
PACKAGE_NAME = @PACKAGE_NAME@
|
||||
PACKAGE_STRING = @PACKAGE_STRING@
|
||||
PACKAGE_TARNAME = @PACKAGE_TARNAME@
|
||||
PACKAGE_VERSION = @PACKAGE_VERSION@
|
||||
PATH_SEPARATOR = @PATH_SEPARATOR@
|
||||
PKG_CONFIG = @PKG_CONFIG@
|
||||
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_CC = @ac_ct_CC@
|
||||
ac_ct_CXX = @ac_ct_CXX@
|
||||
ac_ct_F77 = @ac_ct_F77@
|
||||
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_builddir = @top_builddir@
|
||||
top_srcdir = @top_srcdir@
|
||||
INCLUDES = -I$(top_srcdir)
|
||||
verify_live_SOURCES = verify_live.c
|
||||
verify_live_LDADD = ../libfprint/libfprint.la -lfprint
|
||||
enroll_SOURCES = enroll.c
|
||||
enroll_LDADD = ../libfprint/libfprint.la -lfprint
|
||||
verify_SOURCES = verify.c
|
||||
verify_LDADD = ../libfprint/libfprint.la -lfprint
|
||||
img_capture_SOURCES = img_capture.c
|
||||
img_capture_LDADD = ../libfprint/libfprint.la -lfprint
|
||||
@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 -lfprint $(X_LIBS) $(X_PRE_LIBS) $(XV_LIBS) -lX11 $(X_EXTRA_LIBS);
|
||||
all: all-am
|
||||
|
||||
.SUFFIXES:
|
||||
.SUFFIXES: .c .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 \
|
||||
&& exit 0; \
|
||||
exit 1;; \
|
||||
esac; \
|
||||
done; \
|
||||
echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu examples/Makefile'; \
|
||||
cd $(top_srcdir) && \
|
||||
$(AUTOMAKE) --gnu examples/Makefile
|
||||
.PRECIOUS: 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
|
||||
|
||||
clean-noinstPROGRAMS:
|
||||
@list='$(noinst_PROGRAMS)'; for p in $$list; do \
|
||||
f=`echo $$p|sed 's/$(EXEEXT)$$//'`; \
|
||||
echo " rm -f $$p $$f"; \
|
||||
rm -f $$p $$f ; \
|
||||
done
|
||||
enroll$(EXEEXT): $(enroll_OBJECTS) $(enroll_DEPENDENCIES)
|
||||
@rm -f enroll$(EXEEXT)
|
||||
$(LINK) $(enroll_OBJECTS) $(enroll_LDADD) $(LIBS)
|
||||
img_capture$(EXEEXT): $(img_capture_OBJECTS) $(img_capture_DEPENDENCIES)
|
||||
@rm -f img_capture$(EXEEXT)
|
||||
$(LINK) $(img_capture_OBJECTS) $(img_capture_LDADD) $(LIBS)
|
||||
img_capture_continuous$(EXEEXT): $(img_capture_continuous_OBJECTS) $(img_capture_continuous_DEPENDENCIES)
|
||||
@rm -f img_capture_continuous$(EXEEXT)
|
||||
$(img_capture_continuous_LINK) $(img_capture_continuous_OBJECTS) $(img_capture_continuous_LDADD) $(LIBS)
|
||||
verify$(EXEEXT): $(verify_OBJECTS) $(verify_DEPENDENCIES)
|
||||
@rm -f verify$(EXEEXT)
|
||||
$(LINK) $(verify_OBJECTS) $(verify_LDADD) $(LIBS)
|
||||
verify_live$(EXEEXT): $(verify_live_OBJECTS) $(verify_live_DEPENDENCIES)
|
||||
@rm -f verify_live$(EXEEXT)
|
||||
$(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)/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@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
|
||||
@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||
@am__fastdepCC_FALSE@ $(COMPILE) -c $<
|
||||
|
||||
.c.obj:
|
||||
@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
|
||||
@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||
@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'`
|
||||
|
||||
.c.lo:
|
||||
@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
|
||||
@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||
@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $<
|
||||
|
||||
img_capture_continuous-img_capture_continuous.o: img_capture_continuous.c
|
||||
@am__fastdepCC_TRUE@ $(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@ mv -f $(DEPDIR)/img_capture_continuous-img_capture_continuous.Tpo $(DEPDIR)/img_capture_continuous-img_capture_continuous.Po
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ 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@ $(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@ $(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@ mv -f $(DEPDIR)/img_capture_continuous-img_capture_continuous.Tpo $(DEPDIR)/img_capture_continuous-img_capture_continuous.Po
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ 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@ $(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`
|
||||
|
||||
mostlyclean-libtool:
|
||||
-rm -f *.lo
|
||||
|
||||
clean-libtool:
|
||||
-rm -rf .libs _libs
|
||||
|
||||
ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
|
||||
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
|
||||
unique=`for i in $$list; do \
|
||||
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
|
||||
done | \
|
||||
$(AWK) '{ files[$$0] = 1; nonemtpy = 1; } \
|
||||
END { if (nonempty) { for (i in files) print i; }; }'`; \
|
||||
mkid -fID $$unique
|
||||
tags: TAGS
|
||||
|
||||
TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
|
||||
$(TAGS_FILES) $(LISP)
|
||||
tags=; \
|
||||
here=`pwd`; \
|
||||
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
|
||||
unique=`for i in $$list; do \
|
||||
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
|
||||
done | \
|
||||
$(AWK) '{ files[$$0] = 1; nonempty = 1; } \
|
||||
END { if (nonempty) { for (i in files) print i; }; }'`; \
|
||||
if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \
|
||||
test -n "$$unique" || unique=$$empty_fix; \
|
||||
$(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
|
||||
$$tags $$unique; \
|
||||
fi
|
||||
ctags: CTAGS
|
||||
CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
|
||||
$(TAGS_FILES) $(LISP)
|
||||
tags=; \
|
||||
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
|
||||
unique=`for i in $$list; do \
|
||||
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
|
||||
done | \
|
||||
$(AWK) '{ files[$$0] = 1; nonempty = 1; } \
|
||||
END { if (nonempty) { for (i in files) print i; }; }'`; \
|
||||
test -z "$(CTAGS_ARGS)$$tags$$unique" \
|
||||
|| $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
|
||||
$$tags $$unique
|
||||
|
||||
GTAGS:
|
||||
here=`$(am__cd) $(top_builddir) && pwd` \
|
||||
&& cd $(top_srcdir) \
|
||||
&& gtags -i $(GTAGS_ARGS) $$here
|
||||
|
||||
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 $(srcdir)/$$file && test $$d != $(srcdir); then \
|
||||
cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
|
||||
fi; \
|
||||
cp -pR $$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:
|
||||
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
|
||||
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
|
||||
`test -z '$(STRIP)' || \
|
||||
echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
|
||||
mostlyclean-generic:
|
||||
|
||||
clean-generic:
|
||||
|
||||
distclean-generic:
|
||||
-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_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
|
||||
|
||||
info: info-am
|
||||
|
||||
info-am:
|
||||
|
||||
install-data-am:
|
||||
|
||||
install-dvi: install-dvi-am
|
||||
|
||||
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
|
||||
|
||||
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 all all-am check check-am clean clean-generic \
|
||||
clean-libtool clean-noinstPROGRAMS ctags 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 uninstall uninstall-am
|
||||
|
||||
# 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,155 @@
|
||||
/*
|
||||
* Example fingerprint enrollment program
|
||||
* Enrolls your right index finger and saves the print to disk
|
||||
* Copyright (C) 2007 Daniel Drake <dsd@gentoo.org>
|
||||
*
|
||||
* 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
|
||||
*/
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <unistd.h>
|
||||
|
||||
#include <libfprint/fprint.h>
|
||||
|
||||
struct fp_dscv_dev *discover_device(struct fp_dscv_dev **discovered_devs)
|
||||
{
|
||||
struct fp_dscv_dev *ddev = discovered_devs[0];
|
||||
struct fp_driver *drv;
|
||||
if (!ddev)
|
||||
return NULL;
|
||||
|
||||
drv = fp_dscv_dev_get_driver(ddev);
|
||||
printf("Found device claimed by %s driver\n", fp_driver_get_full_name(drv));
|
||||
return ddev;
|
||||
}
|
||||
|
||||
struct fp_print_data *enroll(struct fp_dev *dev) {
|
||||
struct fp_print_data *enrolled_print = NULL;
|
||||
int r;
|
||||
|
||||
printf("You will need to successfully scan your finger %d times to "
|
||||
"complete the process.\n", fp_dev_get_nr_enroll_stages(dev));
|
||||
|
||||
do {
|
||||
struct fp_img *img = NULL;
|
||||
|
||||
sleep(1);
|
||||
printf("\nScan your finger now.\n");
|
||||
|
||||
r = fp_enroll_finger_img(dev, &enrolled_print, &img);
|
||||
if (img) {
|
||||
fp_img_save_to_file(img, "enrolled.pgm");
|
||||
printf("Wrote scanned image to enrolled.pgm\n");
|
||||
fp_img_free(img);
|
||||
}
|
||||
if (r < 0) {
|
||||
printf("Enroll failed with error %d\n", r);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
switch (r) {
|
||||
case FP_ENROLL_COMPLETE:
|
||||
printf("Enroll complete!\n");
|
||||
break;
|
||||
case FP_ENROLL_FAIL:
|
||||
printf("Enroll failed, something wen't wrong :(\n");
|
||||
return NULL;
|
||||
case FP_ENROLL_PASS:
|
||||
printf("Enroll stage passed. Yay!\n");
|
||||
break;
|
||||
case FP_ENROLL_RETRY:
|
||||
printf("Didn't quite catch that. Please try again.\n");
|
||||
break;
|
||||
case FP_ENROLL_RETRY_TOO_SHORT:
|
||||
printf("Your swipe was too short, please try again.\n");
|
||||
break;
|
||||
case FP_ENROLL_RETRY_CENTER_FINGER:
|
||||
printf("Didn't catch that, please center your finger on the "
|
||||
"sensor and try again.\n");
|
||||
break;
|
||||
case FP_ENROLL_RETRY_REMOVE_FINGER:
|
||||
printf("Scan failed, please remove your finger and then try "
|
||||
"again.\n");
|
||||
break;
|
||||
}
|
||||
} while (r != FP_ENROLL_COMPLETE);
|
||||
|
||||
if (!enrolled_print) {
|
||||
fprintf(stderr, "Enroll complete but no print?\n");
|
||||
return NULL;
|
||||
}
|
||||
|
||||
printf("Enrollment completed!\n\n");
|
||||
return enrolled_print;
|
||||
}
|
||||
|
||||
int main(void)
|
||||
{
|
||||
int r = 1;
|
||||
struct fp_dscv_dev *ddev;
|
||||
struct fp_dscv_dev **discovered_devs;
|
||||
struct fp_dev *dev;
|
||||
struct fp_print_data *data;
|
||||
|
||||
printf("This program will enroll your right index finger, "
|
||||
"unconditionally overwriting any right-index print that was enrolled "
|
||||
"previously. If you want to continue, press enter, otherwise hit "
|
||||
"Ctrl+C\n");
|
||||
getchar();
|
||||
|
||||
r = fp_init();
|
||||
if (r < 0) {
|
||||
fprintf(stderr, "Failed to initialize libfprint\n");
|
||||
exit(1);
|
||||
}
|
||||
|
||||
discovered_devs = fp_discover_devs();
|
||||
if (!discovered_devs) {
|
||||
fprintf(stderr, "Could not discover devices\n");
|
||||
goto out;
|
||||
}
|
||||
|
||||
ddev = discover_device(discovered_devs);
|
||||
if (!ddev) {
|
||||
fprintf(stderr, "No devices detected.\n");
|
||||
goto out;
|
||||
}
|
||||
|
||||
dev = fp_dev_open(ddev);
|
||||
fp_dscv_devs_free(discovered_devs);
|
||||
if (!dev) {
|
||||
fprintf(stderr, "Could not open device.\n");
|
||||
goto out;
|
||||
}
|
||||
|
||||
printf("Opened device. It's now time to enroll your finger.\n\n");
|
||||
data = enroll(dev);
|
||||
if (!data)
|
||||
goto out_close;
|
||||
|
||||
r = fp_print_data_save(data, RIGHT_INDEX);
|
||||
if (r < 0)
|
||||
fprintf(stderr, "Data save failed, code %d\n", r);
|
||||
|
||||
fp_print_data_free(data);
|
||||
out_close:
|
||||
fp_dev_close(dev);
|
||||
out:
|
||||
fp_exit();
|
||||
return r;
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,104 @@
|
||||
/*
|
||||
* Example libfprint image capture program
|
||||
* Copyright (C) 2007 Daniel Drake <dsd@gentoo.org>
|
||||
*
|
||||
* 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
|
||||
*/
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
#include <libfprint/fprint.h>
|
||||
|
||||
struct fp_dscv_dev *discover_device(struct fp_dscv_dev **discovered_devs)
|
||||
{
|
||||
struct fp_dscv_dev *ddev = discovered_devs[0];
|
||||
struct fp_driver *drv;
|
||||
if (!ddev)
|
||||
return NULL;
|
||||
|
||||
drv = fp_dscv_dev_get_driver(ddev);
|
||||
printf("Found device claimed by %s driver\n", fp_driver_get_full_name(drv));
|
||||
return ddev;
|
||||
}
|
||||
|
||||
int main(void)
|
||||
{
|
||||
int r = 1;
|
||||
struct fp_dscv_dev *ddev;
|
||||
struct fp_dscv_dev **discovered_devs;
|
||||
struct fp_dev *dev;
|
||||
struct fp_img *img = NULL;
|
||||
|
||||
r = fp_init();
|
||||
if (r < 0) {
|
||||
fprintf(stderr, "Failed to initialize libfprint\n");
|
||||
exit(1);
|
||||
}
|
||||
|
||||
discovered_devs = fp_discover_devs();
|
||||
if (!discovered_devs) {
|
||||
fprintf(stderr, "Could not discover devices\n");
|
||||
goto out;
|
||||
}
|
||||
|
||||
ddev = discover_device(discovered_devs);
|
||||
if (!ddev) {
|
||||
fprintf(stderr, "No devices detected.\n");
|
||||
goto out;
|
||||
}
|
||||
|
||||
dev = fp_dev_open(ddev);
|
||||
fp_dscv_devs_free(discovered_devs);
|
||||
if (!dev) {
|
||||
fprintf(stderr, "Could not open device.\n");
|
||||
goto out;
|
||||
}
|
||||
|
||||
if (!fp_dev_supports_imaging(dev)) {
|
||||
fprintf(stderr, "this device does not have imaging capabilities.\n");
|
||||
goto out_close;
|
||||
}
|
||||
|
||||
printf("Opened device. It's now time to scan your finger.\n\n");
|
||||
|
||||
r = fp_dev_img_capture(dev, 0, &img);
|
||||
if (r) {
|
||||
fprintf(stderr, "image capture failed, code %d\n", r);
|
||||
goto out_close;
|
||||
}
|
||||
|
||||
r = fp_img_save_to_file(img, "finger.pgm");
|
||||
if (r) {
|
||||
fprintf(stderr, "img save failed, code %d\n", r);
|
||||
goto out_close;
|
||||
}
|
||||
|
||||
fp_img_standardize(img);
|
||||
r = fp_img_save_to_file(img, "finger_standardized.pgm");
|
||||
fp_img_free(img);
|
||||
if (r) {
|
||||
fprintf(stderr, "standardized img save failed, code %d\n", r);
|
||||
goto out_close;
|
||||
}
|
||||
|
||||
r = 0;
|
||||
out_close:
|
||||
fp_dev_close(dev);
|
||||
out:
|
||||
fp_exit();
|
||||
return r;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,258 @@
|
||||
/*
|
||||
* Example libfprint continuous image capture program
|
||||
* Copyright (C) 2007 Daniel Drake <dsd@gentoo.org>
|
||||
*
|
||||
* 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
|
||||
*/
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
||||
#include <libfprint/fprint.h>
|
||||
#include <X11/Xlib.h>
|
||||
#include <X11/keysym.h>
|
||||
#include <X11/extensions/Xvlib.h>
|
||||
|
||||
#define FORMAT 0x32595559
|
||||
|
||||
static int adaptor = -1;
|
||||
static unsigned char *framebuffer = NULL;
|
||||
|
||||
static Display *display = NULL;
|
||||
static Window window=(Window)NULL;
|
||||
static XvImage *xv_image = NULL;
|
||||
static XvAdaptorInfo *info;
|
||||
static GC gc;
|
||||
static int connection = -1;
|
||||
|
||||
/* based on macro by Bart Nabbe */
|
||||
#define GREY2YUV(grey, y, u, v)\
|
||||
y = (9798*grey + 19235*grey + 3736*grey) / 32768;\
|
||||
u = (-4784*grey - 9437*grey + 14221*grey) / 32768 + 128;\
|
||||
v = (20218*grey - 16941*grey - 3277*grey) / 32768 + 128;\
|
||||
y = y < 0 ? 0 : y;\
|
||||
u = u < 0 ? 0 : u;\
|
||||
v = v < 0 ? 0 : v;\
|
||||
y = y > 255 ? 255 : y;\
|
||||
u = u > 255 ? 255 : u;\
|
||||
v = v > 255 ? 255 : v
|
||||
|
||||
static void grey2yuy2 (unsigned char *grey, unsigned char *YUV, int num) {
|
||||
int i, j;
|
||||
int y0, y1, u0, u1, v0, v1;
|
||||
int gval;
|
||||
|
||||
for (i = 0, j = 0; i < num; i += 2, j += 4)
|
||||
{
|
||||
gval = grey[i];
|
||||
GREY2YUV (gval, y0, u0 , v0);
|
||||
gval = grey[i + 1];
|
||||
GREY2YUV (gval, y1, u1 , v1);
|
||||
YUV[j + 0] = y0;
|
||||
YUV[j + 1] = (u0+u1)/2;
|
||||
YUV[j + 2] = y1;
|
||||
YUV[j + 3] = (v0+v1)/2;
|
||||
}
|
||||
}
|
||||
|
||||
static void display_frame(struct fp_img *img)
|
||||
{
|
||||
int width = fp_img_get_width(img);
|
||||
int height = fp_img_get_height(img);
|
||||
unsigned char *data = fp_img_get_data(img);
|
||||
|
||||
if (adaptor < 0)
|
||||
return;
|
||||
|
||||
grey2yuy2(data, framebuffer, width * height);
|
||||
xv_image = XvCreateImage(display, info[adaptor].base_id, FORMAT,
|
||||
framebuffer, width, height);
|
||||
XvPutImage(display, info[adaptor].base_id, window, gc, xv_image,
|
||||
0, 0, width, height, 0, 0, width, height);
|
||||
}
|
||||
|
||||
static void QueryXv()
|
||||
{
|
||||
int num_adaptors;
|
||||
int num_formats;
|
||||
XvImageFormatValues *formats = NULL;
|
||||
int i,j;
|
||||
char xv_name[5];
|
||||
|
||||
XvQueryAdaptors(display, DefaultRootWindow(display), &num_adaptors,
|
||||
&info);
|
||||
|
||||
for(i = 0; i < num_adaptors; i++) {
|
||||
formats = XvListImageFormats(display, info[i].base_id,
|
||||
&num_formats);
|
||||
for(j = 0; j < num_formats; j++) {
|
||||
xv_name[4] = 0;
|
||||
memcpy(xv_name, &formats[j].id, 4);
|
||||
if(formats[j].id == FORMAT) {
|
||||
printf("using Xv format 0x%x %s %s\n",
|
||||
formats[j].id, xv_name,
|
||||
(formats[j].format==XvPacked)
|
||||
? "packed" : "planar");
|
||||
if (adaptor < 0)
|
||||
adaptor = i;
|
||||
}
|
||||
}
|
||||
}
|
||||
XFree(formats);
|
||||
if (adaptor < 0)
|
||||
printf("No suitable Xv adaptor found\n");
|
||||
}
|
||||
|
||||
struct fp_dscv_dev *discover_device(struct fp_dscv_dev **discovered_devs)
|
||||
{
|
||||
struct fp_dscv_dev *ddev = discovered_devs[0];
|
||||
struct fp_driver *drv;
|
||||
if (!ddev)
|
||||
return NULL;
|
||||
|
||||
drv = fp_dscv_dev_get_driver(ddev);
|
||||
printf("Found device claimed by %s driver\n", fp_driver_get_full_name(drv));
|
||||
return ddev;
|
||||
}
|
||||
|
||||
int main(void)
|
||||
{
|
||||
int r = 1;
|
||||
XEvent xev;
|
||||
XGCValues xgcv;
|
||||
long background=0x010203;
|
||||
struct fp_dscv_dev *ddev;
|
||||
struct fp_dscv_dev **discovered_devs;
|
||||
struct fp_dev *dev;
|
||||
int img_width;
|
||||
int img_height;
|
||||
int standardize = 0;
|
||||
|
||||
r = fp_init();
|
||||
if (r < 0) {
|
||||
fprintf(stderr, "Failed to initialize libfprint\n");
|
||||
exit(1);
|
||||
}
|
||||
|
||||
discovered_devs = fp_discover_devs();
|
||||
if (!discovered_devs) {
|
||||
fprintf(stderr, "Could not discover devices\n");
|
||||
goto out;
|
||||
}
|
||||
|
||||
ddev = discover_device(discovered_devs);
|
||||
if (!ddev) {
|
||||
fprintf(stderr, "No devices detected.\n");
|
||||
goto out;
|
||||
}
|
||||
|
||||
dev = fp_dev_open(ddev);
|
||||
fp_dscv_devs_free(discovered_devs);
|
||||
if (!dev) {
|
||||
fprintf(stderr, "Could not open device.\n");
|
||||
goto out;
|
||||
}
|
||||
|
||||
if (!fp_dev_supports_imaging(dev)) {
|
||||
fprintf(stderr, "this device does not have imaging capabilities.\n");
|
||||
goto out_close;
|
||||
}
|
||||
|
||||
img_width = fp_dev_get_img_width(dev);
|
||||
img_height = fp_dev_get_img_height(dev);
|
||||
if (img_width <= 0 || img_height <= 0) {
|
||||
fprintf(stderr, "this device returns images with variable dimensions,"
|
||||
" this example does not support that.\n");
|
||||
goto out_close;
|
||||
}
|
||||
framebuffer = malloc(img_width * img_height * 2);
|
||||
if (!framebuffer)
|
||||
goto out_close;
|
||||
|
||||
/* make the window */
|
||||
display = XOpenDisplay(getenv("DISPLAY"));
|
||||
if(display == NULL) {
|
||||
fprintf(stderr,"Could not open display \"%s\"\n",
|
||||
getenv("DISPLAY"));
|
||||
goto out_close;
|
||||
}
|
||||
|
||||
QueryXv();
|
||||
|
||||
if (adaptor < 0)
|
||||
goto out_close;
|
||||
|
||||
window = XCreateSimpleWindow(display, DefaultRootWindow(display), 0, 0,
|
||||
img_width, img_height, 0,
|
||||
WhitePixel(display, DefaultScreen(display)), background);
|
||||
|
||||
XSelectInput(display, window, StructureNotifyMask | KeyPressMask);
|
||||
XMapWindow(display, window);
|
||||
connection = ConnectionNumber(display);
|
||||
|
||||
gc = XCreateGC(display, window, 0, &xgcv);
|
||||
|
||||
printf("Press S to toggle standardized mode, Q to quit\n");
|
||||
|
||||
while (1) { /* event loop */
|
||||
struct fp_img *img;
|
||||
|
||||
r = fp_dev_img_capture(dev, 1, &img);
|
||||
if (r) {
|
||||
fprintf(stderr, "image capture failed, code %d\n", r);
|
||||
goto out_close;
|
||||
}
|
||||
if (standardize)
|
||||
fp_img_standardize(img);
|
||||
|
||||
display_frame(img);
|
||||
fp_img_free(img);
|
||||
XFlush(display);
|
||||
|
||||
while (XPending(display) > 0) {
|
||||
XNextEvent(display, &xev);
|
||||
if (xev.type != KeyPress)
|
||||
continue;
|
||||
|
||||
switch (XKeycodeToKeysym(display, xev.xkey.keycode, 0)) {
|
||||
case XK_q:
|
||||
case XK_Q:
|
||||
r = 0;
|
||||
goto out_close;
|
||||
break;
|
||||
case XK_s:
|
||||
case XK_S:
|
||||
standardize = !standardize;
|
||||
break;
|
||||
}
|
||||
} /* XPending */
|
||||
}
|
||||
|
||||
r = 0;
|
||||
out_close:
|
||||
if (framebuffer)
|
||||
free(framebuffer);
|
||||
fp_dev_close(dev);
|
||||
if ((void *) window != NULL)
|
||||
XUnmapWindow(display, window);
|
||||
if (display != NULL)
|
||||
XFlush(display);
|
||||
out:
|
||||
fp_exit();
|
||||
return r;
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,144 @@
|
||||
/*
|
||||
* Example fingerprint verification program, which verifies the right index
|
||||
* finger which has been previously enrolled to disk.
|
||||
* Copyright (C) 2007 Daniel Drake <dsd@gentoo.org>
|
||||
*
|
||||
* 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
|
||||
*/
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <unistd.h>
|
||||
|
||||
#include <libfprint/fprint.h>
|
||||
|
||||
struct fp_dscv_dev *discover_device(struct fp_dscv_dev **discovered_devs)
|
||||
{
|
||||
struct fp_dscv_dev *ddev = discovered_devs[0];
|
||||
struct fp_driver *drv;
|
||||
if (!ddev)
|
||||
return NULL;
|
||||
|
||||
drv = fp_dscv_dev_get_driver(ddev);
|
||||
printf("Found device claimed by %s driver\n", fp_driver_get_full_name(drv));
|
||||
return ddev;
|
||||
}
|
||||
|
||||
int verify(struct fp_dev *dev, struct fp_print_data *data)
|
||||
{
|
||||
int r;
|
||||
|
||||
do {
|
||||
struct fp_img *img = NULL;
|
||||
|
||||
sleep(1);
|
||||
printf("\nScan your finger now.\n");
|
||||
r = fp_verify_finger_img(dev, data, &img);
|
||||
if (img) {
|
||||
fp_img_save_to_file(img, "verify.pgm");
|
||||
printf("Wrote scanned image to verify.pgm\n");
|
||||
fp_img_free(img);
|
||||
}
|
||||
if (r < 0) {
|
||||
printf("verification failed with error %d :(\n", r);
|
||||
return r;
|
||||
}
|
||||
switch (r) {
|
||||
case FP_VERIFY_NO_MATCH:
|
||||
printf("NO MATCH!\n");
|
||||
return 0;
|
||||
case FP_VERIFY_MATCH:
|
||||
printf("MATCH!\n");
|
||||
return 0;
|
||||
case FP_VERIFY_RETRY:
|
||||
printf("Scan didn't quite work. Please try again.\n");
|
||||
break;
|
||||
case FP_VERIFY_RETRY_TOO_SHORT:
|
||||
printf("Swipe was too short, please try again.\n");
|
||||
break;
|
||||
case FP_VERIFY_RETRY_CENTER_FINGER:
|
||||
printf("Please center your finger on the sensor and try again.\n");
|
||||
break;
|
||||
case FP_VERIFY_RETRY_REMOVE_FINGER:
|
||||
printf("Please remove finger from the sensor and try again.\n");
|
||||
break;
|
||||
}
|
||||
} while (1);
|
||||
}
|
||||
|
||||
int main(void)
|
||||
{
|
||||
int r = 1;
|
||||
struct fp_dscv_dev *ddev;
|
||||
struct fp_dscv_dev **discovered_devs;
|
||||
struct fp_dev *dev;
|
||||
struct fp_print_data *data;
|
||||
|
||||
r = fp_init();
|
||||
if (r < 0) {
|
||||
fprintf(stderr, "Failed to initialize libfprint\n");
|
||||
exit(1);
|
||||
}
|
||||
|
||||
discovered_devs = fp_discover_devs();
|
||||
if (!discovered_devs) {
|
||||
fprintf(stderr, "Could not discover devices\n");
|
||||
goto out;
|
||||
}
|
||||
|
||||
ddev = discover_device(discovered_devs);
|
||||
if (!ddev) {
|
||||
fprintf(stderr, "No devices detected.\n");
|
||||
goto out;
|
||||
}
|
||||
|
||||
dev = fp_dev_open(ddev);
|
||||
fp_dscv_devs_free(discovered_devs);
|
||||
if (!dev) {
|
||||
fprintf(stderr, "Could not open device.\n");
|
||||
goto out;
|
||||
}
|
||||
|
||||
printf("Opened device. Loading previously enrolled right index finger "
|
||||
"data...\n");
|
||||
|
||||
r = fp_print_data_load(dev, RIGHT_INDEX, &data);
|
||||
if (r != 0) {
|
||||
fprintf(stderr, "Failed to load fingerprint, error %d\n", r);
|
||||
fprintf(stderr, "Did you remember to enroll your right index finger "
|
||||
"first?\n");
|
||||
goto out_close;
|
||||
}
|
||||
|
||||
printf("Print loaded. Time to verify!\n");
|
||||
do {
|
||||
char buffer[20];
|
||||
|
||||
verify(dev, data);
|
||||
printf("Verify again? [Y/n]? ");
|
||||
fgets(buffer, sizeof(buffer), stdin);
|
||||
if (buffer[0] != '\n' && buffer[0] != 'y' && buffer[0] != 'Y')
|
||||
break;
|
||||
} while (1);
|
||||
|
||||
fp_print_data_free(data);
|
||||
out_close:
|
||||
fp_dev_close(dev);
|
||||
out:
|
||||
fp_exit();
|
||||
return r;
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,186 @@
|
||||
/*
|
||||
* Example fingerprint verification program
|
||||
* Copyright (C) 2007 Daniel Drake <dsd@gentoo.org>
|
||||
*
|
||||
* 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
|
||||
*/
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <unistd.h>
|
||||
|
||||
#include <libfprint/fprint.h>
|
||||
|
||||
struct fp_dscv_dev *discover_device(struct fp_dscv_dev **discovered_devs)
|
||||
{
|
||||
struct fp_dscv_dev *ddev = discovered_devs[0];
|
||||
struct fp_driver *drv;
|
||||
if (!ddev)
|
||||
return NULL;
|
||||
|
||||
drv = fp_dscv_dev_get_driver(ddev);
|
||||
printf("Found device claimed by %s driver\n", fp_driver_get_full_name(drv));
|
||||
return ddev;
|
||||
}
|
||||
|
||||
struct fp_print_data *enroll(struct fp_dev *dev) {
|
||||
struct fp_print_data *enrolled_print = NULL;
|
||||
int r;
|
||||
|
||||
printf("You will need to successfully scan your finger %d times to "
|
||||
"complete the process.\n", fp_dev_get_nr_enroll_stages(dev));
|
||||
|
||||
do {
|
||||
sleep(1);
|
||||
printf("\nScan your finger now.\n");
|
||||
r = fp_enroll_finger(dev, &enrolled_print);
|
||||
if (r < 0) {
|
||||
printf("Enroll failed with error %d\n", r);
|
||||
return NULL;
|
||||
}
|
||||
switch (r) {
|
||||
case FP_ENROLL_COMPLETE:
|
||||
printf("Enroll complete!\n");
|
||||
break;
|
||||
case FP_ENROLL_FAIL:
|
||||
printf("Enroll failed, something wen't wrong :(\n");
|
||||
return NULL;
|
||||
case FP_ENROLL_PASS:
|
||||
printf("Enroll stage passed. Yay!\n");
|
||||
break;
|
||||
case FP_ENROLL_RETRY:
|
||||
printf("Didn't quite catch that. Please try again.\n");
|
||||
break;
|
||||
case FP_ENROLL_RETRY_TOO_SHORT:
|
||||
printf("Your swipe was too short, please try again.\n");
|
||||
break;
|
||||
case FP_ENROLL_RETRY_CENTER_FINGER:
|
||||
printf("Didn't catch that, please center your finger on the "
|
||||
"sensor and try again.\n");
|
||||
break;
|
||||
case FP_ENROLL_RETRY_REMOVE_FINGER:
|
||||
printf("Scan failed, please remove your finger and then try "
|
||||
"again.\n");
|
||||
break;
|
||||
}
|
||||
} while (r != FP_ENROLL_COMPLETE);
|
||||
|
||||
if (!enrolled_print) {
|
||||
fprintf(stderr, "Enroll complete but no print?\n");
|
||||
return NULL;
|
||||
}
|
||||
|
||||
printf("Enrollment completed!\n\n");
|
||||
return enrolled_print;
|
||||
}
|
||||
|
||||
int verify(struct fp_dev *dev, struct fp_print_data *data)
|
||||
{
|
||||
int r;
|
||||
|
||||
do {
|
||||
sleep(1);
|
||||
printf("\nScan your finger now.\n");
|
||||
r = fp_verify_finger(dev, data);
|
||||
if (r < 0) {
|
||||
printf("verification failed with error %d :(\n", r);
|
||||
return r;
|
||||
}
|
||||
switch (r) {
|
||||
case FP_VERIFY_NO_MATCH:
|
||||
printf("NO MATCH!\n");
|
||||
return 0;
|
||||
case FP_VERIFY_MATCH:
|
||||
printf("MATCH!\n");
|
||||
return 0;
|
||||
case FP_VERIFY_RETRY:
|
||||
printf("Scan didn't quite work. Please try again.\n");
|
||||
break;
|
||||
case FP_VERIFY_RETRY_TOO_SHORT:
|
||||
printf("Swipe was too short, please try again.\n");
|
||||
break;
|
||||
case FP_VERIFY_RETRY_CENTER_FINGER:
|
||||
printf("Please center your finger on the sensor and try again.\n");
|
||||
break;
|
||||
case FP_VERIFY_RETRY_REMOVE_FINGER:
|
||||
printf("Please remove finger from the sensor and try again.\n");
|
||||
break;
|
||||
}
|
||||
} while (1);
|
||||
}
|
||||
|
||||
int main(void)
|
||||
{
|
||||
int r = 1;
|
||||
struct fp_dscv_dev *ddev;
|
||||
struct fp_dscv_dev **discovered_devs;
|
||||
struct fp_dev *dev;
|
||||
struct fp_print_data *data;
|
||||
|
||||
r = fp_init();
|
||||
if (r < 0) {
|
||||
fprintf(stderr, "Failed to initialize libfprint\n");
|
||||
exit(1);
|
||||
}
|
||||
|
||||
discovered_devs = fp_discover_devs();
|
||||
if (!discovered_devs) {
|
||||
fprintf(stderr, "Could not discover devices\n");
|
||||
goto out;
|
||||
}
|
||||
|
||||
ddev = discover_device(discovered_devs);
|
||||
if (!ddev) {
|
||||
fprintf(stderr, "No devices detected.\n");
|
||||
goto out;
|
||||
}
|
||||
|
||||
dev = fp_dev_open(ddev);
|
||||
fp_dscv_devs_free(discovered_devs);
|
||||
if (!dev) {
|
||||
fprintf(stderr, "Could not open device.\n");
|
||||
goto out;
|
||||
}
|
||||
|
||||
printf("Opened device. It's now time to enroll your finger.\n\n");
|
||||
data = enroll(dev);
|
||||
if (!data)
|
||||
goto out_close;
|
||||
|
||||
|
||||
printf("Normally we'd save that print to disk, and recall it at some "
|
||||
"point later when we want to authenticate the user who just "
|
||||
"enrolled. In the interests of demonstration, we'll authenticate "
|
||||
"that user immediately.\n");
|
||||
|
||||
do {
|
||||
char buffer[20];
|
||||
|
||||
verify(dev, data);
|
||||
printf("Verify again? [Y/n]? ");
|
||||
fgets(buffer, sizeof(buffer), stdin);
|
||||
if (buffer[0] != '\n' && buffer[0] != 'y' && buffer[0] != 'Y')
|
||||
break;
|
||||
} while (1);
|
||||
|
||||
fp_print_data_free(data);
|
||||
out_close:
|
||||
fp_dev_close(dev);
|
||||
out:
|
||||
fp_exit();
|
||||
return r;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user