This commit is contained in:
2015-11-15 18:18:42 +00:00
parent 9ac343fc45
commit 72be7b0c2f
580 changed files with 356252 additions and 6 deletions
+340
View File
@@ -0,0 +1,340 @@
GNU GENERAL PUBLIC LICENSE
Version 2, June 1991
Copyright (C) 1989, 1991 Free Software Foundation, Inc.
59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
Preamble
The licenses for most software are designed to take away your
freedom to share and change it. By contrast, the GNU General Public
License is intended to guarantee your freedom to share and change free
software--to make sure the software is free for all its users. This
General Public License applies to most of the Free Software
Foundation's software and to any other program whose authors commit to
using it. (Some other Free Software Foundation software is covered by
the GNU Library General Public License instead.) You can apply it to
your programs, too.
When we speak of free software, we are referring to freedom, not
price. Our General Public Licenses are designed to make sure that you
have the freedom to distribute copies of free software (and charge for
this service if you wish), that you receive source code or can get it
if you want it, that you can change the software or use pieces of it
in new free programs; and that you know you can do these things.
To protect your rights, we need to make restrictions that forbid
anyone to deny you these rights or to ask you to surrender the rights.
These restrictions translate to certain responsibilities for you if you
distribute copies of the software, or if you modify it.
For example, if you distribute copies of such a program, whether
gratis or for a fee, you must give the recipients all the rights that
you have. You must make sure that they, too, receive or can get the
source code. And you must show them these terms so they know their
rights.
We protect your rights with two steps: (1) copyright the software, and
(2) offer you this license which gives you legal permission to copy,
distribute and/or modify the software.
Also, for each author's protection and ours, we want to make certain
that everyone understands that there is no warranty for this free
software. If the software is modified by someone else and passed on, we
want its recipients to know that what they have is not the original, so
that any problems introduced by others will not reflect on the original
authors' reputations.
Finally, any free program is threatened constantly by software
patents. We wish to avoid the danger that redistributors of a free
program will individually obtain patent licenses, in effect making the
program proprietary. To prevent this, we have made it clear that any
patent must be licensed for everyone's free use or not licensed at all.
The precise terms and conditions for copying, distribution and
modification follow.
GNU GENERAL PUBLIC LICENSE
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
0. This License applies to any program or other work which contains
a notice placed by the copyright holder saying it may be distributed
under the terms of this General Public License. The "Program", below,
refers to any such program or work, and a "work based on the Program"
means either the Program or any derivative work under copyright law:
that is to say, a work containing the Program or a portion of it,
either verbatim or with modifications and/or translated into another
language. (Hereinafter, translation is included without limitation in
the term "modification".) Each licensee is addressed as "you".
Activities other than copying, distribution and modification are not
covered by this License; they are outside its scope. The act of
running the Program is not restricted, and the output from the Program
is covered only if its contents constitute a work based on the
Program (independent of having been made by running the Program).
Whether that is true depends on what the Program does.
1. You may copy and distribute verbatim copies of the Program's
source code as you receive it, in any medium, provided that you
conspicuously and appropriately publish on each copy an appropriate
copyright notice and disclaimer of warranty; keep intact all the
notices that refer to this License and to the absence of any warranty;
and give any other recipients of the Program a copy of this License
along with the Program.
You may charge a fee for the physical act of transferring a copy, and
you may at your option offer warranty protection in exchange for a fee.
2. You may modify your copy or copies of the Program or any portion
of it, thus forming a work based on the Program, and copy and
distribute such modifications or work under the terms of Section 1
above, provided that you also meet all of these conditions:
a) You must cause the modified files to carry prominent notices
stating that you changed the files and the date of any change.
b) You must cause any work that you distribute or publish, that in
whole or in part contains or is derived from the Program or any
part thereof, to be licensed as a whole at no charge to all third
parties under the terms of this License.
c) If the modified program normally reads commands interactively
when run, you must cause it, when started running for such
interactive use in the most ordinary way, to print or display an
announcement including an appropriate copyright notice and a
notice that there is no warranty (or else, saying that you provide
a warranty) and that users may redistribute the program under
these conditions, and telling the user how to view a copy of this
License. (Exception: if the Program itself is interactive but
does not normally print such an announcement, your work based on
the Program is not required to print an announcement.)
These requirements apply to the modified work as a whole. If
identifiable sections of that work are not derived from the Program,
and can be reasonably considered independent and separate works in
themselves, then this License, and its terms, do not apply to those
sections when you distribute them as separate works. But when you
distribute the same sections as part of a whole which is a work based
on the Program, the distribution of the whole must be on the terms of
this License, whose permissions for other licensees extend to the
entire whole, and thus to each and every part regardless of who wrote it.
Thus, it is not the intent of this section to claim rights or contest
your rights to work written entirely by you; rather, the intent is to
exercise the right to control the distribution of derivative or
collective works based on the Program.
In addition, mere aggregation of another work not based on the Program
with the Program (or with a work based on the Program) on a volume of
a storage or distribution medium does not bring the other work under
the scope of this License.
3. You may copy and distribute the Program (or a work based on it,
under Section 2) in object code or executable form under the terms of
Sections 1 and 2 above provided that you also do one of the following:
a) Accompany it with the complete corresponding machine-readable
source code, which must be distributed under the terms of Sections
1 and 2 above on a medium customarily used for software interchange; or,
b) Accompany it with a written offer, valid for at least three
years, to give any third party, for a charge no more than your
cost of physically performing source distribution, a complete
machine-readable copy of the corresponding source code, to be
distributed under the terms of Sections 1 and 2 above on a medium
customarily used for software interchange; or,
c) Accompany it with the information you received as to the offer
to distribute corresponding source code. (This alternative is
allowed only for noncommercial distribution and only if you
received the program in object code or executable form with such
an offer, in accord with Subsection b above.)
The source code for a work means the preferred form of the work for
making modifications to it. For an executable work, complete source
code means all the source code for all modules it contains, plus any
associated interface definition files, plus the scripts used to
control compilation and installation of the executable. However, as a
special exception, the source code distributed need not include
anything that is normally distributed (in either source or binary
form) with the major components (compiler, kernel, and so on) of the
operating system on which the executable runs, unless that component
itself accompanies the executable.
If distribution of executable or object code is made by offering
access to copy from a designated place, then offering equivalent
access to copy the source code from the same place counts as
distribution of the source code, even though third parties are not
compelled to copy the source along with the object code.
4. You may not copy, modify, sublicense, or distribute the Program
except as expressly provided under this License. Any attempt
otherwise to copy, modify, sublicense or distribute the Program is
void, and will automatically terminate your rights under this License.
However, parties who have received copies, or rights, from you under
this License will not have their licenses terminated so long as such
parties remain in full compliance.
5. You are not required to accept this License, since you have not
signed it. However, nothing else grants you permission to modify or
distribute the Program or its derivative works. These actions are
prohibited by law if you do not accept this License. Therefore, by
modifying or distributing the Program (or any work based on the
Program), you indicate your acceptance of this License to do so, and
all its terms and conditions for copying, distributing or modifying
the Program or works based on it.
6. Each time you redistribute the Program (or any work based on the
Program), the recipient automatically receives a license from the
original licensor to copy, distribute or modify the Program subject to
these terms and conditions. You may not impose any further
restrictions on the recipients' exercise of the rights granted herein.
You are not responsible for enforcing compliance by third parties to
this License.
7. If, as a consequence of a court judgment or allegation of patent
infringement or for any other reason (not limited to patent issues),
conditions are imposed on you (whether by court order, agreement or
otherwise) that contradict the conditions of this License, they do not
excuse you from the conditions of this License. If you cannot
distribute so as to satisfy simultaneously your obligations under this
License and any other pertinent obligations, then as a consequence you
may not distribute the Program at all. For example, if a patent
license would not permit royalty-free redistribution of the Program by
all those who receive copies directly or indirectly through you, then
the only way you could satisfy both it and this License would be to
refrain entirely from distribution of the Program.
If any portion of this section is held invalid or unenforceable under
any particular circumstance, the balance of the section is intended to
apply and the section as a whole is intended to apply in other
circumstances.
It is not the purpose of this section to induce you to infringe any
patents or other property right claims or to contest validity of any
such claims; this section has the sole purpose of protecting the
integrity of the free software distribution system, which is
implemented by public license practices. Many people have made
generous contributions to the wide range of software distributed
through that system in reliance on consistent application of that
system; it is up to the author/donor to decide if he or she is willing
to distribute software through any other system and a licensee cannot
impose that choice.
This section is intended to make thoroughly clear what is believed to
be a consequence of the rest of this License.
8. If the distribution and/or use of the Program is restricted in
certain countries either by patents or by copyrighted interfaces, the
original copyright holder who places the Program under this License
may add an explicit geographical distribution limitation excluding
those countries, so that distribution is permitted only in or among
countries not thus excluded. In such case, this License incorporates
the limitation as if written in the body of this License.
9. The Free Software Foundation may publish revised and/or new versions
of the General Public License from time to time. Such new versions will
be similar in spirit to the present version, but may differ in detail to
address new problems or concerns.
Each version is given a distinguishing version number. If the Program
specifies a version number of this License which applies to it and "any
later version", you have the option of following the terms and conditions
either of that version or of any later version published by the Free
Software Foundation. If the Program does not specify a version number of
this License, you may choose any version ever published by the Free Software
Foundation.
10. If you wish to incorporate parts of the Program into other free
programs whose distribution conditions are different, write to the author
to ask for permission. For software which is copyrighted by the Free
Software Foundation, write to the Free Software Foundation; we sometimes
make exceptions for this. Our decision will be guided by the two goals
of preserving the free status of all derivatives of our free software and
of promoting the sharing and reuse of software generally.
NO WARRANTY
11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
REPAIR OR CORRECTION.
12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
POSSIBILITY OF SUCH DAMAGES.
END OF TERMS AND CONDITIONS
How to Apply These Terms to Your New Programs
If you develop a new program, and you want it to be of the greatest
possible use to the public, the best way to achieve this is to make it
free software which everyone can redistribute and change under these terms.
To do so, attach the following notices to the program. It is safest
to attach them to the start of each source file to most effectively
convey the exclusion of warranty; and each file should have at least
the "copyright" line and a pointer to where the full notice is found.
<one line to give the program's name and a brief idea of what it does.>
Copyright (C) 19yy <name of author>
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 of the License, 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, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
Also add information on how to contact you by electronic and paper mail.
If the program is interactive, make it output a short notice like this
when it starts in an interactive mode:
Gnomovision version 69, Copyright (C) 19yy name of author
Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
This is free software, and you are welcome to redistribute it
under certain conditions; type `show c' for details.
The hypothetical commands `show w' and `show c' should show the appropriate
parts of the General Public License. Of course, the commands you use may
be called something other than `show w' and `show c'; they could even be
mouse-clicks or menu items--whatever suits your program.
You should also get your employer (if you work as a programmer) or your
school, if any, to sign a "copyright disclaimer" for the program, if
necessary. Here is a sample; alter the names:
Yoyodyne, Inc., hereby disclaims all copyright interest in the program
`Gnomovision' (which makes passes at compilers) written by James Hacker.
<signature of Ty Coon>, 1 April 1989
Ty Coon, President of Vice
This General Public License does not permit incorporating your program into
proprietary programs. If your program is a subroutine library, you may
consider it more useful to permit linking proprietary applications with the
library. If this is what you want to do, use the GNU Library General
Public License instead of this License.
+11
View File
@@ -0,0 +1,11 @@
librfid is licensed under GNU General Public License, Version 2 as published
by the Free Software Foundation (see the file COPYING).
This means that as soon as you wish to distribute a program that links to
librfid, that other program has to be licensed under the GPL or a compatible
license, too.
However, an alternative (royalty-based) licensing is possible. If you want to
create a proprietary program based on librfid, contact Harald Welte
<hwelte@hmw-consulting.de> for licensing details.
+26
View File
@@ -0,0 +1,26 @@
AUTOMAKE_OPTIONS = foreign dist-bzip2 1.6
SUBDIRS = etc include src
DEFAULT_AM_CFLAGS = -std=gnu99
if ENABLE_WIN32
SUBDIRS += win32
LINKOPTS = -mno-cygwin
AM_CFLAGS = $(DEFAULT_AM_CFLAGS) -mno-cygwin
else
LINKOPTS = -lusb
AM_CFLAGS = $(DEFAULT_AM_CFLAGS)
endif
if ENABLE_FIRMWARE
AM_CFLAGS += -DLIBRFID_FIRMWARE
else
SUBDIRS += utils
endif
EXTRA_DIST = LICENSING librfid.spec openct-cm5121-librfid.patch
$(OBJECTS): libtool
libtool: $(LIBTOOL_DEPS)
$(SHELL) ./config.status --recheck
+719
View File
@@ -0,0 +1,719 @@
# Makefile.in generated by automake 1.11 from Makefile.am.
# @configure_input@
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
# 2003, 2004, 2005, 2006, 2007, 2008, 2009 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@
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@
target_triplet = @target@
@ENABLE_WIN32_TRUE@am__append_1 = win32
@ENABLE_FIRMWARE_TRUE@am__append_2 = -DLIBRFID_FIRMWARE
@ENABLE_FIRMWARE_FALSE@am__append_3 = utils
subdir = .
DIST_COMMON = README $(am__configure_deps) $(srcdir)/Makefile.am \
$(srcdir)/Makefile.in $(top_srcdir)/configure COPYING TODO \
compile config.guess config.sub depcomp install-sh ltmain.sh \
missing
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/configure.in
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \
configure.lineno config.status.lineno
mkinstalldirs = $(install_sh) -d
CONFIG_CLEAN_FILES =
CONFIG_CLEAN_VPATH_FILES =
SOURCES =
DIST_SOURCES =
RECURSIVE_TARGETS = all-recursive check-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 uninstall-recursive
RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \
distclean-recursive maintainer-clean-recursive
AM_RECURSIVE_TARGETS = $(RECURSIVE_TARGETS:-recursive=) \
$(RECURSIVE_CLEAN_TARGETS:-recursive=) tags TAGS ctags CTAGS \
distdir dist dist-all distcheck
ETAGS = etags
CTAGS = ctags
DIST_SUBDIRS = etc include src win32 utils
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
distdir = $(PACKAGE)-$(VERSION)
top_distdir = $(distdir)
am__remove_distdir = \
{ test ! -d "$(distdir)" \
|| { find "$(distdir)" -type d ! -perm -200 -exec chmod u+w {} ';' \
&& rm -fr "$(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"
DIST_ARCHIVES = $(distdir).tar.gz $(distdir).tar.bz2
GZIP_ENV = --best
distuninstallcheck_listfiles = find . -type f -print
distcleancheck_listfiles = find . -type f -print
ACLOCAL = @ACLOCAL@
AMTAR = @AMTAR@
AR = @AR@
AS = @AS@
AUTOCONF = @AUTOCONF@
AUTOHEADER = @AUTOHEADER@
AUTOMAKE = @AUTOMAKE@
AWK = @AWK@
BUILDENV = @BUILDENV@
CC = @CC@
CCDEPMODE = @CCDEPMODE@
CFLAGS = @CFLAGS@
CPP = @CPP@
CPPFLAGS = @CPPFLAGS@
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@
FIRMWARE_PATH = @FIRMWARE_PATH@
GREP = @GREP@
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@
LIBTOOL_DEPS = @LIBTOOL_DEPS@
LIPO = @LIPO@
LN_S = @LN_S@
LTLIBOBJS = @LTLIBOBJS@
MAKEINFO = @MAKEINFO@
MKDIR_P = @MKDIR_P@
NM = @NM@
NMEDIT = @NMEDIT@
OBJDUMP = @OBJDUMP@
OBJEXT = @OBJEXT@
OPENCT_CFLAGS = @OPENCT_CFLAGS@
OPENCT_LIBS = @OPENCT_LIBS@
OTOOL = @OTOOL@
OTOOL64 = @OTOOL64@
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@
RANLIB = @RANLIB@
SED = @SED@
SET_MAKE = @SET_MAKE@
SHELL = @SHELL@
STRIP = @STRIP@
VERSION = @VERSION@
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_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@
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 = @target@
target_alias = @target_alias@
target_cpu = @target_cpu@
target_os = @target_os@
target_vendor = @target_vendor@
to_host_path_cmd = @to_host_path_cmd@
top_build_prefix = @top_build_prefix@
top_builddir = @top_builddir@
top_srcdir = @top_srcdir@
AUTOMAKE_OPTIONS = foreign dist-bzip2 1.6
SUBDIRS = etc include src $(am__append_1) $(am__append_3)
DEFAULT_AM_CFLAGS = -std=gnu99
@ENABLE_WIN32_FALSE@LINKOPTS = -lusb
@ENABLE_WIN32_TRUE@LINKOPTS = -mno-cygwin
@ENABLE_WIN32_FALSE@AM_CFLAGS = $(DEFAULT_AM_CFLAGS) $(am__append_2)
@ENABLE_WIN32_TRUE@AM_CFLAGS = $(DEFAULT_AM_CFLAGS) -mno-cygwin \
@ENABLE_WIN32_TRUE@ $(am__append_2)
EXTRA_DIST = LICENSING librfid.spec openct-cm5121-librfid.patch
all: all-recursive
.SUFFIXES:
am--refresh:
@:
$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
@for dep in $?; do \
case '$(am__configure_deps)' in \
*$$dep*) \
echo ' cd $(srcdir) && $(AUTOMAKE) --foreign'; \
$(am__cd) $(srcdir) && $(AUTOMAKE) --foreign \
&& exit 0; \
exit 1;; \
esac; \
done; \
echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign Makefile'; \
$(am__cd) $(top_srcdir) && \
$(AUTOMAKE) --foreign Makefile
.PRECIOUS: 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):
mostlyclean-libtool:
-rm -f *.lo
clean-libtool:
-rm -rf .libs _libs
distclean-libtool:
-rm -f libtool config.lt
# 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.
$(RECURSIVE_TARGETS):
@failcom='exit 1'; \
for f in x $$MAKEFLAGS; do \
case $$f in \
*=* | --[!k]*);; \
*k*) failcom='fail=yes';; \
esac; \
done; \
dot_seen=no; \
target=`echo $@ | sed s/-recursive//`; \
list='$(SUBDIRS)'; 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"
$(RECURSIVE_CLEAN_TARGETS):
@failcom='exit 1'; \
for f in x $$MAKEFLAGS; do \
case $$f in \
*=* | --[!k]*);; \
*k*) failcom='fail=yes';; \
esac; \
done; \
dot_seen=no; \
case "$@" in \
distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \
*) list='$(SUBDIRS)' ;; \
esac; \
rev=''; for subdir in $$list; do \
if test "$$subdir" = "."; then :; else \
rev="$$subdir $$rev"; \
fi; \
done; \
rev="$$rev ."; \
target=`echo $@ | sed s/-recursive//`; \
for subdir in $$rev; do \
echo "Making $$target in $$subdir"; \
if test "$$subdir" = "."; then \
local_target="$$target-am"; \
else \
local_target="$$target"; \
fi; \
($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
|| eval $$failcom; \
done && test -z "$$fail"
tags-recursive:
list='$(SUBDIRS)'; for subdir in $$list; do \
test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \
done
ctags-recursive:
list='$(SUBDIRS)'; for subdir in $$list; do \
test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \
done
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; nonempty = 1; } \
END { if (nonempty) { for (i in files) print i; }; }'`; \
mkid -fID $$unique
tags: TAGS
TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
$(TAGS_FILES) $(LISP)
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; \
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; }; }'`; \
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
CTAGS: ctags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
$(TAGS_FILES) $(LISP)
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)$$unique" \
|| $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
$$unique
GTAGS:
here=`$(am__cd) $(top_builddir) && pwd` \
&& $(am__cd) $(top_srcdir) \
&& gtags -i $(GTAGS_ARGS) "$$here"
distclean-tags:
-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
distdir: $(DISTFILES)
$(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 \
test -d "$(distdir)/$$subdir" \
|| $(MKDIR_P) "$(distdir)/$$subdir" \
|| exit 1; \
fi; \
done
@list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
if test "$$subdir" = .; then :; else \
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
-test -n "$(am__skip_mode_fix)" \
|| find "$(distdir)" -type d ! -perm -777 -exec chmod a+rwx {} \; -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) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz
$(am__remove_distdir)
dist-bzip2: distdir
tardir=$(distdir) && $(am__tar) | bzip2 -9 -c >$(distdir).tar.bz2
$(am__remove_distdir)
dist-lzma: distdir
tardir=$(distdir) && $(am__tar) | lzma -9 -c >$(distdir).tar.lzma
$(am__remove_distdir)
dist-xz: distdir
tardir=$(distdir) && $(am__tar) | xz -c >$(distdir).tar.xz
$(am__remove_distdir)
dist-tarZ: distdir
tardir=$(distdir) && $(am__tar) | compress -c >$(distdir).tar.Z
$(am__remove_distdir)
dist-shar: distdir
shar $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).shar.gz
$(am__remove_distdir)
dist-zip: distdir
-rm -f $(distdir).zip
zip -rq $(distdir).zip $(distdir)
$(am__remove_distdir)
dist dist-all: distdir
tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz
tardir=$(distdir) && $(am__tar) | bzip2 -9 -c >$(distdir).tar.bz2
$(am__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*) \
GZIP=$(GZIP_ENV) gunzip -c $(distdir).tar.gz | $(am__untar) ;;\
*.tar.bz2*) \
bunzip2 -c $(distdir).tar.bz2 | $(am__untar) ;;\
*.tar.lzma*) \
unlzma -c $(distdir).tar.lzma | $(am__untar) ;;\
*.tar.xz*) \
xz -dc $(distdir).tar.xz | $(am__untar) ;;\
*.tar.Z*) \
uncompress -c $(distdir).tar.Z | $(am__untar) ;;\
*.shar.gz*) \
GZIP=$(GZIP_ENV) gunzip -c $(distdir).shar.gz | unshar ;;\
*.zip*) \
unzip $(distdir).zip ;;\
esac
chmod -R a-w $(distdir); chmod a+w $(distdir)
mkdir $(distdir)/_build
mkdir $(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 \
&& ../configure --srcdir=.. --prefix="$$dc_install_base" \
$(DISTCHECK_CONFIGURE_FLAGS) \
&& $(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__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:
@$(am__cd) '$(distuninstallcheck_dir)' \
&& test `$(distuninstallcheck_listfiles) | wc -l` -le 1 \
|| { 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
installdirs: installdirs-recursive
installdirs-am:
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:
$(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)
-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-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-libtool \
distclean-tags
dvi: dvi-recursive
dvi-am:
html: html-recursive
html-am:
info: info-recursive
info-am:
install-data-am:
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:
.MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) ctags-recursive \
install-am install-strip tags-recursive
.PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \
all all-am am--refresh check check-am clean clean-generic \
clean-libtool ctags ctags-recursive dist dist-all dist-bzip2 \
dist-gzip dist-lzma dist-shar dist-tarZ dist-xz dist-zip \
distcheck distclean distclean-generic 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-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-recursive uninstall uninstall-am
$(OBJECTS): libtool
libtool: $(LIBTOOL_DEPS)
$(SHELL) ./config.status --recheck
# 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:
+141
View File
@@ -0,0 +1,141 @@
librfid - low-level RFID access library
(C) 2005-2007 by Harald Welte <laforge@gnumonks.org>
======================================================================
This library intends to provide a reader- and (as much as possible)
PICC / tag independent API for RFID applications.
1. Supported Protocols:
At this early stage of implementation, it offers only ISO 14443-2, ISO 14443-3
A and B as well as ISO 14443-4 (T=CL) support. Other protocols, both open
(such as ISO 15693) and proprietary are to be added as soon as I find some
more time.
2. Supported Readers:
At this time, the Omnikey Cardman 5121/5321 and the OpenPCD readers are supported.
2.1 Omnikey Cardman 5121/5321 RFID (http://www.omnikey.de/)
The cm5121 is a relatively stupid piece of hardware. Basically a contact-based
cm3121 that was enhanced by putting a Philips CL RC632 reader ASIC next to it.
There is no RFID protocol implementation on the cm5121, everything is done on
the host (PC) software. Four primitives (read/write byte/fifo) are provided
via simple PC_to_RDR_Escape CCID messages.
The cm5321 seems to be an improved version of the 5121, mainly with different
antenna geometrics for better communications reliability.
2.2 OpenPCD (http://www.openpcd.org/)
The OpenPCD reader is completely free. You get the full schematics, the PCB
design, and the source code to the device firmware (written in C, to be
compiled with the free GNU toolchain). Also, all required development tools
are available under Free Software licenses!
In addition, it has various headers for access to the intermediate signal
processing steps.
This makes it the ideal device to learn and play with RFID, since you don't
have any (proprietary) software interfere and puts you in full control of
everything.
This is now the primary development target for librfid. However, this doesn't
mean that we don't want to support as many readers as possible.
Another interesting new option is to cross-compile librfid to fit it _inside_
the OpenPCD firmware, enabling a fully autonomous RFID stack (and RFID
applications) on the reader, without any requirement for a host PC!
2.3 Philips Pegoda
This reader is not yet supported. Some initial experiments have shown that
adding support for it is
2.x Further Readers
Support for more devices shouldn't be too difficult to add, provided the
devices are stupid enough. More sophisticated readers like Integrated
Engineering or Philips Pegoda do much of the protocol handling in firmware on a
microcontroller. This makes them (at least till now) faster, but also of
limited use, especially in education and research.
So if you happen to run into any other dumb RFID readers, especially those
based on Philips CL RC622, RC531 and RC632, adding support should be very
straightforward. If you want to contract me for implementing a driver
backend, don't hesitate to contact me.
3. Building / Installing
In the default configuration, librfid only includes the driver for the OpenPCD
dumbreader firmware.
If you want support for Omnikey Cardman 5121/5321, you have to add
'--enable-reader-cm5x21' to the './configure' command, _and_ choose the backend
you want to use, either:
3.1 (new) native CCID backend
If you add the '--enable-ccid' option to the './configure' command, then the new
native CCID driver (courtesy of Werner Koch) will be linked into the library.
This requires a working libusb with development headers.
In order to use the reader, you will need to set the permissions of the
respective /proc/bus/usb or /sys/bus/usb files (or run the application as
root, if you trust my code, which you shouldn't).
If you run udev, just use the 'etc/udev/librfid.rules' udev rulefile, which should
change the group of the usb device to 'users'.
3.2 (old) OpenCT backend
This backend has the advantage that it will allow you to use the contact-based
part and the contactless part of the CM5121 simultaneously. However, it requires
a patched version of OpenCT.
A patch against openct-0.6.7 is available as openct-0.6.7-librfid.patch.
Please note that while librfid in this configuration _uses_ OpenCT as a
lower-layer transport interface, it doesn't actually provide a virtual reader
interface to it, i.e. you can't use CT-API/OpenCT/PCSC API's to access RFID
transponders.
In order to use this backend, you need to use the
'--enable-openct' option and - if it is not installed in a default
location like /usr or /usr/local - set the environment variables
PATH, LD_LIBRARY_PATH and PKG_CONFIG_PATH so all files are found.
4. Testing
In the 'utils' directory, you will get a 'librfid-tool' binary. It is very
minimalist, and mainly an example on how to use the librfid API. For an ICAO
compliant passport, you may try "--layer2 iso14443a --protocol tcl". For a
mifare ultralight transponder, "--layer2 iso14443a --protocol
mifare-ultralight" will give you a full dump of the transponder.
The most basic command to get started is "librfid-tool --scan" to make it
auto-detect the first available (and supported) transponder
5. Help and Support
If you run into any problems using librfid, the primary contact address is the
mailinglist of librfid developers at librfid-devel@lists.gnumonks.org. Please
note that while the development community is trying to provide the best level
of support, response times might vary.
You can subscribe to this list at
https://lists.gnumonks.org/mailman/listinfo/librfid-devel
If you are interested in commercial grade support of librfid, feel free to
contact me privately to discuss your requirements and provide you with a quote.
6. Licensing
Pleas read the file LICENSING.
-- Harald Welte <laforge@gnumonks.org>
+48
View File
@@ -0,0 +1,48 @@
rc632:
- fix handling of timeout (program timer of RC632)
- add a timeout tolerance factor that can be user-specified
- make sure interrupt mode for timer wait works
cm5121:
- fix handling of TX or RX > 0x7f [buffer length in atmel chip?]
iso14443a:
[none]
iso14443b:
- implement 'option 2' frame markers
- test anticollission (need multiple tags)
iso15693:
- implement anticollision
- implement all the rest
mifare_clasic:
- test
- try to auto-detect 1k/4k
- try to distinguish mifare ultralight and mifare classic in/after anticol
tcl:
- implement pps for asymmetric (rx/tx) speeds
openct:
- add ifdhandler driver
other:
- implementation of code for various passive tags
- documentation
- add notion of 'asic implementation' for specifying reader-specific
initialization values such as mod_conductance
- abstract a read single block / read multiple block API where l2/proto
layer can provide multi-block function (e.g. iso15693), which will be
emulated in case there only is a single-block function
- switch over to use of rfid_buf structure, similar to linux skb. upper
layers have sufficient headroom in order to have lower layers add protocol
headers in front of a packet
- implement software checksumming support. The reader should be able to
indicate whether it supports hardware checksum generation / verification.
- application software should be able to override hardware csumming on request
- implement some auto-calibration mode where the user is requested to leave a
single PICC/VICC on the reader and the software iterates through various
mod_conductance and bitphase values to see whether it can calibrate to a given
[new] card. The resulting calibration values are printed by the program.
+9052
View File
File diff suppressed because it is too large Load Diff
+17
View File
@@ -0,0 +1,17 @@
#!/bin/sh
run ()
{
echo "running: $*"
eval $*
if test $? != 0 ; then
echo "error: while running '$*'"
exit 1
fi
}
run aclocal
run libtoolize -f
run automake -a
run autoconf
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
+556
View File
@@ -0,0 +1,556 @@
# This file was generated.
# It contains the lists of macros which have been traced.
# It can be safely removed.
@request = (
bless( [
'0',
1,
[
'/mingw/share/autoconf'
],
[
'/mingw/share/autoconf/autoconf/autoconf.m4f',
'/mingw/share/aclocal/argz.m4',
'/mingw/share/aclocal/libtool.m4',
'/mingw/share/aclocal/ltdl.m4',
'/mingw/share/aclocal/ltoptions.m4',
'/mingw/share/aclocal/ltsugar.m4',
'/mingw/share/aclocal/ltversion.m4',
'/mingw/share/aclocal/lt~obsolete.m4',
'/mingw/share/aclocal-1.11/amversion.m4',
'/mingw/share/aclocal-1.11/auxdir.m4',
'/mingw/share/aclocal-1.11/cond.m4',
'/mingw/share/aclocal-1.11/depend.m4',
'/mingw/share/aclocal-1.11/depout.m4',
'/mingw/share/aclocal-1.11/init.m4',
'/mingw/share/aclocal-1.11/install-sh.m4',
'/mingw/share/aclocal-1.11/lead-dot.m4',
'/mingw/share/aclocal-1.11/make.m4',
'/mingw/share/aclocal-1.11/minuso.m4',
'/mingw/share/aclocal-1.11/missing.m4',
'/mingw/share/aclocal-1.11/mkdirp.m4',
'/mingw/share/aclocal-1.11/options.m4',
'/mingw/share/aclocal-1.11/runlog.m4',
'/mingw/share/aclocal-1.11/sanity.m4',
'/mingw/share/aclocal-1.11/silent.m4',
'/mingw/share/aclocal-1.11/strip.m4',
'/mingw/share/aclocal-1.11/substnot.m4',
'/mingw/share/aclocal-1.11/tar.m4',
'configure.in'
],
{
'AC_LIB_LTDL' => 1,
'AC_LIBTOOL_RC' => 1,
'_LT_PROG_FC' => 1,
'LT_AC_PROG_RC' => 1,
'_LT_PROG_ECHO_BACKSLASH' => 1,
'_LT_AC_LANG_F77' => 1,
'_LT_AC_LANG_F77_CONFIG' => 1,
'AC_PATH_MAGIC' => 1,
'AC_PROG_EGREP' => 1,
'_LT_COMPILER_BOILERPLATE' => 1,
'_LTDL_SETUP' => 1,
'AM_MAKE_INCLUDE' => 1,
'_LT_AC_LANG_GCJ' => 1,
'LT_AC_PROG_EGREP' => 1,
'AC_LIBTOOL_DLOPEN_SELF' => 1,
'AC_DISABLE_SHARED' => 1,
'AM_CONDITIONAL' => 1,
'AM_OUTPUT_DEPENDENCY_COMMANDS' => 1,
'AC_LTDL_SHLIBEXT' => 1,
'AC_LIBTOOL_PICMODE' => 1,
'gl_PREREQ_ARGZ' => 1,
'LT_OUTPUT' => 1,
'AC_CHECK_LIBM' => 1,
'AC_LIBTOOL_LANG_RC_CONFIG' => 1,
'_LT_PROG_F77' => 1,
'AC_LIBTOOL_SYS_LIB_STRIP' => 1,
'AC_LIBLTDL_CONVENIENCE' => 1,
'AM_SET_DEPDIR' => 1,
'_AM_SUBST_NOTMAKE' => 1,
'_LT_AC_TAGCONFIG' => 1,
'_LT_AC_TRY_DLOPEN_SELF' => 1,
'_LT_AC_CHECK_DLFCN' => 1,
'AC_LIBTOOL_SYS_MAX_CMD_LEN' => 1,
'_LT_AC_PROG_ECHO_BACKSLASH' => 1,
'AC_LTDL_SYMBOL_USCORE' => 1,
'AC_LIBTOOL_SYS_HARD_LINK_LOCKS' => 1,
'AC_DEPLIBS_CHECK_METHOD' => 1,
'AM_PROG_INSTALL_STRIP' => 1,
'_m4_warn' => 1,
'AC_PROG_LD' => 1,
'_LT_AC_LANG_GCJ_CONFIG' => 1,
'AU_DEFUN' => 1,
'_AM_PROG_TAR' => 1,
'_LT_AC_LANG_CXX_CONFIG' => 1,
'AM_AUTOMAKE_VERSION' => 1,
'_LT_AC_PROG_CXXCPP' => 1,
'LTOPTIONS_VERSION' => 1,
'AM_ENABLE_SHARED' => 1,
'AC_LIBTOOL_COMPILER_OPTION' => 1,
'AC_LIBTOOL_CONFIG' => 1,
'AC_LTDL_PREOPEN' => 1,
'AM_DISABLE_STATIC' => 1,
'AC_LIBTOOL_LANG_C_CONFIG' => 1,
'AC_PROG_LD_GNU' => 1,
'LTDL_INSTALLABLE' => 1,
'AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH' => 1,
'_LT_LINKER_BOILERPLATE' => 1,
'LT_WITH_LTDL' => 1,
'AC_LIBTOOL_PROG_LD_SHLIBS' => 1,
'AC_LIBTOOL_PROG_COMPILER_PIC' => 1,
'LT_SYS_SYMBOL_USCORE' => 1,
'AC_LTDL_SYS_DLOPEN_DEPLIBS' => 1,
'_LT_AC_LOCK' => 1,
'_AM_AUTOCONF_VERSION' => 1,
'LTSUGAR_VERSION' => 1,
'_AM_IF_OPTION' => 1,
'_AM_MANGLE_OPTION' => 1,
'LT_SYS_MODULE_PATH' => 1,
'_LT_AC_LANG_CXX' => 1,
'LT_PROG_RC' => 1,
'm4_include' => 1,
'AC_ENABLE_SHARED' => 1,
'LT_LIB_M' => 1,
'AC_LIBTOOL_FC' => 1,
'AC_LIBTOOL_F77' => 1,
'LTOBSOLETE_VERSION' => 1,
'm4_pattern_forbid' => 1,
'AM_MISSING_PROG' => 1,
'AC_WITH_LTDL' => 1,
'LT_PATH_LD' => 1,
'AC_LIBTOOL_SYS_DYNAMIC_LINKER' => 1,
'_AC_PROG_LIBTOOL' => 1,
'AM_SET_LEADING_DOT' => 1,
'_LT_AC_SYS_LIBPATH_AIX' => 1,
'_LT_AC_LANG_C_CONFIG' => 1,
'_LT_AC_SHELL_INIT' => 1,
'_LT_WITH_SYSROOT' => 1,
'AC_LIBTOOL_DLOPEN' => 1,
'AM_SET_CURRENT_AUTOMAKE_VERSION' => 1,
'AC_LIBTOOL_GCJ' => 1,
'AM_INIT_AUTOMAKE' => 1,
'AC_DEFUN' => 1,
'AC_DEFUN_ONCE' => 1,
'AC_LIBLTDL_INSTALLABLE' => 1,
'gl_FUNC_ARGZ' => 1,
'AC_PROG_NM' => 1,
'AC_PROG_LIBTOOL' => 1,
'_LT_PROG_CXX' => 1,
'LT_SUPPORTED_TAG' => 1,
'AM_SANITY_CHECK' => 1,
'_LT_AC_FILE_LTDLL_C' => 1,
'AC_LTDL_SHLIBPATH' => 1,
'AC_LTDL_DLSYM_USCORE' => 1,
'AM_DEP_TRACK' => 1,
'_LT_CC_BASENAME' => 1,
'AM_AUX_DIR_EXPAND' => 1,
'AM_PROG_LD' => 1,
'_LT_LIBOBJ' => 1,
'AM_MISSING_HAS_RUN' => 1,
'_AM_DEPENDENCIES' => 1,
'_LT_PROG_LTMAIN' => 1,
'_AM_SET_OPTION' => 1,
'AC_LTDL_DLLIB' => 1,
'AC_LTDL_ENABLE_INSTALL' => 1,
'AM_PROG_INSTALL_SH' => 1,
'AM_PROG_CC_C_O' => 1,
'LT_AC_PROG_SED' => 1,
'AC_DISABLE_STATIC' => 1,
'AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE' => 1,
'LT_SYS_DLOPEN_SELF' => 1,
'LTVERSION_VERSION' => 1,
'AM_PROG_MKDIR_P' => 1,
'_LT_REQUIRED_DARWIN_CHECKS' => 1,
'LT_LANG' => 1,
'_LT_COMPILER_OPTION' => 1,
'AC_LIBTOOL_SETUP' => 1,
'LT_CMD_MAX_LEN' => 1,
'AC_PROG_LD_RELOAD_FLAG' => 1,
'include' => 1,
'LTDL_INIT' => 1,
'_LT_PREPARE_SED_QUOTE_VARS' => 1,
'AM_RUN_LOG' => 1,
'AM_DISABLE_SHARED' => 1,
'_LT_PATH_TOOL_PREFIX' => 1,
'AC_LIBTOOL_OBJDIR' => 1,
'_LT_AC_LANG_RC_CONFIG' => 1,
'LT_PATH_NM' => 1,
'LT_AC_PROG_GCJ' => 1,
'_LT_LINKER_OPTION' => 1,
'LT_SYS_DLSEARCH_PATH' => 1,
'AC_LIBTOOL_PROG_COMPILER_NO_RTTI' => 1,
'AC_LIBTOOL_LANG_F77_CONFIG' => 1,
'AC_PATH_TOOL_PREFIX' => 1,
'AC_LIBTOOL_CXX' => 1,
'AM_ENABLE_STATIC' => 1,
'AM_PROG_LIBTOOL' => 1,
'LT_INIT' => 1,
'LT_CONFIG_LTDL_DIR' => 1,
'AM_SUBST_NOTMAKE' => 1,
'AC_LIBTOOL_PROG_CC_C_O' => 1,
'AC_LIBTOOL_POSTDEP_PREDEP' => 1,
'AC_ENABLE_FAST_INSTALL' => 1,
'AM_PROG_NM' => 1,
'LT_SYS_DLOPEN_DEPLIBS' => 1,
'_AC_AM_CONFIG_HEADER_HOOK' => 1,
'_AM_OUTPUT_DEPENDENCY_COMMANDS' => 1,
'_LT_AC_TAGVAR' => 1,
'LT_FUNC_DLSYM_USCORE' => 1,
'm4_pattern_allow' => 1,
'LT_LIB_DLLOAD' => 1,
'LTDL_CONVENIENCE' => 1,
'AM_SILENT_RULES' => 1,
'AC_LTDL_OBJDIR' => 1,
'AC_DISABLE_FAST_INSTALL' => 1,
'AC_LIBTOOL_LANG_GCJ_CONFIG' => 1,
'_LT_AC_SYS_COMPILER' => 1,
'AC_ENABLE_STATIC' => 1,
'AC_LTDL_SYSSEARCHPATH' => 1,
'AC_LIBTOOL_SYS_OLD_ARCHIVE' => 1,
'AC_LIBTOOL_LANG_CXX_CONFIG' => 1,
'LT_PROG_GCJ' => 1,
'AC_LIBTOOL_LINKER_OPTION' => 1,
'LT_SYS_MODULE_EXT' => 1,
'_AM_SET_OPTIONS' => 1,
'AC_LIBTOOL_WIN32_DLL' => 1
}
], 'Autom4te::Request' ),
bless( [
'1',
1,
[
'/mingw/share/autoconf'
],
[
'/mingw/share/autoconf/autoconf/autoconf.m4f',
'aclocal.m4',
'configure.in'
],
{
'AM_PROG_CXX_C_O' => 1,
'AC_CANONICAL_SYSTEM' => 1,
'm4_sinclude' => 1,
'LT_INIT' => 1,
'AC_CONFIG_AUX_DIR' => 1,
'AM_PROG_FC_C_O' => 1,
'sinclude' => 1,
'LT_CONFIG_LTDL_DIR' => 1,
'AC_CONFIG_SUBDIRS' => 1,
'_AM_COND_ENDIF' => 1,
'AM_GNU_GETTEXT' => 1,
'AC_LIBSOURCE' => 1,
'AM_GNU_GETTEXT_INTL_SUBDIR' => 1,
'AC_INIT' => 1,
'AC_SUBST_TRACE' => 1,
'AM_CONDITIONAL' => 1,
'AH_OUTPUT' => 1,
'AM_PROG_CC_C_O' => 1,
'AC_FC_FREEFORM' => 1,
'AC_CONFIG_LIBOBJ_DIR' => 1,
'AC_CONFIG_LINKS' => 1,
'_AM_COND_IF' => 1,
'AC_REQUIRE_AUX_FILE' => 1,
'_AM_SUBST_NOTMAKE' => 1,
'AC_CANONICAL_HOST' => 1,
'_LT_AC_TAGCONFIG' => 1,
'AM_PROG_F77_C_O' => 1,
'm4_pattern_allow' => 1,
'm4_include' => 1,
'm4_pattern_forbid' => 1,
'AC_CANONICAL_TARGET' => 1,
'AM_ENABLE_MULTILIB' => 1,
'AM_SILENT_RULES' => 1,
'_AM_COND_ELSE' => 1,
'_m4_warn' => 1,
'AC_CONFIG_FILES' => 1,
'AC_CONFIG_HEADERS' => 1,
'AC_FC_SRCEXT' => 1,
'include' => 1,
'AM_MAINTAINER_MODE' => 1,
'AM_INIT_AUTOMAKE' => 1,
'AC_DEFINE_TRACE_LITERAL' => 1,
'AC_CANONICAL_BUILD' => 1,
'AC_SUBST' => 1,
'AC_PROG_LIBTOOL' => 1,
'LT_SUPPORTED_TAG' => 1,
'AM_AUTOMAKE_VERSION' => 1
}
], 'Autom4te::Request' ),
bless( [
'2',
1,
[
'/usr/share/autoconf'
],
[
'/usr/share/autoconf/autoconf/autoconf.m4f',
'/usr/share/aclocal/argz.m4',
'/usr/share/aclocal/libtool.m4',
'/usr/share/aclocal/ltdl.m4',
'/usr/share/aclocal/ltoptions.m4',
'/usr/share/aclocal/ltsugar.m4',
'/usr/share/aclocal/ltversion.m4',
'/usr/share/aclocal/lt~obsolete.m4',
'/usr/share/aclocal-1.11/amversion.m4',
'/usr/share/aclocal-1.11/auxdir.m4',
'/usr/share/aclocal-1.11/cond.m4',
'/usr/share/aclocal-1.11/depend.m4',
'/usr/share/aclocal-1.11/depout.m4',
'/usr/share/aclocal-1.11/init.m4',
'/usr/share/aclocal-1.11/install-sh.m4',
'/usr/share/aclocal-1.11/lead-dot.m4',
'/usr/share/aclocal-1.11/make.m4',
'/usr/share/aclocal-1.11/minuso.m4',
'/usr/share/aclocal-1.11/missing.m4',
'/usr/share/aclocal-1.11/mkdirp.m4',
'/usr/share/aclocal-1.11/options.m4',
'/usr/share/aclocal-1.11/runlog.m4',
'/usr/share/aclocal-1.11/sanity.m4',
'/usr/share/aclocal-1.11/silent.m4',
'/usr/share/aclocal-1.11/strip.m4',
'/usr/share/aclocal-1.11/substnot.m4',
'/usr/share/aclocal-1.11/tar.m4',
'configure.in'
],
{
'AC_LIB_LTDL' => 1,
'AC_LIBTOOL_RC' => 1,
'_LT_PROG_FC' => 1,
'LT_AC_PROG_RC' => 1,
'_LT_PROG_ECHO_BACKSLASH' => 1,
'_LT_AC_LANG_F77' => 1,
'_LT_AC_LANG_F77_CONFIG' => 1,
'AC_PATH_MAGIC' => 1,
'AC_PROG_EGREP' => 1,
'_LT_COMPILER_BOILERPLATE' => 1,
'_LTDL_SETUP' => 1,
'AM_MAKE_INCLUDE' => 1,
'_LT_AC_LANG_GCJ' => 1,
'LT_AC_PROG_EGREP' => 1,
'AC_LIBTOOL_DLOPEN_SELF' => 1,
'AC_DISABLE_SHARED' => 1,
'AM_CONDITIONAL' => 1,
'AM_OUTPUT_DEPENDENCY_COMMANDS' => 1,
'AC_LTDL_SHLIBEXT' => 1,
'AC_LIBTOOL_PICMODE' => 1,
'gl_PREREQ_ARGZ' => 1,
'LT_OUTPUT' => 1,
'AC_CHECK_LIBM' => 1,
'AC_LIBTOOL_LANG_RC_CONFIG' => 1,
'_LT_PROG_F77' => 1,
'AC_LIBTOOL_SYS_LIB_STRIP' => 1,
'AC_LIBLTDL_CONVENIENCE' => 1,
'AM_SET_DEPDIR' => 1,
'_AM_SUBST_NOTMAKE' => 1,
'_LT_AC_TAGCONFIG' => 1,
'_LT_AC_TRY_DLOPEN_SELF' => 1,
'_LT_AC_CHECK_DLFCN' => 1,
'AC_LIBTOOL_SYS_MAX_CMD_LEN' => 1,
'_LT_AC_PROG_ECHO_BACKSLASH' => 1,
'AC_LTDL_SYMBOL_USCORE' => 1,
'AC_LIBTOOL_SYS_HARD_LINK_LOCKS' => 1,
'AC_DEPLIBS_CHECK_METHOD' => 1,
'AM_PROG_INSTALL_STRIP' => 1,
'_m4_warn' => 1,
'AC_PROG_LD' => 1,
'_LT_AC_LANG_GCJ_CONFIG' => 1,
'AU_DEFUN' => 1,
'_AM_PROG_TAR' => 1,
'_LT_AC_LANG_CXX_CONFIG' => 1,
'AM_AUTOMAKE_VERSION' => 1,
'_LT_AC_PROG_CXXCPP' => 1,
'LTOPTIONS_VERSION' => 1,
'AM_ENABLE_SHARED' => 1,
'AC_LIBTOOL_COMPILER_OPTION' => 1,
'AC_LIBTOOL_CONFIG' => 1,
'AC_LTDL_PREOPEN' => 1,
'AM_DISABLE_STATIC' => 1,
'AC_LIBTOOL_LANG_C_CONFIG' => 1,
'AC_PROG_LD_GNU' => 1,
'LTDL_INSTALLABLE' => 1,
'AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH' => 1,
'_LT_LINKER_BOILERPLATE' => 1,
'LT_WITH_LTDL' => 1,
'AC_LIBTOOL_PROG_LD_SHLIBS' => 1,
'AC_LIBTOOL_PROG_COMPILER_PIC' => 1,
'LT_SYS_SYMBOL_USCORE' => 1,
'AC_LTDL_SYS_DLOPEN_DEPLIBS' => 1,
'_LT_AC_LOCK' => 1,
'_AM_AUTOCONF_VERSION' => 1,
'LTSUGAR_VERSION' => 1,
'_AM_IF_OPTION' => 1,
'_AM_MANGLE_OPTION' => 1,
'LT_SYS_MODULE_PATH' => 1,
'_LT_AC_LANG_CXX' => 1,
'LT_PROG_RC' => 1,
'm4_include' => 1,
'AC_ENABLE_SHARED' => 1,
'LT_LIB_M' => 1,
'AC_LIBTOOL_FC' => 1,
'AC_LIBTOOL_F77' => 1,
'LTOBSOLETE_VERSION' => 1,
'm4_pattern_forbid' => 1,
'AM_MISSING_PROG' => 1,
'AC_WITH_LTDL' => 1,
'LT_PATH_LD' => 1,
'AC_LIBTOOL_SYS_DYNAMIC_LINKER' => 1,
'_AC_PROG_LIBTOOL' => 1,
'AM_SET_LEADING_DOT' => 1,
'_LT_AC_SYS_LIBPATH_AIX' => 1,
'_LT_AC_LANG_C_CONFIG' => 1,
'_LT_AC_SHELL_INIT' => 1,
'AC_LIBTOOL_DLOPEN' => 1,
'AM_SET_CURRENT_AUTOMAKE_VERSION' => 1,
'AC_LIBTOOL_GCJ' => 1,
'AM_INIT_AUTOMAKE' => 1,
'AC_DEFUN' => 1,
'AC_DEFUN_ONCE' => 1,
'AC_LIBLTDL_INSTALLABLE' => 1,
'gl_FUNC_ARGZ' => 1,
'AC_PROG_NM' => 1,
'AC_PROG_LIBTOOL' => 1,
'_LT_PROG_CXX' => 1,
'LT_SUPPORTED_TAG' => 1,
'AM_SANITY_CHECK' => 1,
'_LT_AC_FILE_LTDLL_C' => 1,
'AC_LTDL_SHLIBPATH' => 1,
'AC_LTDL_DLSYM_USCORE' => 1,
'AM_DEP_TRACK' => 1,
'_LT_CC_BASENAME' => 1,
'AM_AUX_DIR_EXPAND' => 1,
'AM_PROG_LD' => 1,
'_LT_LIBOBJ' => 1,
'AM_MISSING_HAS_RUN' => 1,
'_AM_DEPENDENCIES' => 1,
'_LT_PROG_LTMAIN' => 1,
'_AM_SET_OPTION' => 1,
'AC_LTDL_DLLIB' => 1,
'AC_LTDL_ENABLE_INSTALL' => 1,
'AM_PROG_INSTALL_SH' => 1,
'AM_PROG_CC_C_O' => 1,
'LT_AC_PROG_SED' => 1,
'AC_DISABLE_STATIC' => 1,
'AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE' => 1,
'LT_SYS_DLOPEN_SELF' => 1,
'LTVERSION_VERSION' => 1,
'AM_PROG_MKDIR_P' => 1,
'_LT_REQUIRED_DARWIN_CHECKS' => 1,
'LT_LANG' => 1,
'_LT_COMPILER_OPTION' => 1,
'AC_LIBTOOL_SETUP' => 1,
'LT_CMD_MAX_LEN' => 1,
'AC_PROG_LD_RELOAD_FLAG' => 1,
'include' => 1,
'LTDL_INIT' => 1,
'_LT_PREPARE_SED_QUOTE_VARS' => 1,
'AM_RUN_LOG' => 1,
'AM_DISABLE_SHARED' => 1,
'_LT_PATH_TOOL_PREFIX' => 1,
'AC_LIBTOOL_OBJDIR' => 1,
'_LT_AC_LANG_RC_CONFIG' => 1,
'LT_PATH_NM' => 1,
'LT_AC_PROG_GCJ' => 1,
'_LT_LINKER_OPTION' => 1,
'LT_SYS_DLSEARCH_PATH' => 1,
'AC_LIBTOOL_PROG_COMPILER_NO_RTTI' => 1,
'AC_LIBTOOL_LANG_F77_CONFIG' => 1,
'AC_PATH_TOOL_PREFIX' => 1,
'AC_LIBTOOL_CXX' => 1,
'AM_ENABLE_STATIC' => 1,
'AM_PROG_LIBTOOL' => 1,
'LT_INIT' => 1,
'LT_CONFIG_LTDL_DIR' => 1,
'AM_SUBST_NOTMAKE' => 1,
'AC_LIBTOOL_PROG_CC_C_O' => 1,
'AC_LIBTOOL_POSTDEP_PREDEP' => 1,
'AC_ENABLE_FAST_INSTALL' => 1,
'AM_PROG_NM' => 1,
'LT_SYS_DLOPEN_DEPLIBS' => 1,
'_AC_AM_CONFIG_HEADER_HOOK' => 1,
'_AM_OUTPUT_DEPENDENCY_COMMANDS' => 1,
'_LT_AC_TAGVAR' => 1,
'LT_FUNC_DLSYM_USCORE' => 1,
'm4_pattern_allow' => 1,
'LT_LIB_DLLOAD' => 1,
'LTDL_CONVENIENCE' => 1,
'AM_SILENT_RULES' => 1,
'AC_LTDL_OBJDIR' => 1,
'AC_DISABLE_FAST_INSTALL' => 1,
'AC_LIBTOOL_LANG_GCJ_CONFIG' => 1,
'_LT_AC_SYS_COMPILER' => 1,
'AC_ENABLE_STATIC' => 1,
'AC_LTDL_SYSSEARCHPATH' => 1,
'AC_LIBTOOL_SYS_OLD_ARCHIVE' => 1,
'AC_LIBTOOL_LANG_CXX_CONFIG' => 1,
'LT_PROG_GCJ' => 1,
'AC_LIBTOOL_LINKER_OPTION' => 1,
'LT_SYS_MODULE_EXT' => 1,
'_AM_SET_OPTIONS' => 1,
'AC_LIBTOOL_WIN32_DLL' => 1
}
], 'Autom4te::Request' ),
bless( [
'3',
1,
[
'/usr/share/autoconf'
],
[
'/usr/share/autoconf/autoconf/autoconf.m4f',
'aclocal.m4',
'configure.in'
],
{
'AM_PROG_CXX_C_O' => 1,
'AC_CANONICAL_SYSTEM' => 1,
'm4_sinclude' => 1,
'LT_INIT' => 1,
'AC_CONFIG_AUX_DIR' => 1,
'AM_PROG_FC_C_O' => 1,
'sinclude' => 1,
'LT_CONFIG_LTDL_DIR' => 1,
'AC_CONFIG_SUBDIRS' => 1,
'_AM_COND_ENDIF' => 1,
'AM_GNU_GETTEXT' => 1,
'AC_LIBSOURCE' => 1,
'AM_GNU_GETTEXT_INTL_SUBDIR' => 1,
'AC_INIT' => 1,
'AC_SUBST_TRACE' => 1,
'AM_CONDITIONAL' => 1,
'AH_OUTPUT' => 1,
'AM_PROG_CC_C_O' => 1,
'AC_FC_FREEFORM' => 1,
'AC_CONFIG_LIBOBJ_DIR' => 1,
'AC_CONFIG_LINKS' => 1,
'_AM_COND_IF' => 1,
'AC_REQUIRE_AUX_FILE' => 1,
'_AM_SUBST_NOTMAKE' => 1,
'AC_CANONICAL_HOST' => 1,
'_LT_AC_TAGCONFIG' => 1,
'AM_PROG_F77_C_O' => 1,
'm4_pattern_allow' => 1,
'm4_include' => 1,
'm4_pattern_forbid' => 1,
'AC_CANONICAL_TARGET' => 1,
'AM_ENABLE_MULTILIB' => 1,
'AM_SILENT_RULES' => 1,
'_AM_COND_ELSE' => 1,
'_m4_warn' => 1,
'AC_CONFIG_FILES' => 1,
'AC_CONFIG_HEADERS' => 1,
'AC_FC_SRCEXT' => 1,
'include' => 1,
'AM_MAINTAINER_MODE' => 1,
'AM_INIT_AUTOMAKE' => 1,
'AC_DEFINE_TRACE_LITERAL' => 1,
'AC_CANONICAL_BUILD' => 1,
'AC_SUBST' => 1,
'AC_PROG_LIBTOOL' => 1,
'LT_SUPPORTED_TAG' => 1,
'AM_AUTOMAKE_VERSION' => 1
}
], 'Autom4te::Request' )
);
File diff suppressed because it is too large Load Diff
+616
View File
@@ -0,0 +1,616 @@
m4trace:configure.in:3: -1- AC_INIT
m4trace:configure.in:3: -1- m4_pattern_forbid([^_?A[CHUM]_])
m4trace:configure.in:3: -1- m4_pattern_forbid([_AC_])
m4trace:configure.in:3: -1- m4_pattern_forbid([^LIBOBJS$], [do not use LIBOBJS directly, use AC_LIBOBJ (see section `AC_LIBOBJ vs LIBOBJS'])
m4trace:configure.in:3: -1- m4_pattern_allow([^AS_FLAGS$])
m4trace:configure.in:3: -1- m4_pattern_forbid([^_?m4_])
m4trace:configure.in:3: -1- m4_pattern_forbid([^dnl$])
m4trace:configure.in:3: -1- m4_pattern_forbid([^_?AS_])
m4trace:configure.in:3: -1- AC_SUBST([SHELL])
m4trace:configure.in:3: -1- AC_SUBST_TRACE([SHELL])
m4trace:configure.in:3: -1- m4_pattern_allow([^SHELL$])
m4trace:configure.in:3: -1- AC_SUBST([PATH_SEPARATOR])
m4trace:configure.in:3: -1- AC_SUBST_TRACE([PATH_SEPARATOR])
m4trace:configure.in:3: -1- m4_pattern_allow([^PATH_SEPARATOR$])
m4trace:configure.in:3: -1- AC_SUBST([PACKAGE_NAME], [m4_ifdef([AC_PACKAGE_NAME], ['AC_PACKAGE_NAME'])])
m4trace:configure.in:3: -1- AC_SUBST_TRACE([PACKAGE_NAME])
m4trace:configure.in:3: -1- m4_pattern_allow([^PACKAGE_NAME$])
m4trace:configure.in:3: -1- AC_SUBST([PACKAGE_TARNAME], [m4_ifdef([AC_PACKAGE_TARNAME], ['AC_PACKAGE_TARNAME'])])
m4trace:configure.in:3: -1- AC_SUBST_TRACE([PACKAGE_TARNAME])
m4trace:configure.in:3: -1- m4_pattern_allow([^PACKAGE_TARNAME$])
m4trace:configure.in:3: -1- AC_SUBST([PACKAGE_VERSION], [m4_ifdef([AC_PACKAGE_VERSION], ['AC_PACKAGE_VERSION'])])
m4trace:configure.in:3: -1- AC_SUBST_TRACE([PACKAGE_VERSION])
m4trace:configure.in:3: -1- m4_pattern_allow([^PACKAGE_VERSION$])
m4trace:configure.in:3: -1- AC_SUBST([PACKAGE_STRING], [m4_ifdef([AC_PACKAGE_STRING], ['AC_PACKAGE_STRING'])])
m4trace:configure.in:3: -1- AC_SUBST_TRACE([PACKAGE_STRING])
m4trace:configure.in:3: -1- m4_pattern_allow([^PACKAGE_STRING$])
m4trace:configure.in:3: -1- AC_SUBST([PACKAGE_BUGREPORT], [m4_ifdef([AC_PACKAGE_BUGREPORT], ['AC_PACKAGE_BUGREPORT'])])
m4trace:configure.in:3: -1- AC_SUBST_TRACE([PACKAGE_BUGREPORT])
m4trace:configure.in:3: -1- m4_pattern_allow([^PACKAGE_BUGREPORT$])
m4trace:configure.in:3: -1- AC_SUBST([PACKAGE_URL], [m4_ifdef([AC_PACKAGE_URL], ['AC_PACKAGE_URL'])])
m4trace:configure.in:3: -1- AC_SUBST_TRACE([PACKAGE_URL])
m4trace:configure.in:3: -1- m4_pattern_allow([^PACKAGE_URL$])
m4trace:configure.in:3: -1- AC_SUBST([exec_prefix], [NONE])
m4trace:configure.in:3: -1- AC_SUBST_TRACE([exec_prefix])
m4trace:configure.in:3: -1- m4_pattern_allow([^exec_prefix$])
m4trace:configure.in:3: -1- AC_SUBST([prefix], [NONE])
m4trace:configure.in:3: -1- AC_SUBST_TRACE([prefix])
m4trace:configure.in:3: -1- m4_pattern_allow([^prefix$])
m4trace:configure.in:3: -1- AC_SUBST([program_transform_name], [s,x,x,])
m4trace:configure.in:3: -1- AC_SUBST_TRACE([program_transform_name])
m4trace:configure.in:3: -1- m4_pattern_allow([^program_transform_name$])
m4trace:configure.in:3: -1- AC_SUBST([bindir], ['${exec_prefix}/bin'])
m4trace:configure.in:3: -1- AC_SUBST_TRACE([bindir])
m4trace:configure.in:3: -1- m4_pattern_allow([^bindir$])
m4trace:configure.in:3: -1- AC_SUBST([sbindir], ['${exec_prefix}/sbin'])
m4trace:configure.in:3: -1- AC_SUBST_TRACE([sbindir])
m4trace:configure.in:3: -1- m4_pattern_allow([^sbindir$])
m4trace:configure.in:3: -1- AC_SUBST([libexecdir], ['${exec_prefix}/libexec'])
m4trace:configure.in:3: -1- AC_SUBST_TRACE([libexecdir])
m4trace:configure.in:3: -1- m4_pattern_allow([^libexecdir$])
m4trace:configure.in:3: -1- AC_SUBST([datarootdir], ['${prefix}/share'])
m4trace:configure.in:3: -1- AC_SUBST_TRACE([datarootdir])
m4trace:configure.in:3: -1- m4_pattern_allow([^datarootdir$])
m4trace:configure.in:3: -1- AC_SUBST([datadir], ['${datarootdir}'])
m4trace:configure.in:3: -1- AC_SUBST_TRACE([datadir])
m4trace:configure.in:3: -1- m4_pattern_allow([^datadir$])
m4trace:configure.in:3: -1- AC_SUBST([sysconfdir], ['${prefix}/etc'])
m4trace:configure.in:3: -1- AC_SUBST_TRACE([sysconfdir])
m4trace:configure.in:3: -1- m4_pattern_allow([^sysconfdir$])
m4trace:configure.in:3: -1- AC_SUBST([sharedstatedir], ['${prefix}/com'])
m4trace:configure.in:3: -1- AC_SUBST_TRACE([sharedstatedir])
m4trace:configure.in:3: -1- m4_pattern_allow([^sharedstatedir$])
m4trace:configure.in:3: -1- AC_SUBST([localstatedir], ['${prefix}/var'])
m4trace:configure.in:3: -1- AC_SUBST_TRACE([localstatedir])
m4trace:configure.in:3: -1- m4_pattern_allow([^localstatedir$])
m4trace:configure.in:3: -1- AC_SUBST([includedir], ['${prefix}/include'])
m4trace:configure.in:3: -1- AC_SUBST_TRACE([includedir])
m4trace:configure.in:3: -1- m4_pattern_allow([^includedir$])
m4trace:configure.in:3: -1- AC_SUBST([oldincludedir], ['/usr/include'])
m4trace:configure.in:3: -1- AC_SUBST_TRACE([oldincludedir])
m4trace:configure.in:3: -1- m4_pattern_allow([^oldincludedir$])
m4trace:configure.in:3: -1- AC_SUBST([docdir], [m4_ifset([AC_PACKAGE_TARNAME],
['${datarootdir}/doc/${PACKAGE_TARNAME}'],
['${datarootdir}/doc/${PACKAGE}'])])
m4trace:configure.in:3: -1- AC_SUBST_TRACE([docdir])
m4trace:configure.in:3: -1- m4_pattern_allow([^docdir$])
m4trace:configure.in:3: -1- AC_SUBST([infodir], ['${datarootdir}/info'])
m4trace:configure.in:3: -1- AC_SUBST_TRACE([infodir])
m4trace:configure.in:3: -1- m4_pattern_allow([^infodir$])
m4trace:configure.in:3: -1- AC_SUBST([htmldir], ['${docdir}'])
m4trace:configure.in:3: -1- AC_SUBST_TRACE([htmldir])
m4trace:configure.in:3: -1- m4_pattern_allow([^htmldir$])
m4trace:configure.in:3: -1- AC_SUBST([dvidir], ['${docdir}'])
m4trace:configure.in:3: -1- AC_SUBST_TRACE([dvidir])
m4trace:configure.in:3: -1- m4_pattern_allow([^dvidir$])
m4trace:configure.in:3: -1- AC_SUBST([pdfdir], ['${docdir}'])
m4trace:configure.in:3: -1- AC_SUBST_TRACE([pdfdir])
m4trace:configure.in:3: -1- m4_pattern_allow([^pdfdir$])
m4trace:configure.in:3: -1- AC_SUBST([psdir], ['${docdir}'])
m4trace:configure.in:3: -1- AC_SUBST_TRACE([psdir])
m4trace:configure.in:3: -1- m4_pattern_allow([^psdir$])
m4trace:configure.in:3: -1- AC_SUBST([libdir], ['${exec_prefix}/lib'])
m4trace:configure.in:3: -1- AC_SUBST_TRACE([libdir])
m4trace:configure.in:3: -1- m4_pattern_allow([^libdir$])
m4trace:configure.in:3: -1- AC_SUBST([localedir], ['${datarootdir}/locale'])
m4trace:configure.in:3: -1- AC_SUBST_TRACE([localedir])
m4trace:configure.in:3: -1- m4_pattern_allow([^localedir$])
m4trace:configure.in:3: -1- AC_SUBST([mandir], ['${datarootdir}/man'])
m4trace:configure.in:3: -1- AC_SUBST_TRACE([mandir])
m4trace:configure.in:3: -1- m4_pattern_allow([^mandir$])
m4trace:configure.in:3: -1- AC_DEFINE_TRACE_LITERAL([PACKAGE_NAME])
m4trace:configure.in:3: -1- m4_pattern_allow([^PACKAGE_NAME$])
m4trace:configure.in:3: -1- AH_OUTPUT([PACKAGE_NAME], [/* Define to the full name of this package. */
@%:@undef PACKAGE_NAME])
m4trace:configure.in:3: -1- AC_DEFINE_TRACE_LITERAL([PACKAGE_TARNAME])
m4trace:configure.in:3: -1- m4_pattern_allow([^PACKAGE_TARNAME$])
m4trace:configure.in:3: -1- AH_OUTPUT([PACKAGE_TARNAME], [/* Define to the one symbol short name of this package. */
@%:@undef PACKAGE_TARNAME])
m4trace:configure.in:3: -1- AC_DEFINE_TRACE_LITERAL([PACKAGE_VERSION])
m4trace:configure.in:3: -1- m4_pattern_allow([^PACKAGE_VERSION$])
m4trace:configure.in:3: -1- AH_OUTPUT([PACKAGE_VERSION], [/* Define to the version of this package. */
@%:@undef PACKAGE_VERSION])
m4trace:configure.in:3: -1- AC_DEFINE_TRACE_LITERAL([PACKAGE_STRING])
m4trace:configure.in:3: -1- m4_pattern_allow([^PACKAGE_STRING$])
m4trace:configure.in:3: -1- AH_OUTPUT([PACKAGE_STRING], [/* Define to the full name and version of this package. */
@%:@undef PACKAGE_STRING])
m4trace:configure.in:3: -1- AC_DEFINE_TRACE_LITERAL([PACKAGE_BUGREPORT])
m4trace:configure.in:3: -1- m4_pattern_allow([^PACKAGE_BUGREPORT$])
m4trace:configure.in:3: -1- AH_OUTPUT([PACKAGE_BUGREPORT], [/* Define to the address where bug reports for this package should be sent. */
@%:@undef PACKAGE_BUGREPORT])
m4trace:configure.in:3: -1- AC_DEFINE_TRACE_LITERAL([PACKAGE_URL])
m4trace:configure.in:3: -1- m4_pattern_allow([^PACKAGE_URL$])
m4trace:configure.in:3: -1- AH_OUTPUT([PACKAGE_URL], [/* Define to the home page for this package. */
@%:@undef PACKAGE_URL])
m4trace:configure.in:3: -1- AC_SUBST([DEFS])
m4trace:configure.in:3: -1- AC_SUBST_TRACE([DEFS])
m4trace:configure.in:3: -1- m4_pattern_allow([^DEFS$])
m4trace:configure.in:3: -1- AC_SUBST([ECHO_C])
m4trace:configure.in:3: -1- AC_SUBST_TRACE([ECHO_C])
m4trace:configure.in:3: -1- m4_pattern_allow([^ECHO_C$])
m4trace:configure.in:3: -1- AC_SUBST([ECHO_N])
m4trace:configure.in:3: -1- AC_SUBST_TRACE([ECHO_N])
m4trace:configure.in:3: -1- m4_pattern_allow([^ECHO_N$])
m4trace:configure.in:3: -1- AC_SUBST([ECHO_T])
m4trace:configure.in:3: -1- AC_SUBST_TRACE([ECHO_T])
m4trace:configure.in:3: -1- m4_pattern_allow([^ECHO_T$])
m4trace:configure.in:3: -1- AC_SUBST([LIBS])
m4trace:configure.in:3: -1- AC_SUBST_TRACE([LIBS])
m4trace:configure.in:3: -1- m4_pattern_allow([^LIBS$])
m4trace:configure.in:3: -1- AC_SUBST([build_alias])
m4trace:configure.in:3: -1- AC_SUBST_TRACE([build_alias])
m4trace:configure.in:3: -1- m4_pattern_allow([^build_alias$])
m4trace:configure.in:3: -1- AC_SUBST([host_alias])
m4trace:configure.in:3: -1- AC_SUBST_TRACE([host_alias])
m4trace:configure.in:3: -1- m4_pattern_allow([^host_alias$])
m4trace:configure.in:3: -1- AC_SUBST([target_alias])
m4trace:configure.in:3: -1- AC_SUBST_TRACE([target_alias])
m4trace:configure.in:3: -1- m4_pattern_allow([^target_alias$])
m4trace:configure.in:4: -1- AC_CANONICAL_SYSTEM
m4trace:configure.in:4: -1- _m4_warn([obsolete], [The macro `AC_CANONICAL_SYSTEM' is obsolete.
You should run autoupdate.], [/mingw/src/autoconf/26/autoconf-2.67/lib/autoconf/general.m4:1858: AC_CANONICAL_SYSTEM is expanded from...
configure.in:4: the top level])
m4trace:configure.in:4: -1- AC_CANONICAL_TARGET
m4trace:configure.in:4: -1- AC_CANONICAL_HOST
m4trace:configure.in:4: -1- AC_CANONICAL_BUILD
m4trace:configure.in:4: -1- AC_REQUIRE_AUX_FILE([config.sub])
m4trace:configure.in:4: -1- AC_REQUIRE_AUX_FILE([config.guess])
m4trace:configure.in:4: -1- AC_SUBST([build], [$ac_cv_build])
m4trace:configure.in:4: -1- AC_SUBST_TRACE([build])
m4trace:configure.in:4: -1- m4_pattern_allow([^build$])
m4trace:configure.in:4: -1- AC_SUBST([build_cpu], [$[1]])
m4trace:configure.in:4: -1- AC_SUBST_TRACE([build_cpu])
m4trace:configure.in:4: -1- m4_pattern_allow([^build_cpu$])
m4trace:configure.in:4: -1- AC_SUBST([build_vendor], [$[2]])
m4trace:configure.in:4: -1- AC_SUBST_TRACE([build_vendor])
m4trace:configure.in:4: -1- m4_pattern_allow([^build_vendor$])
m4trace:configure.in:4: -1- AC_SUBST([build_os])
m4trace:configure.in:4: -1- AC_SUBST_TRACE([build_os])
m4trace:configure.in:4: -1- m4_pattern_allow([^build_os$])
m4trace:configure.in:4: -1- AC_SUBST([host], [$ac_cv_host])
m4trace:configure.in:4: -1- AC_SUBST_TRACE([host])
m4trace:configure.in:4: -1- m4_pattern_allow([^host$])
m4trace:configure.in:4: -1- AC_SUBST([host_cpu], [$[1]])
m4trace:configure.in:4: -1- AC_SUBST_TRACE([host_cpu])
m4trace:configure.in:4: -1- m4_pattern_allow([^host_cpu$])
m4trace:configure.in:4: -1- AC_SUBST([host_vendor], [$[2]])
m4trace:configure.in:4: -1- AC_SUBST_TRACE([host_vendor])
m4trace:configure.in:4: -1- m4_pattern_allow([^host_vendor$])
m4trace:configure.in:4: -1- AC_SUBST([host_os])
m4trace:configure.in:4: -1- AC_SUBST_TRACE([host_os])
m4trace:configure.in:4: -1- m4_pattern_allow([^host_os$])
m4trace:configure.in:4: -1- AC_SUBST([target], [$ac_cv_target])
m4trace:configure.in:4: -1- AC_SUBST_TRACE([target])
m4trace:configure.in:4: -1- m4_pattern_allow([^target$])
m4trace:configure.in:4: -1- AC_SUBST([target_cpu], [$[1]])
m4trace:configure.in:4: -1- AC_SUBST_TRACE([target_cpu])
m4trace:configure.in:4: -1- m4_pattern_allow([^target_cpu$])
m4trace:configure.in:4: -1- AC_SUBST([target_vendor], [$[2]])
m4trace:configure.in:4: -1- AC_SUBST_TRACE([target_vendor])
m4trace:configure.in:4: -1- m4_pattern_allow([^target_vendor$])
m4trace:configure.in:4: -1- AC_SUBST([target_os])
m4trace:configure.in:4: -1- AC_SUBST_TRACE([target_os])
m4trace:configure.in:4: -1- m4_pattern_allow([^target_os$])
m4trace:configure.in:5: -1- AM_INIT_AUTOMAKE([librfid], [0.1.0])
m4trace:configure.in:5: -1- m4_pattern_allow([^AM_[A-Z]+FLAGS$])
m4trace:configure.in:5: -1- AM_AUTOMAKE_VERSION([1.11.1])
m4trace:configure.in:5: -1- AC_REQUIRE_AUX_FILE([install-sh])
m4trace:configure.in:5: -1- AC_SUBST([INSTALL_PROGRAM])
m4trace:configure.in:5: -1- AC_SUBST_TRACE([INSTALL_PROGRAM])
m4trace:configure.in:5: -1- m4_pattern_allow([^INSTALL_PROGRAM$])
m4trace:configure.in:5: -1- AC_SUBST([INSTALL_SCRIPT])
m4trace:configure.in:5: -1- AC_SUBST_TRACE([INSTALL_SCRIPT])
m4trace:configure.in:5: -1- m4_pattern_allow([^INSTALL_SCRIPT$])
m4trace:configure.in:5: -1- AC_SUBST([INSTALL_DATA])
m4trace:configure.in:5: -1- AC_SUBST_TRACE([INSTALL_DATA])
m4trace:configure.in:5: -1- m4_pattern_allow([^INSTALL_DATA$])
m4trace:configure.in:5: -1- AC_SUBST([am__isrc], [' -I$(srcdir)'])
m4trace:configure.in:5: -1- AC_SUBST_TRACE([am__isrc])
m4trace:configure.in:5: -1- m4_pattern_allow([^am__isrc$])
m4trace:configure.in:5: -1- _AM_SUBST_NOTMAKE([am__isrc])
m4trace:configure.in:5: -1- AC_SUBST([CYGPATH_W])
m4trace:configure.in:5: -1- AC_SUBST_TRACE([CYGPATH_W])
m4trace:configure.in:5: -1- m4_pattern_allow([^CYGPATH_W$])
m4trace:configure.in:5: -1- AC_SUBST([PACKAGE], [librfid])
m4trace:configure.in:5: -1- AC_SUBST_TRACE([PACKAGE])
m4trace:configure.in:5: -1- m4_pattern_allow([^PACKAGE$])
m4trace:configure.in:5: -1- AC_SUBST([VERSION], [0.1.0])
m4trace:configure.in:5: -1- AC_SUBST_TRACE([VERSION])
m4trace:configure.in:5: -1- m4_pattern_allow([^VERSION$])
m4trace:configure.in:5: -1- AC_DEFINE_TRACE_LITERAL([PACKAGE])
m4trace:configure.in:5: -1- m4_pattern_allow([^PACKAGE$])
m4trace:configure.in:5: -1- AH_OUTPUT([PACKAGE], [/* Name of package */
@%:@undef PACKAGE])
m4trace:configure.in:5: -1- AC_DEFINE_TRACE_LITERAL([VERSION])
m4trace:configure.in:5: -1- m4_pattern_allow([^VERSION$])
m4trace:configure.in:5: -1- AH_OUTPUT([VERSION], [/* Version number of package */
@%:@undef VERSION])
m4trace:configure.in:5: -1- AC_REQUIRE_AUX_FILE([missing])
m4trace:configure.in:5: -1- AC_SUBST([ACLOCAL])
m4trace:configure.in:5: -1- AC_SUBST_TRACE([ACLOCAL])
m4trace:configure.in:5: -1- m4_pattern_allow([^ACLOCAL$])
m4trace:configure.in:5: -1- AC_SUBST([AUTOCONF])
m4trace:configure.in:5: -1- AC_SUBST_TRACE([AUTOCONF])
m4trace:configure.in:5: -1- m4_pattern_allow([^AUTOCONF$])
m4trace:configure.in:5: -1- AC_SUBST([AUTOMAKE])
m4trace:configure.in:5: -1- AC_SUBST_TRACE([AUTOMAKE])
m4trace:configure.in:5: -1- m4_pattern_allow([^AUTOMAKE$])
m4trace:configure.in:5: -1- AC_SUBST([AUTOHEADER])
m4trace:configure.in:5: -1- AC_SUBST_TRACE([AUTOHEADER])
m4trace:configure.in:5: -1- m4_pattern_allow([^AUTOHEADER$])
m4trace:configure.in:5: -1- AC_SUBST([MAKEINFO])
m4trace:configure.in:5: -1- AC_SUBST_TRACE([MAKEINFO])
m4trace:configure.in:5: -1- m4_pattern_allow([^MAKEINFO$])
m4trace:configure.in:5: -1- AC_SUBST([install_sh])
m4trace:configure.in:5: -1- AC_SUBST_TRACE([install_sh])
m4trace:configure.in:5: -1- m4_pattern_allow([^install_sh$])
m4trace:configure.in:5: -1- AC_SUBST([STRIP])
m4trace:configure.in:5: -1- AC_SUBST_TRACE([STRIP])
m4trace:configure.in:5: -1- m4_pattern_allow([^STRIP$])
m4trace:configure.in:5: -1- AC_SUBST([INSTALL_STRIP_PROGRAM])
m4trace:configure.in:5: -1- AC_SUBST_TRACE([INSTALL_STRIP_PROGRAM])
m4trace:configure.in:5: -1- m4_pattern_allow([^INSTALL_STRIP_PROGRAM$])
m4trace:configure.in:5: -1- AC_REQUIRE_AUX_FILE([install-sh])
m4trace:configure.in:5: -1- AC_SUBST([MKDIR_P])
m4trace:configure.in:5: -1- AC_SUBST_TRACE([MKDIR_P])
m4trace:configure.in:5: -1- m4_pattern_allow([^MKDIR_P$])
m4trace:configure.in:5: -1- AC_SUBST([mkdir_p], ["$MKDIR_P"])
m4trace:configure.in:5: -1- AC_SUBST_TRACE([mkdir_p])
m4trace:configure.in:5: -1- m4_pattern_allow([^mkdir_p$])
m4trace:configure.in:5: -1- AC_SUBST([AWK])
m4trace:configure.in:5: -1- AC_SUBST_TRACE([AWK])
m4trace:configure.in:5: -1- m4_pattern_allow([^AWK$])
m4trace:configure.in:5: -1- AC_SUBST([SET_MAKE])
m4trace:configure.in:5: -1- AC_SUBST_TRACE([SET_MAKE])
m4trace:configure.in:5: -1- m4_pattern_allow([^SET_MAKE$])
m4trace:configure.in:5: -1- AC_SUBST([am__leading_dot])
m4trace:configure.in:5: -1- AC_SUBST_TRACE([am__leading_dot])
m4trace:configure.in:5: -1- m4_pattern_allow([^am__leading_dot$])
m4trace:configure.in:5: -1- AC_SUBST([AMTAR])
m4trace:configure.in:5: -1- AC_SUBST_TRACE([AMTAR])
m4trace:configure.in:5: -1- m4_pattern_allow([^AMTAR$])
m4trace:configure.in:5: -1- AC_SUBST([am__tar])
m4trace:configure.in:5: -1- AC_SUBST_TRACE([am__tar])
m4trace:configure.in:5: -1- m4_pattern_allow([^am__tar$])
m4trace:configure.in:5: -1- AC_SUBST([am__untar])
m4trace:configure.in:5: -1- AC_SUBST_TRACE([am__untar])
m4trace:configure.in:5: -1- m4_pattern_allow([^am__untar$])
m4trace:configure.in:7: -1- AC_SUBST([CC])
m4trace:configure.in:7: -1- AC_SUBST_TRACE([CC])
m4trace:configure.in:7: -1- m4_pattern_allow([^CC$])
m4trace:configure.in:7: -1- AC_SUBST([CFLAGS])
m4trace:configure.in:7: -1- AC_SUBST_TRACE([CFLAGS])
m4trace:configure.in:7: -1- m4_pattern_allow([^CFLAGS$])
m4trace:configure.in:7: -1- AC_SUBST([LDFLAGS])
m4trace:configure.in:7: -1- AC_SUBST_TRACE([LDFLAGS])
m4trace:configure.in:7: -1- m4_pattern_allow([^LDFLAGS$])
m4trace:configure.in:7: -1- AC_SUBST([LIBS])
m4trace:configure.in:7: -1- AC_SUBST_TRACE([LIBS])
m4trace:configure.in:7: -1- m4_pattern_allow([^LIBS$])
m4trace:configure.in:7: -1- AC_SUBST([CPPFLAGS])
m4trace:configure.in:7: -1- AC_SUBST_TRACE([CPPFLAGS])
m4trace:configure.in:7: -1- m4_pattern_allow([^CPPFLAGS$])
m4trace:configure.in:7: -1- AC_SUBST([CC])
m4trace:configure.in:7: -1- AC_SUBST_TRACE([CC])
m4trace:configure.in:7: -1- m4_pattern_allow([^CC$])
m4trace:configure.in:7: -1- AC_SUBST([CC])
m4trace:configure.in:7: -1- AC_SUBST_TRACE([CC])
m4trace:configure.in:7: -1- m4_pattern_allow([^CC$])
m4trace:configure.in:7: -1- AC_SUBST([CC])
m4trace:configure.in:7: -1- AC_SUBST_TRACE([CC])
m4trace:configure.in:7: -1- m4_pattern_allow([^CC$])
m4trace:configure.in:7: -1- AC_SUBST([CC])
m4trace:configure.in:7: -1- AC_SUBST_TRACE([CC])
m4trace:configure.in:7: -1- m4_pattern_allow([^CC$])
m4trace:configure.in:7: -1- AC_SUBST([ac_ct_CC])
m4trace:configure.in:7: -1- AC_SUBST_TRACE([ac_ct_CC])
m4trace:configure.in:7: -1- m4_pattern_allow([^ac_ct_CC$])
m4trace:configure.in:7: -1- AC_SUBST([EXEEXT], [$ac_cv_exeext])
m4trace:configure.in:7: -1- AC_SUBST_TRACE([EXEEXT])
m4trace:configure.in:7: -1- m4_pattern_allow([^EXEEXT$])
m4trace:configure.in:7: -1- AC_SUBST([OBJEXT], [$ac_cv_objext])
m4trace:configure.in:7: -1- AC_SUBST_TRACE([OBJEXT])
m4trace:configure.in:7: -1- m4_pattern_allow([^OBJEXT$])
m4trace:configure.in:7: -1- AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])
m4trace:configure.in:7: -1- AC_SUBST_TRACE([DEPDIR])
m4trace:configure.in:7: -1- m4_pattern_allow([^DEPDIR$])
m4trace:configure.in:7: -1- AC_SUBST([am__include])
m4trace:configure.in:7: -1- AC_SUBST_TRACE([am__include])
m4trace:configure.in:7: -1- m4_pattern_allow([^am__include$])
m4trace:configure.in:7: -1- AC_SUBST([am__quote])
m4trace:configure.in:7: -1- AC_SUBST_TRACE([am__quote])
m4trace:configure.in:7: -1- m4_pattern_allow([^am__quote$])
m4trace:configure.in:7: -1- AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
m4trace:configure.in:7: -1- AC_SUBST([AMDEP_TRUE])
m4trace:configure.in:7: -1- AC_SUBST_TRACE([AMDEP_TRUE])
m4trace:configure.in:7: -1- m4_pattern_allow([^AMDEP_TRUE$])
m4trace:configure.in:7: -1- AC_SUBST([AMDEP_FALSE])
m4trace:configure.in:7: -1- AC_SUBST_TRACE([AMDEP_FALSE])
m4trace:configure.in:7: -1- m4_pattern_allow([^AMDEP_FALSE$])
m4trace:configure.in:7: -1- _AM_SUBST_NOTMAKE([AMDEP_TRUE])
m4trace:configure.in:7: -1- _AM_SUBST_NOTMAKE([AMDEP_FALSE])
m4trace:configure.in:7: -1- AC_SUBST([AMDEPBACKSLASH])
m4trace:configure.in:7: -1- AC_SUBST_TRACE([AMDEPBACKSLASH])
m4trace:configure.in:7: -1- m4_pattern_allow([^AMDEPBACKSLASH$])
m4trace:configure.in:7: -1- _AM_SUBST_NOTMAKE([AMDEPBACKSLASH])
m4trace:configure.in:7: -1- AC_SUBST([CCDEPMODE], [depmode=$am_cv_CC_dependencies_compiler_type])
m4trace:configure.in:7: -1- AC_SUBST_TRACE([CCDEPMODE])
m4trace:configure.in:7: -1- m4_pattern_allow([^CCDEPMODE$])
m4trace:configure.in:7: -1- AM_CONDITIONAL([am__fastdepCC], [
test "x$enable_dependency_tracking" != xno \
&& test "$am_cv_CC_dependencies_compiler_type" = gcc3])
m4trace:configure.in:7: -1- AC_SUBST([am__fastdepCC_TRUE])
m4trace:configure.in:7: -1- AC_SUBST_TRACE([am__fastdepCC_TRUE])
m4trace:configure.in:7: -1- m4_pattern_allow([^am__fastdepCC_TRUE$])
m4trace:configure.in:7: -1- AC_SUBST([am__fastdepCC_FALSE])
m4trace:configure.in:7: -1- AC_SUBST_TRACE([am__fastdepCC_FALSE])
m4trace:configure.in:7: -1- m4_pattern_allow([^am__fastdepCC_FALSE$])
m4trace:configure.in:7: -1- _AM_SUBST_NOTMAKE([am__fastdepCC_TRUE])
m4trace:configure.in:7: -1- _AM_SUBST_NOTMAKE([am__fastdepCC_FALSE])
m4trace:configure.in:8: -1- AM_PROG_CC_C_O
m4trace:configure.in:8: -1- AC_DEFINE_TRACE_LITERAL([NO_MINUS_C_MINUS_O])
m4trace:configure.in:8: -1- m4_pattern_allow([^NO_MINUS_C_MINUS_O$])
m4trace:configure.in:8: -1- AH_OUTPUT([NO_MINUS_C_MINUS_O], [/* Define to 1 if your C compiler doesn\'t accept -c and -o together. */
@%:@undef NO_MINUS_C_MINUS_O])
m4trace:configure.in:8: -1- AC_REQUIRE_AUX_FILE([compile])
m4trace:configure.in:9: -1- AC_DEFINE_TRACE_LITERAL([const])
m4trace:configure.in:9: -1- m4_pattern_allow([^const$])
m4trace:configure.in:9: -1- AH_OUTPUT([const], [/* Define to empty if `const\' does not conform to ANSI C. */
@%:@undef const])
m4trace:configure.in:11: -1- _m4_warn([obsolete], [The macro `AC_LIBTOOL_WIN32_DLL' is obsolete.
You should run autoupdate.], [aclocal.m4:7980: AC_LIBTOOL_WIN32_DLL is expanded from...
configure.in:11: the top level])
m4trace:configure.in:11: -1- AC_SUBST([AS])
m4trace:configure.in:11: -1- AC_SUBST_TRACE([AS])
m4trace:configure.in:11: -1- m4_pattern_allow([^AS$])
m4trace:configure.in:11: -1- AC_SUBST([DLLTOOL])
m4trace:configure.in:11: -1- AC_SUBST_TRACE([DLLTOOL])
m4trace:configure.in:11: -1- m4_pattern_allow([^DLLTOOL$])
m4trace:configure.in:11: -1- AC_SUBST([OBJDUMP])
m4trace:configure.in:11: -1- AC_SUBST_TRACE([OBJDUMP])
m4trace:configure.in:11: -1- m4_pattern_allow([^OBJDUMP$])
m4trace:configure.in:11: -1- _m4_warn([obsolete], [AC_LIBTOOL_WIN32_DLL: Remove this warning and the call to _LT_SET_OPTION when you
put the `win32-dll' option into LT_INIT's first parameter.], [aclocal.m4:7980: AC_LIBTOOL_WIN32_DLL is expanded from...
configure.in:11: the top level])
m4trace:configure.in:12: -1- _m4_warn([obsolete], [The macro `AM_PROG_LIBTOOL' is obsolete.
You should run autoupdate.], [aclocal.m4:129: AM_PROG_LIBTOOL is expanded from...
configure.in:12: the top level])
m4trace:configure.in:12: -1- LT_INIT
m4trace:configure.in:12: -1- m4_pattern_forbid([^_?LT_[A-Z_]+$])
m4trace:configure.in:12: -1- m4_pattern_allow([^(_LT_EOF|LT_DLGLOBAL|LT_DLLAZY_OR_NOW|LT_MULTI_MODULE)$])
m4trace:configure.in:12: -1- AC_REQUIRE_AUX_FILE([ltmain.sh])
m4trace:configure.in:12: -1- AC_SUBST([LIBTOOL])
m4trace:configure.in:12: -1- AC_SUBST_TRACE([LIBTOOL])
m4trace:configure.in:12: -1- m4_pattern_allow([^LIBTOOL$])
m4trace:configure.in:12: -1- AC_SUBST([SED])
m4trace:configure.in:12: -1- AC_SUBST_TRACE([SED])
m4trace:configure.in:12: -1- m4_pattern_allow([^SED$])
m4trace:configure.in:12: -1- AC_SUBST([GREP])
m4trace:configure.in:12: -1- AC_SUBST_TRACE([GREP])
m4trace:configure.in:12: -1- m4_pattern_allow([^GREP$])
m4trace:configure.in:12: -1- AC_SUBST([EGREP])
m4trace:configure.in:12: -1- AC_SUBST_TRACE([EGREP])
m4trace:configure.in:12: -1- m4_pattern_allow([^EGREP$])
m4trace:configure.in:12: -1- AC_SUBST([FGREP])
m4trace:configure.in:12: -1- AC_SUBST_TRACE([FGREP])
m4trace:configure.in:12: -1- m4_pattern_allow([^FGREP$])
m4trace:configure.in:12: -1- AC_SUBST([GREP])
m4trace:configure.in:12: -1- AC_SUBST_TRACE([GREP])
m4trace:configure.in:12: -1- m4_pattern_allow([^GREP$])
m4trace:configure.in:12: -1- AC_SUBST([LD])
m4trace:configure.in:12: -1- AC_SUBST_TRACE([LD])
m4trace:configure.in:12: -1- m4_pattern_allow([^LD$])
m4trace:configure.in:12: -1- AC_SUBST([DUMPBIN])
m4trace:configure.in:12: -1- AC_SUBST_TRACE([DUMPBIN])
m4trace:configure.in:12: -1- m4_pattern_allow([^DUMPBIN$])
m4trace:configure.in:12: -1- AC_SUBST([ac_ct_DUMPBIN])
m4trace:configure.in:12: -1- AC_SUBST_TRACE([ac_ct_DUMPBIN])
m4trace:configure.in:12: -1- m4_pattern_allow([^ac_ct_DUMPBIN$])
m4trace:configure.in:12: -1- AC_SUBST([DUMPBIN])
m4trace:configure.in:12: -1- AC_SUBST_TRACE([DUMPBIN])
m4trace:configure.in:12: -1- m4_pattern_allow([^DUMPBIN$])
m4trace:configure.in:12: -1- AC_SUBST([NM])
m4trace:configure.in:12: -1- AC_SUBST_TRACE([NM])
m4trace:configure.in:12: -1- m4_pattern_allow([^NM$])
m4trace:configure.in:12: -1- AC_SUBST([LN_S], [$as_ln_s])
m4trace:configure.in:12: -1- AC_SUBST_TRACE([LN_S])
m4trace:configure.in:12: -1- m4_pattern_allow([^LN_S$])
m4trace:configure.in:12: -1- AC_SUBST([OBJDUMP])
m4trace:configure.in:12: -1- AC_SUBST_TRACE([OBJDUMP])
m4trace:configure.in:12: -1- m4_pattern_allow([^OBJDUMP$])
m4trace:configure.in:12: -1- AC_SUBST([OBJDUMP])
m4trace:configure.in:12: -1- AC_SUBST_TRACE([OBJDUMP])
m4trace:configure.in:12: -1- m4_pattern_allow([^OBJDUMP$])
m4trace:configure.in:12: -1- AC_SUBST([DLLTOOL])
m4trace:configure.in:12: -1- AC_SUBST_TRACE([DLLTOOL])
m4trace:configure.in:12: -1- m4_pattern_allow([^DLLTOOL$])
m4trace:configure.in:12: -1- AC_SUBST([DLLTOOL])
m4trace:configure.in:12: -1- AC_SUBST_TRACE([DLLTOOL])
m4trace:configure.in:12: -1- m4_pattern_allow([^DLLTOOL$])
m4trace:configure.in:12: -1- AC_SUBST([AR])
m4trace:configure.in:12: -1- AC_SUBST_TRACE([AR])
m4trace:configure.in:12: -1- m4_pattern_allow([^AR$])
m4trace:configure.in:12: -1- AC_SUBST([ac_ct_AR])
m4trace:configure.in:12: -1- AC_SUBST_TRACE([ac_ct_AR])
m4trace:configure.in:12: -1- m4_pattern_allow([^ac_ct_AR$])
m4trace:configure.in:12: -1- AC_SUBST([STRIP])
m4trace:configure.in:12: -1- AC_SUBST_TRACE([STRIP])
m4trace:configure.in:12: -1- m4_pattern_allow([^STRIP$])
m4trace:configure.in:12: -1- AC_SUBST([RANLIB])
m4trace:configure.in:12: -1- AC_SUBST_TRACE([RANLIB])
m4trace:configure.in:12: -1- m4_pattern_allow([^RANLIB$])
m4trace:configure.in:12: -1- m4_pattern_allow([LT_OBJDIR])
m4trace:configure.in:12: -1- AC_DEFINE_TRACE_LITERAL([LT_OBJDIR])
m4trace:configure.in:12: -1- m4_pattern_allow([^LT_OBJDIR$])
m4trace:configure.in:12: -1- AH_OUTPUT([LT_OBJDIR], [/* Define to the sub-directory in which libtool stores uninstalled libraries.
*/
@%:@undef LT_OBJDIR])
m4trace:configure.in:12: -1- LT_SUPPORTED_TAG([CC])
m4trace:configure.in:12: -1- AC_SUBST([MANIFEST_TOOL])
m4trace:configure.in:12: -1- AC_SUBST_TRACE([MANIFEST_TOOL])
m4trace:configure.in:12: -1- m4_pattern_allow([^MANIFEST_TOOL$])
m4trace:configure.in:12: -1- AC_SUBST([DSYMUTIL])
m4trace:configure.in:12: -1- AC_SUBST_TRACE([DSYMUTIL])
m4trace:configure.in:12: -1- m4_pattern_allow([^DSYMUTIL$])
m4trace:configure.in:12: -1- AC_SUBST([NMEDIT])
m4trace:configure.in:12: -1- AC_SUBST_TRACE([NMEDIT])
m4trace:configure.in:12: -1- m4_pattern_allow([^NMEDIT$])
m4trace:configure.in:12: -1- AC_SUBST([LIPO])
m4trace:configure.in:12: -1- AC_SUBST_TRACE([LIPO])
m4trace:configure.in:12: -1- m4_pattern_allow([^LIPO$])
m4trace:configure.in:12: -1- AC_SUBST([OTOOL])
m4trace:configure.in:12: -1- AC_SUBST_TRACE([OTOOL])
m4trace:configure.in:12: -1- m4_pattern_allow([^OTOOL$])
m4trace:configure.in:12: -1- AC_SUBST([OTOOL64])
m4trace:configure.in:12: -1- AC_SUBST_TRACE([OTOOL64])
m4trace:configure.in:12: -1- m4_pattern_allow([^OTOOL64$])
m4trace:configure.in:12: -1- AH_OUTPUT([HAVE_DLFCN_H], [/* Define to 1 if you have the <dlfcn.h> header file. */
@%:@undef HAVE_DLFCN_H])
m4trace:configure.in:12: -1- AC_SUBST([CPP])
m4trace:configure.in:12: -1- AC_SUBST_TRACE([CPP])
m4trace:configure.in:12: -1- m4_pattern_allow([^CPP$])
m4trace:configure.in:12: -1- AC_SUBST([CPPFLAGS])
m4trace:configure.in:12: -1- AC_SUBST_TRACE([CPPFLAGS])
m4trace:configure.in:12: -1- m4_pattern_allow([^CPPFLAGS$])
m4trace:configure.in:12: -1- AC_SUBST([CPP])
m4trace:configure.in:12: -1- AC_SUBST_TRACE([CPP])
m4trace:configure.in:12: -1- m4_pattern_allow([^CPP$])
m4trace:configure.in:12: -1- AC_DEFINE_TRACE_LITERAL([STDC_HEADERS])
m4trace:configure.in:12: -1- m4_pattern_allow([^STDC_HEADERS$])
m4trace:configure.in:12: -1- AH_OUTPUT([STDC_HEADERS], [/* Define to 1 if you have the ANSI C header files. */
@%:@undef STDC_HEADERS])
m4trace:configure.in:12: -1- AH_OUTPUT([HAVE_SYS_TYPES_H], [/* Define to 1 if you have the <sys/types.h> header file. */
@%:@undef HAVE_SYS_TYPES_H])
m4trace:configure.in:12: -1- AH_OUTPUT([HAVE_SYS_STAT_H], [/* Define to 1 if you have the <sys/stat.h> header file. */
@%:@undef HAVE_SYS_STAT_H])
m4trace:configure.in:12: -1- AH_OUTPUT([HAVE_STDLIB_H], [/* Define to 1 if you have the <stdlib.h> header file. */
@%:@undef HAVE_STDLIB_H])
m4trace:configure.in:12: -1- AH_OUTPUT([HAVE_STRING_H], [/* Define to 1 if you have the <string.h> header file. */
@%:@undef HAVE_STRING_H])
m4trace:configure.in:12: -1- AH_OUTPUT([HAVE_MEMORY_H], [/* Define to 1 if you have the <memory.h> header file. */
@%:@undef HAVE_MEMORY_H])
m4trace:configure.in:12: -1- AH_OUTPUT([HAVE_STRINGS_H], [/* Define to 1 if you have the <strings.h> header file. */
@%:@undef HAVE_STRINGS_H])
m4trace:configure.in:12: -1- AH_OUTPUT([HAVE_INTTYPES_H], [/* Define to 1 if you have the <inttypes.h> header file. */
@%:@undef HAVE_INTTYPES_H])
m4trace:configure.in:12: -1- AH_OUTPUT([HAVE_STDINT_H], [/* Define to 1 if you have the <stdint.h> header file. */
@%:@undef HAVE_STDINT_H])
m4trace:configure.in:12: -1- AH_OUTPUT([HAVE_UNISTD_H], [/* Define to 1 if you have the <unistd.h> header file. */
@%:@undef HAVE_UNISTD_H])
m4trace:configure.in:12: -1- AC_DEFINE_TRACE_LITERAL([HAVE_DLFCN_H])
m4trace:configure.in:12: -1- m4_pattern_allow([^HAVE_DLFCN_H$])
m4trace:configure.in:13: -1- AC_SUBST([LIBTOOL_DEPS])
m4trace:configure.in:13: -1- AC_SUBST_TRACE([LIBTOOL_DEPS])
m4trace:configure.in:13: -1- m4_pattern_allow([^LIBTOOL_DEPS$])
m4trace:configure.in:22: -1- AC_SUBST([BUILDENV])
m4trace:configure.in:22: -1- AC_SUBST_TRACE([BUILDENV])
m4trace:configure.in:22: -1- m4_pattern_allow([^BUILDENV$])
m4trace:configure.in:23: -1- AM_CONDITIONAL([ENABLE_WIN32], [test "$BUILDENV" == "WIN32"])
m4trace:configure.in:23: -1- AC_SUBST([ENABLE_WIN32_TRUE])
m4trace:configure.in:23: -1- AC_SUBST_TRACE([ENABLE_WIN32_TRUE])
m4trace:configure.in:23: -1- m4_pattern_allow([^ENABLE_WIN32_TRUE$])
m4trace:configure.in:23: -1- AC_SUBST([ENABLE_WIN32_FALSE])
m4trace:configure.in:23: -1- AC_SUBST_TRACE([ENABLE_WIN32_FALSE])
m4trace:configure.in:23: -1- m4_pattern_allow([^ENABLE_WIN32_FALSE$])
m4trace:configure.in:23: -1- _AM_SUBST_NOTMAKE([ENABLE_WIN32_TRUE])
m4trace:configure.in:23: -1- _AM_SUBST_NOTMAKE([ENABLE_WIN32_FALSE])
m4trace:configure.in:24: -1- AM_CONDITIONAL([DISABLE_WIN32], [test "$BUILDENV" != "WIN32"])
m4trace:configure.in:24: -1- AC_SUBST([DISABLE_WIN32_TRUE])
m4trace:configure.in:24: -1- AC_SUBST_TRACE([DISABLE_WIN32_TRUE])
m4trace:configure.in:24: -1- m4_pattern_allow([^DISABLE_WIN32_TRUE$])
m4trace:configure.in:24: -1- AC_SUBST([DISABLE_WIN32_FALSE])
m4trace:configure.in:24: -1- AC_SUBST_TRACE([DISABLE_WIN32_FALSE])
m4trace:configure.in:24: -1- m4_pattern_allow([^DISABLE_WIN32_FALSE$])
m4trace:configure.in:24: -1- _AM_SUBST_NOTMAKE([DISABLE_WIN32_TRUE])
m4trace:configure.in:24: -1- _AM_SUBST_NOTMAKE([DISABLE_WIN32_FALSE])
m4trace:configure.in:30: -1- AM_CONDITIONAL([ENABLE_CCID], [test "$MY_CCID" == "1"])
m4trace:configure.in:30: -1- AC_SUBST([ENABLE_CCID_TRUE])
m4trace:configure.in:30: -1- AC_SUBST_TRACE([ENABLE_CCID_TRUE])
m4trace:configure.in:30: -1- m4_pattern_allow([^ENABLE_CCID_TRUE$])
m4trace:configure.in:30: -1- AC_SUBST([ENABLE_CCID_FALSE])
m4trace:configure.in:30: -1- AC_SUBST_TRACE([ENABLE_CCID_FALSE])
m4trace:configure.in:30: -1- m4_pattern_allow([^ENABLE_CCID_FALSE$])
m4trace:configure.in:30: -1- _AM_SUBST_NOTMAKE([ENABLE_CCID_TRUE])
m4trace:configure.in:30: -1- _AM_SUBST_NOTMAKE([ENABLE_CCID_FALSE])
m4trace:configure.in:34: -2- _m4_warn([obsolete], [The macro `AC_HELP_STRING' is obsolete.
You should run autoupdate.], [/mingw/src/autoconf/26/autoconf-2.67/lib/autoconf/general.m4:209: AC_HELP_STRING is expanded from...
configure.in:34: the top level])
m4trace:configure.in:46: -1- AC_SUBST([OPENCT_CFLAGS])
m4trace:configure.in:46: -1- AC_SUBST_TRACE([OPENCT_CFLAGS])
m4trace:configure.in:46: -1- m4_pattern_allow([^OPENCT_CFLAGS$])
m4trace:configure.in:47: -1- AC_SUBST([OPENCT_LIBS])
m4trace:configure.in:47: -1- AC_SUBST_TRACE([OPENCT_LIBS])
m4trace:configure.in:47: -1- m4_pattern_allow([^OPENCT_LIBS$])
m4trace:configure.in:49: -1- AM_CONDITIONAL([HAVE_OPENCT], [test "x$OPENCT_MSG" = "xyes"])
m4trace:configure.in:49: -1- AC_SUBST([HAVE_OPENCT_TRUE])
m4trace:configure.in:49: -1- AC_SUBST_TRACE([HAVE_OPENCT_TRUE])
m4trace:configure.in:49: -1- m4_pattern_allow([^HAVE_OPENCT_TRUE$])
m4trace:configure.in:49: -1- AC_SUBST([HAVE_OPENCT_FALSE])
m4trace:configure.in:49: -1- AC_SUBST_TRACE([HAVE_OPENCT_FALSE])
m4trace:configure.in:49: -1- m4_pattern_allow([^HAVE_OPENCT_FALSE$])
m4trace:configure.in:49: -1- _AM_SUBST_NOTMAKE([HAVE_OPENCT_TRUE])
m4trace:configure.in:49: -1- _AM_SUBST_NOTMAKE([HAVE_OPENCT_FALSE])
m4trace:configure.in:54: -1- AC_SUBST([FIRMWARE_PATH])
m4trace:configure.in:54: -1- AC_SUBST_TRACE([FIRMWARE_PATH])
m4trace:configure.in:54: -1- m4_pattern_allow([^FIRMWARE_PATH$])
m4trace:configure.in:55: -1- AM_CONDITIONAL([ENABLE_FIRMWARE], [test "$FIRMWARE_PATH" != ""])
m4trace:configure.in:55: -1- AC_SUBST([ENABLE_FIRMWARE_TRUE])
m4trace:configure.in:55: -1- AC_SUBST_TRACE([ENABLE_FIRMWARE_TRUE])
m4trace:configure.in:55: -1- m4_pattern_allow([^ENABLE_FIRMWARE_TRUE$])
m4trace:configure.in:55: -1- AC_SUBST([ENABLE_FIRMWARE_FALSE])
m4trace:configure.in:55: -1- AC_SUBST_TRACE([ENABLE_FIRMWARE_FALSE])
m4trace:configure.in:55: -1- m4_pattern_allow([^ENABLE_FIRMWARE_FALSE$])
m4trace:configure.in:55: -1- _AM_SUBST_NOTMAKE([ENABLE_FIRMWARE_TRUE])
m4trace:configure.in:55: -1- _AM_SUBST_NOTMAKE([ENABLE_FIRMWARE_FALSE])
m4trace:configure.in:60: -1- AM_CONDITIONAL([ENABLE_STATIC], [test "$ENABLE_STATIC" == "1"])
m4trace:configure.in:60: -1- AC_SUBST([ENABLE_STATIC_TRUE])
m4trace:configure.in:60: -1- AC_SUBST_TRACE([ENABLE_STATIC_TRUE])
m4trace:configure.in:60: -1- m4_pattern_allow([^ENABLE_STATIC_TRUE$])
m4trace:configure.in:60: -1- AC_SUBST([ENABLE_STATIC_FALSE])
m4trace:configure.in:60: -1- AC_SUBST_TRACE([ENABLE_STATIC_FALSE])
m4trace:configure.in:60: -1- m4_pattern_allow([^ENABLE_STATIC_FALSE$])
m4trace:configure.in:60: -1- _AM_SUBST_NOTMAKE([ENABLE_STATIC_TRUE])
m4trace:configure.in:60: -1- _AM_SUBST_NOTMAKE([ENABLE_STATIC_FALSE])
m4trace:configure.in:64: -1- AH_OUTPUT([HAVE_LIBUSB], [/* Define to 1 if you have the `usb\' library (-lusb). */
@%:@undef HAVE_LIBUSB])
m4trace:configure.in:64: -1- AC_DEFINE_TRACE_LITERAL([HAVE_LIBUSB])
m4trace:configure.in:64: -1- m4_pattern_allow([^HAVE_LIBUSB$])
m4trace:configure.in:65: -1- AM_CONDITIONAL([HAVE_LIBUSB], [test "x$have_libusb" = "xyes"])
m4trace:configure.in:65: -1- AC_SUBST([HAVE_LIBUSB_TRUE])
m4trace:configure.in:65: -1- AC_SUBST_TRACE([HAVE_LIBUSB_TRUE])
m4trace:configure.in:65: -1- m4_pattern_allow([^HAVE_LIBUSB_TRUE$])
m4trace:configure.in:65: -1- AC_SUBST([HAVE_LIBUSB_FALSE])
m4trace:configure.in:65: -1- AC_SUBST_TRACE([HAVE_LIBUSB_FALSE])
m4trace:configure.in:65: -1- m4_pattern_allow([^HAVE_LIBUSB_FALSE$])
m4trace:configure.in:65: -1- _AM_SUBST_NOTMAKE([HAVE_LIBUSB_TRUE])
m4trace:configure.in:65: -1- _AM_SUBST_NOTMAKE([HAVE_LIBUSB_FALSE])
m4trace:configure.in:68: -1- AC_CONFIG_FILES([Makefile etc/Makefile etc/udev/Makefile src/Makefile include/Makefile include/librfid/Makefile utils/Makefile src/librfid.pc win32/Makefile])
m4trace:configure.in:68: -1- _m4_warn([obsolete], [AC_OUTPUT should be used without arguments.
You should run autoupdate.], [])
m4trace:configure.in:68: -1- AC_SUBST([LIB@&t@OBJS], [$ac_libobjs])
m4trace:configure.in:68: -1- AC_SUBST_TRACE([LIB@&t@OBJS])
m4trace:configure.in:68: -1- m4_pattern_allow([^LIB@&t@OBJS$])
m4trace:configure.in:68: -1- AC_SUBST([LTLIBOBJS], [$ac_ltlibobjs])
m4trace:configure.in:68: -1- AC_SUBST_TRACE([LTLIBOBJS])
m4trace:configure.in:68: -1- m4_pattern_allow([^LTLIBOBJS$])
m4trace:configure.in:68: -1- AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])
m4trace:configure.in:68: -1- AC_SUBST([am__EXEEXT_TRUE])
m4trace:configure.in:68: -1- AC_SUBST_TRACE([am__EXEEXT_TRUE])
m4trace:configure.in:68: -1- m4_pattern_allow([^am__EXEEXT_TRUE$])
m4trace:configure.in:68: -1- AC_SUBST([am__EXEEXT_FALSE])
m4trace:configure.in:68: -1- AC_SUBST_TRACE([am__EXEEXT_FALSE])
m4trace:configure.in:68: -1- m4_pattern_allow([^am__EXEEXT_FALSE$])
m4trace:configure.in:68: -1- _AM_SUBST_NOTMAKE([am__EXEEXT_TRUE])
m4trace:configure.in:68: -1- _AM_SUBST_NOTMAKE([am__EXEEXT_FALSE])
m4trace:configure.in:68: -1- AC_SUBST_TRACE([top_builddir])
m4trace:configure.in:68: -1- AC_SUBST_TRACE([top_build_prefix])
m4trace:configure.in:68: -1- AC_SUBST_TRACE([srcdir])
m4trace:configure.in:68: -1- AC_SUBST_TRACE([abs_srcdir])
m4trace:configure.in:68: -1- AC_SUBST_TRACE([top_srcdir])
m4trace:configure.in:68: -1- AC_SUBST_TRACE([abs_top_srcdir])
m4trace:configure.in:68: -1- AC_SUBST_TRACE([builddir])
m4trace:configure.in:68: -1- AC_SUBST_TRACE([abs_builddir])
m4trace:configure.in:68: -1- AC_SUBST_TRACE([abs_top_builddir])
m4trace:configure.in:68: -1- AC_SUBST_TRACE([INSTALL])
m4trace:configure.in:68: -1- AC_SUBST_TRACE([MKDIR_P])
m4trace:configure.in:68: -1- AC_REQUIRE_AUX_FILE([ltmain.sh])
File diff suppressed because it is too large Load Diff
+604
View File
@@ -0,0 +1,604 @@
m4trace:configure.in:3: -1- AC_INIT
m4trace:configure.in:3: -1- m4_pattern_forbid([^_?A[CHUM]_])
m4trace:configure.in:3: -1- m4_pattern_forbid([_AC_])
m4trace:configure.in:3: -1- m4_pattern_forbid([^LIBOBJS$], [do not use LIBOBJS directly, use AC_LIBOBJ (see section `AC_LIBOBJ vs LIBOBJS'])
m4trace:configure.in:3: -1- m4_pattern_allow([^AS_FLAGS$])
m4trace:configure.in:3: -1- m4_pattern_forbid([^_?m4_])
m4trace:configure.in:3: -1- m4_pattern_forbid([^dnl$])
m4trace:configure.in:3: -1- m4_pattern_forbid([^_?AS_])
m4trace:configure.in:3: -1- AC_SUBST([SHELL], [${CONFIG_SHELL-/bin/sh}])
m4trace:configure.in:3: -1- AC_SUBST_TRACE([SHELL])
m4trace:configure.in:3: -1- m4_pattern_allow([^SHELL$])
m4trace:configure.in:3: -1- AC_SUBST([PATH_SEPARATOR])
m4trace:configure.in:3: -1- AC_SUBST_TRACE([PATH_SEPARATOR])
m4trace:configure.in:3: -1- m4_pattern_allow([^PATH_SEPARATOR$])
m4trace:configure.in:3: -1- AC_SUBST([PACKAGE_NAME], [m4_ifdef([AC_PACKAGE_NAME], ['AC_PACKAGE_NAME'])])
m4trace:configure.in:3: -1- AC_SUBST_TRACE([PACKAGE_NAME])
m4trace:configure.in:3: -1- m4_pattern_allow([^PACKAGE_NAME$])
m4trace:configure.in:3: -1- AC_SUBST([PACKAGE_TARNAME], [m4_ifdef([AC_PACKAGE_TARNAME], ['AC_PACKAGE_TARNAME'])])
m4trace:configure.in:3: -1- AC_SUBST_TRACE([PACKAGE_TARNAME])
m4trace:configure.in:3: -1- m4_pattern_allow([^PACKAGE_TARNAME$])
m4trace:configure.in:3: -1- AC_SUBST([PACKAGE_VERSION], [m4_ifdef([AC_PACKAGE_VERSION], ['AC_PACKAGE_VERSION'])])
m4trace:configure.in:3: -1- AC_SUBST_TRACE([PACKAGE_VERSION])
m4trace:configure.in:3: -1- m4_pattern_allow([^PACKAGE_VERSION$])
m4trace:configure.in:3: -1- AC_SUBST([PACKAGE_STRING], [m4_ifdef([AC_PACKAGE_STRING], ['AC_PACKAGE_STRING'])])
m4trace:configure.in:3: -1- AC_SUBST_TRACE([PACKAGE_STRING])
m4trace:configure.in:3: -1- m4_pattern_allow([^PACKAGE_STRING$])
m4trace:configure.in:3: -1- AC_SUBST([PACKAGE_BUGREPORT], [m4_ifdef([AC_PACKAGE_BUGREPORT], ['AC_PACKAGE_BUGREPORT'])])
m4trace:configure.in:3: -1- AC_SUBST_TRACE([PACKAGE_BUGREPORT])
m4trace:configure.in:3: -1- m4_pattern_allow([^PACKAGE_BUGREPORT$])
m4trace:configure.in:3: -1- AC_SUBST([exec_prefix], [NONE])
m4trace:configure.in:3: -1- AC_SUBST_TRACE([exec_prefix])
m4trace:configure.in:3: -1- m4_pattern_allow([^exec_prefix$])
m4trace:configure.in:3: -1- AC_SUBST([prefix], [NONE])
m4trace:configure.in:3: -1- AC_SUBST_TRACE([prefix])
m4trace:configure.in:3: -1- m4_pattern_allow([^prefix$])
m4trace:configure.in:3: -1- AC_SUBST([program_transform_name], [s,x,x,])
m4trace:configure.in:3: -1- AC_SUBST_TRACE([program_transform_name])
m4trace:configure.in:3: -1- m4_pattern_allow([^program_transform_name$])
m4trace:configure.in:3: -1- AC_SUBST([bindir], ['${exec_prefix}/bin'])
m4trace:configure.in:3: -1- AC_SUBST_TRACE([bindir])
m4trace:configure.in:3: -1- m4_pattern_allow([^bindir$])
m4trace:configure.in:3: -1- AC_SUBST([sbindir], ['${exec_prefix}/sbin'])
m4trace:configure.in:3: -1- AC_SUBST_TRACE([sbindir])
m4trace:configure.in:3: -1- m4_pattern_allow([^sbindir$])
m4trace:configure.in:3: -1- AC_SUBST([libexecdir], ['${exec_prefix}/libexec'])
m4trace:configure.in:3: -1- AC_SUBST_TRACE([libexecdir])
m4trace:configure.in:3: -1- m4_pattern_allow([^libexecdir$])
m4trace:configure.in:3: -1- AC_SUBST([datarootdir], ['${prefix}/share'])
m4trace:configure.in:3: -1- AC_SUBST_TRACE([datarootdir])
m4trace:configure.in:3: -1- m4_pattern_allow([^datarootdir$])
m4trace:configure.in:3: -1- AC_SUBST([datadir], ['${datarootdir}'])
m4trace:configure.in:3: -1- AC_SUBST_TRACE([datadir])
m4trace:configure.in:3: -1- m4_pattern_allow([^datadir$])
m4trace:configure.in:3: -1- AC_SUBST([sysconfdir], ['${prefix}/etc'])
m4trace:configure.in:3: -1- AC_SUBST_TRACE([sysconfdir])
m4trace:configure.in:3: -1- m4_pattern_allow([^sysconfdir$])
m4trace:configure.in:3: -1- AC_SUBST([sharedstatedir], ['${prefix}/com'])
m4trace:configure.in:3: -1- AC_SUBST_TRACE([sharedstatedir])
m4trace:configure.in:3: -1- m4_pattern_allow([^sharedstatedir$])
m4trace:configure.in:3: -1- AC_SUBST([localstatedir], ['${prefix}/var'])
m4trace:configure.in:3: -1- AC_SUBST_TRACE([localstatedir])
m4trace:configure.in:3: -1- m4_pattern_allow([^localstatedir$])
m4trace:configure.in:3: -1- AC_SUBST([includedir], ['${prefix}/include'])
m4trace:configure.in:3: -1- AC_SUBST_TRACE([includedir])
m4trace:configure.in:3: -1- m4_pattern_allow([^includedir$])
m4trace:configure.in:3: -1- AC_SUBST([oldincludedir], ['/usr/include'])
m4trace:configure.in:3: -1- AC_SUBST_TRACE([oldincludedir])
m4trace:configure.in:3: -1- m4_pattern_allow([^oldincludedir$])
m4trace:configure.in:3: -1- AC_SUBST([docdir], [m4_ifset([AC_PACKAGE_TARNAME],
['${datarootdir}/doc/${PACKAGE_TARNAME}'],
['${datarootdir}/doc/${PACKAGE}'])])
m4trace:configure.in:3: -1- AC_SUBST_TRACE([docdir])
m4trace:configure.in:3: -1- m4_pattern_allow([^docdir$])
m4trace:configure.in:3: -1- AC_SUBST([infodir], ['${datarootdir}/info'])
m4trace:configure.in:3: -1- AC_SUBST_TRACE([infodir])
m4trace:configure.in:3: -1- m4_pattern_allow([^infodir$])
m4trace:configure.in:3: -1- AC_SUBST([htmldir], ['${docdir}'])
m4trace:configure.in:3: -1- AC_SUBST_TRACE([htmldir])
m4trace:configure.in:3: -1- m4_pattern_allow([^htmldir$])
m4trace:configure.in:3: -1- AC_SUBST([dvidir], ['${docdir}'])
m4trace:configure.in:3: -1- AC_SUBST_TRACE([dvidir])
m4trace:configure.in:3: -1- m4_pattern_allow([^dvidir$])
m4trace:configure.in:3: -1- AC_SUBST([pdfdir], ['${docdir}'])
m4trace:configure.in:3: -1- AC_SUBST_TRACE([pdfdir])
m4trace:configure.in:3: -1- m4_pattern_allow([^pdfdir$])
m4trace:configure.in:3: -1- AC_SUBST([psdir], ['${docdir}'])
m4trace:configure.in:3: -1- AC_SUBST_TRACE([psdir])
m4trace:configure.in:3: -1- m4_pattern_allow([^psdir$])
m4trace:configure.in:3: -1- AC_SUBST([libdir], ['${exec_prefix}/lib'])
m4trace:configure.in:3: -1- AC_SUBST_TRACE([libdir])
m4trace:configure.in:3: -1- m4_pattern_allow([^libdir$])
m4trace:configure.in:3: -1- AC_SUBST([localedir], ['${datarootdir}/locale'])
m4trace:configure.in:3: -1- AC_SUBST_TRACE([localedir])
m4trace:configure.in:3: -1- m4_pattern_allow([^localedir$])
m4trace:configure.in:3: -1- AC_SUBST([mandir], ['${datarootdir}/man'])
m4trace:configure.in:3: -1- AC_SUBST_TRACE([mandir])
m4trace:configure.in:3: -1- m4_pattern_allow([^mandir$])
m4trace:configure.in:3: -1- AC_DEFINE_TRACE_LITERAL([PACKAGE_NAME])
m4trace:configure.in:3: -1- m4_pattern_allow([^PACKAGE_NAME$])
m4trace:configure.in:3: -1- AH_OUTPUT([PACKAGE_NAME], [/* Define to the full name of this package. */
#undef PACKAGE_NAME])
m4trace:configure.in:3: -1- AC_DEFINE_TRACE_LITERAL([PACKAGE_TARNAME])
m4trace:configure.in:3: -1- m4_pattern_allow([^PACKAGE_TARNAME$])
m4trace:configure.in:3: -1- AH_OUTPUT([PACKAGE_TARNAME], [/* Define to the one symbol short name of this package. */
#undef PACKAGE_TARNAME])
m4trace:configure.in:3: -1- AC_DEFINE_TRACE_LITERAL([PACKAGE_VERSION])
m4trace:configure.in:3: -1- m4_pattern_allow([^PACKAGE_VERSION$])
m4trace:configure.in:3: -1- AH_OUTPUT([PACKAGE_VERSION], [/* Define to the version of this package. */
#undef PACKAGE_VERSION])
m4trace:configure.in:3: -1- AC_DEFINE_TRACE_LITERAL([PACKAGE_STRING])
m4trace:configure.in:3: -1- m4_pattern_allow([^PACKAGE_STRING$])
m4trace:configure.in:3: -1- AH_OUTPUT([PACKAGE_STRING], [/* Define to the full name and version of this package. */
#undef PACKAGE_STRING])
m4trace:configure.in:3: -1- AC_DEFINE_TRACE_LITERAL([PACKAGE_BUGREPORT])
m4trace:configure.in:3: -1- m4_pattern_allow([^PACKAGE_BUGREPORT$])
m4trace:configure.in:3: -1- AH_OUTPUT([PACKAGE_BUGREPORT], [/* Define to the address where bug reports for this package should be sent. */
#undef PACKAGE_BUGREPORT])
m4trace:configure.in:3: -1- AC_SUBST([DEFS])
m4trace:configure.in:3: -1- AC_SUBST_TRACE([DEFS])
m4trace:configure.in:3: -1- m4_pattern_allow([^DEFS$])
m4trace:configure.in:3: -1- AC_SUBST([ECHO_C])
m4trace:configure.in:3: -1- AC_SUBST_TRACE([ECHO_C])
m4trace:configure.in:3: -1- m4_pattern_allow([^ECHO_C$])
m4trace:configure.in:3: -1- AC_SUBST([ECHO_N])
m4trace:configure.in:3: -1- AC_SUBST_TRACE([ECHO_N])
m4trace:configure.in:3: -1- m4_pattern_allow([^ECHO_N$])
m4trace:configure.in:3: -1- AC_SUBST([ECHO_T])
m4trace:configure.in:3: -1- AC_SUBST_TRACE([ECHO_T])
m4trace:configure.in:3: -1- m4_pattern_allow([^ECHO_T$])
m4trace:configure.in:3: -1- AC_SUBST([LIBS])
m4trace:configure.in:3: -1- AC_SUBST_TRACE([LIBS])
m4trace:configure.in:3: -1- m4_pattern_allow([^LIBS$])
m4trace:configure.in:3: -1- AC_SUBST([build_alias])
m4trace:configure.in:3: -1- AC_SUBST_TRACE([build_alias])
m4trace:configure.in:3: -1- m4_pattern_allow([^build_alias$])
m4trace:configure.in:3: -1- AC_SUBST([host_alias])
m4trace:configure.in:3: -1- AC_SUBST_TRACE([host_alias])
m4trace:configure.in:3: -1- m4_pattern_allow([^host_alias$])
m4trace:configure.in:3: -1- AC_SUBST([target_alias])
m4trace:configure.in:3: -1- AC_SUBST_TRACE([target_alias])
m4trace:configure.in:3: -1- m4_pattern_allow([^target_alias$])
m4trace:configure.in:4: -1- AC_CANONICAL_SYSTEM
m4trace:configure.in:4: -1- _m4_warn([obsolete], [The macro `AC_CANONICAL_SYSTEM' is obsolete.
You should run autoupdate.], [/usr/src/autoconf/autoconf-2.63/lib/autoconf/general.m4:1819: AC_CANONICAL_SYSTEM is expanded from...
configure.in:4: the top level])
m4trace:configure.in:4: -1- AC_CANONICAL_TARGET
m4trace:configure.in:4: -1- AC_CANONICAL_HOST
m4trace:configure.in:4: -1- AC_CANONICAL_BUILD
m4trace:configure.in:4: -1- AC_REQUIRE_AUX_FILE([config.sub])
m4trace:configure.in:4: -1- AC_REQUIRE_AUX_FILE([config.guess])
m4trace:configure.in:4: -1- AC_SUBST([build], [$ac_cv_build])
m4trace:configure.in:4: -1- AC_SUBST_TRACE([build])
m4trace:configure.in:4: -1- m4_pattern_allow([^build$])
m4trace:configure.in:4: -1- AC_SUBST([build_cpu], [$[1]])
m4trace:configure.in:4: -1- AC_SUBST_TRACE([build_cpu])
m4trace:configure.in:4: -1- m4_pattern_allow([^build_cpu$])
m4trace:configure.in:4: -1- AC_SUBST([build_vendor], [$[2]])
m4trace:configure.in:4: -1- AC_SUBST_TRACE([build_vendor])
m4trace:configure.in:4: -1- m4_pattern_allow([^build_vendor$])
m4trace:configure.in:4: -1- AC_SUBST([build_os])
m4trace:configure.in:4: -1- AC_SUBST_TRACE([build_os])
m4trace:configure.in:4: -1- m4_pattern_allow([^build_os$])
m4trace:configure.in:4: -1- AC_SUBST([host], [$ac_cv_host])
m4trace:configure.in:4: -1- AC_SUBST_TRACE([host])
m4trace:configure.in:4: -1- m4_pattern_allow([^host$])
m4trace:configure.in:4: -1- AC_SUBST([host_cpu], [$[1]])
m4trace:configure.in:4: -1- AC_SUBST_TRACE([host_cpu])
m4trace:configure.in:4: -1- m4_pattern_allow([^host_cpu$])
m4trace:configure.in:4: -1- AC_SUBST([host_vendor], [$[2]])
m4trace:configure.in:4: -1- AC_SUBST_TRACE([host_vendor])
m4trace:configure.in:4: -1- m4_pattern_allow([^host_vendor$])
m4trace:configure.in:4: -1- AC_SUBST([host_os])
m4trace:configure.in:4: -1- AC_SUBST_TRACE([host_os])
m4trace:configure.in:4: -1- m4_pattern_allow([^host_os$])
m4trace:configure.in:4: -1- AC_SUBST([target], [$ac_cv_target])
m4trace:configure.in:4: -1- AC_SUBST_TRACE([target])
m4trace:configure.in:4: -1- m4_pattern_allow([^target$])
m4trace:configure.in:4: -1- AC_SUBST([target_cpu], [$[1]])
m4trace:configure.in:4: -1- AC_SUBST_TRACE([target_cpu])
m4trace:configure.in:4: -1- m4_pattern_allow([^target_cpu$])
m4trace:configure.in:4: -1- AC_SUBST([target_vendor], [$[2]])
m4trace:configure.in:4: -1- AC_SUBST_TRACE([target_vendor])
m4trace:configure.in:4: -1- m4_pattern_allow([^target_vendor$])
m4trace:configure.in:4: -1- AC_SUBST([target_os])
m4trace:configure.in:4: -1- AC_SUBST_TRACE([target_os])
m4trace:configure.in:4: -1- m4_pattern_allow([^target_os$])
m4trace:configure.in:5: -1- AM_INIT_AUTOMAKE([librfid], [0.1.0])
m4trace:configure.in:5: -1- m4_pattern_allow([^AM_[A-Z]+FLAGS$])
m4trace:configure.in:5: -1- AM_AUTOMAKE_VERSION([1.11])
m4trace:configure.in:5: -1- AC_REQUIRE_AUX_FILE([install-sh])
m4trace:configure.in:5: -1- AC_SUBST([INSTALL_PROGRAM])
m4trace:configure.in:5: -1- AC_SUBST_TRACE([INSTALL_PROGRAM])
m4trace:configure.in:5: -1- m4_pattern_allow([^INSTALL_PROGRAM$])
m4trace:configure.in:5: -1- AC_SUBST([INSTALL_SCRIPT])
m4trace:configure.in:5: -1- AC_SUBST_TRACE([INSTALL_SCRIPT])
m4trace:configure.in:5: -1- m4_pattern_allow([^INSTALL_SCRIPT$])
m4trace:configure.in:5: -1- AC_SUBST([INSTALL_DATA])
m4trace:configure.in:5: -1- AC_SUBST_TRACE([INSTALL_DATA])
m4trace:configure.in:5: -1- m4_pattern_allow([^INSTALL_DATA$])
m4trace:configure.in:5: -1- AC_SUBST([am__isrc], [' -I$(srcdir)'])
m4trace:configure.in:5: -1- AC_SUBST_TRACE([am__isrc])
m4trace:configure.in:5: -1- m4_pattern_allow([^am__isrc$])
m4trace:configure.in:5: -1- _AM_SUBST_NOTMAKE([am__isrc])
m4trace:configure.in:5: -1- AC_SUBST([CYGPATH_W])
m4trace:configure.in:5: -1- AC_SUBST_TRACE([CYGPATH_W])
m4trace:configure.in:5: -1- m4_pattern_allow([^CYGPATH_W$])
m4trace:configure.in:5: -1- AC_SUBST([PACKAGE], [librfid])
m4trace:configure.in:5: -1- AC_SUBST_TRACE([PACKAGE])
m4trace:configure.in:5: -1- m4_pattern_allow([^PACKAGE$])
m4trace:configure.in:5: -1- AC_SUBST([VERSION], [0.1.0])
m4trace:configure.in:5: -1- AC_SUBST_TRACE([VERSION])
m4trace:configure.in:5: -1- m4_pattern_allow([^VERSION$])
m4trace:configure.in:5: -1- AC_DEFINE_TRACE_LITERAL([PACKAGE])
m4trace:configure.in:5: -1- m4_pattern_allow([^PACKAGE$])
m4trace:configure.in:5: -1- AH_OUTPUT([PACKAGE], [/* Name of package */
#undef PACKAGE])
m4trace:configure.in:5: -1- AC_DEFINE_TRACE_LITERAL([VERSION])
m4trace:configure.in:5: -1- m4_pattern_allow([^VERSION$])
m4trace:configure.in:5: -1- AH_OUTPUT([VERSION], [/* Version number of package */
#undef VERSION])
m4trace:configure.in:5: -1- AC_REQUIRE_AUX_FILE([missing])
m4trace:configure.in:5: -1- AC_SUBST([ACLOCAL])
m4trace:configure.in:5: -1- AC_SUBST_TRACE([ACLOCAL])
m4trace:configure.in:5: -1- m4_pattern_allow([^ACLOCAL$])
m4trace:configure.in:5: -1- AC_SUBST([AUTOCONF])
m4trace:configure.in:5: -1- AC_SUBST_TRACE([AUTOCONF])
m4trace:configure.in:5: -1- m4_pattern_allow([^AUTOCONF$])
m4trace:configure.in:5: -1- AC_SUBST([AUTOMAKE])
m4trace:configure.in:5: -1- AC_SUBST_TRACE([AUTOMAKE])
m4trace:configure.in:5: -1- m4_pattern_allow([^AUTOMAKE$])
m4trace:configure.in:5: -1- AC_SUBST([AUTOHEADER])
m4trace:configure.in:5: -1- AC_SUBST_TRACE([AUTOHEADER])
m4trace:configure.in:5: -1- m4_pattern_allow([^AUTOHEADER$])
m4trace:configure.in:5: -1- AC_SUBST([MAKEINFO])
m4trace:configure.in:5: -1- AC_SUBST_TRACE([MAKEINFO])
m4trace:configure.in:5: -1- m4_pattern_allow([^MAKEINFO$])
m4trace:configure.in:5: -1- AC_SUBST([install_sh])
m4trace:configure.in:5: -1- AC_SUBST_TRACE([install_sh])
m4trace:configure.in:5: -1- m4_pattern_allow([^install_sh$])
m4trace:configure.in:5: -1- AC_SUBST([STRIP])
m4trace:configure.in:5: -1- AC_SUBST_TRACE([STRIP])
m4trace:configure.in:5: -1- m4_pattern_allow([^STRIP$])
m4trace:configure.in:5: -1- AC_SUBST([INSTALL_STRIP_PROGRAM])
m4trace:configure.in:5: -1- AC_SUBST_TRACE([INSTALL_STRIP_PROGRAM])
m4trace:configure.in:5: -1- m4_pattern_allow([^INSTALL_STRIP_PROGRAM$])
m4trace:configure.in:5: -1- AC_REQUIRE_AUX_FILE([install-sh])
m4trace:configure.in:5: -1- AC_SUBST([MKDIR_P])
m4trace:configure.in:5: -1- AC_SUBST_TRACE([MKDIR_P])
m4trace:configure.in:5: -1- m4_pattern_allow([^MKDIR_P$])
m4trace:configure.in:5: -1- AC_SUBST([mkdir_p], ["$MKDIR_P"])
m4trace:configure.in:5: -1- AC_SUBST_TRACE([mkdir_p])
m4trace:configure.in:5: -1- m4_pattern_allow([^mkdir_p$])
m4trace:configure.in:5: -1- AC_SUBST([AWK])
m4trace:configure.in:5: -1- AC_SUBST_TRACE([AWK])
m4trace:configure.in:5: -1- m4_pattern_allow([^AWK$])
m4trace:configure.in:5: -1- AC_SUBST([SET_MAKE])
m4trace:configure.in:5: -1- AC_SUBST_TRACE([SET_MAKE])
m4trace:configure.in:5: -1- m4_pattern_allow([^SET_MAKE$])
m4trace:configure.in:5: -1- AC_SUBST([am__leading_dot])
m4trace:configure.in:5: -1- AC_SUBST_TRACE([am__leading_dot])
m4trace:configure.in:5: -1- m4_pattern_allow([^am__leading_dot$])
m4trace:configure.in:5: -1- AC_SUBST([AMTAR])
m4trace:configure.in:5: -1- AC_SUBST_TRACE([AMTAR])
m4trace:configure.in:5: -1- m4_pattern_allow([^AMTAR$])
m4trace:configure.in:5: -1- AC_SUBST([am__tar])
m4trace:configure.in:5: -1- AC_SUBST_TRACE([am__tar])
m4trace:configure.in:5: -1- m4_pattern_allow([^am__tar$])
m4trace:configure.in:5: -1- AC_SUBST([am__untar])
m4trace:configure.in:5: -1- AC_SUBST_TRACE([am__untar])
m4trace:configure.in:5: -1- m4_pattern_allow([^am__untar$])
m4trace:configure.in:7: -1- AC_SUBST([CC])
m4trace:configure.in:7: -1- AC_SUBST_TRACE([CC])
m4trace:configure.in:7: -1- m4_pattern_allow([^CC$])
m4trace:configure.in:7: -1- AC_SUBST([CFLAGS])
m4trace:configure.in:7: -1- AC_SUBST_TRACE([CFLAGS])
m4trace:configure.in:7: -1- m4_pattern_allow([^CFLAGS$])
m4trace:configure.in:7: -1- AC_SUBST([LDFLAGS])
m4trace:configure.in:7: -1- AC_SUBST_TRACE([LDFLAGS])
m4trace:configure.in:7: -1- m4_pattern_allow([^LDFLAGS$])
m4trace:configure.in:7: -1- AC_SUBST([LIBS])
m4trace:configure.in:7: -1- AC_SUBST_TRACE([LIBS])
m4trace:configure.in:7: -1- m4_pattern_allow([^LIBS$])
m4trace:configure.in:7: -1- AC_SUBST([CPPFLAGS])
m4trace:configure.in:7: -1- AC_SUBST_TRACE([CPPFLAGS])
m4trace:configure.in:7: -1- m4_pattern_allow([^CPPFLAGS$])
m4trace:configure.in:7: -1- AC_SUBST([CC])
m4trace:configure.in:7: -1- AC_SUBST_TRACE([CC])
m4trace:configure.in:7: -1- m4_pattern_allow([^CC$])
m4trace:configure.in:7: -1- AC_SUBST([CC])
m4trace:configure.in:7: -1- AC_SUBST_TRACE([CC])
m4trace:configure.in:7: -1- m4_pattern_allow([^CC$])
m4trace:configure.in:7: -1- AC_SUBST([CC])
m4trace:configure.in:7: -1- AC_SUBST_TRACE([CC])
m4trace:configure.in:7: -1- m4_pattern_allow([^CC$])
m4trace:configure.in:7: -1- AC_SUBST([CC])
m4trace:configure.in:7: -1- AC_SUBST_TRACE([CC])
m4trace:configure.in:7: -1- m4_pattern_allow([^CC$])
m4trace:configure.in:7: -1- AC_SUBST([ac_ct_CC])
m4trace:configure.in:7: -1- AC_SUBST_TRACE([ac_ct_CC])
m4trace:configure.in:7: -1- m4_pattern_allow([^ac_ct_CC$])
m4trace:configure.in:7: -1- AC_SUBST([EXEEXT], [$ac_cv_exeext])
m4trace:configure.in:7: -1- AC_SUBST_TRACE([EXEEXT])
m4trace:configure.in:7: -1- m4_pattern_allow([^EXEEXT$])
m4trace:configure.in:7: -1- AC_SUBST([OBJEXT], [$ac_cv_objext])
m4trace:configure.in:7: -1- AC_SUBST_TRACE([OBJEXT])
m4trace:configure.in:7: -1- m4_pattern_allow([^OBJEXT$])
m4trace:configure.in:7: -1- AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])
m4trace:configure.in:7: -1- AC_SUBST_TRACE([DEPDIR])
m4trace:configure.in:7: -1- m4_pattern_allow([^DEPDIR$])
m4trace:configure.in:7: -1- AC_SUBST([am__include])
m4trace:configure.in:7: -1- AC_SUBST_TRACE([am__include])
m4trace:configure.in:7: -1- m4_pattern_allow([^am__include$])
m4trace:configure.in:7: -1- AC_SUBST([am__quote])
m4trace:configure.in:7: -1- AC_SUBST_TRACE([am__quote])
m4trace:configure.in:7: -1- m4_pattern_allow([^am__quote$])
m4trace:configure.in:7: -1- AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
m4trace:configure.in:7: -1- AC_SUBST([AMDEP_TRUE])
m4trace:configure.in:7: -1- AC_SUBST_TRACE([AMDEP_TRUE])
m4trace:configure.in:7: -1- m4_pattern_allow([^AMDEP_TRUE$])
m4trace:configure.in:7: -1- AC_SUBST([AMDEP_FALSE])
m4trace:configure.in:7: -1- AC_SUBST_TRACE([AMDEP_FALSE])
m4trace:configure.in:7: -1- m4_pattern_allow([^AMDEP_FALSE$])
m4trace:configure.in:7: -1- _AM_SUBST_NOTMAKE([AMDEP_TRUE])
m4trace:configure.in:7: -1- _AM_SUBST_NOTMAKE([AMDEP_FALSE])
m4trace:configure.in:7: -1- AC_SUBST([AMDEPBACKSLASH])
m4trace:configure.in:7: -1- AC_SUBST_TRACE([AMDEPBACKSLASH])
m4trace:configure.in:7: -1- m4_pattern_allow([^AMDEPBACKSLASH$])
m4trace:configure.in:7: -1- _AM_SUBST_NOTMAKE([AMDEPBACKSLASH])
m4trace:configure.in:7: -1- AC_SUBST([CCDEPMODE], [depmode=$am_cv_CC_dependencies_compiler_type])
m4trace:configure.in:7: -1- AC_SUBST_TRACE([CCDEPMODE])
m4trace:configure.in:7: -1- m4_pattern_allow([^CCDEPMODE$])
m4trace:configure.in:7: -1- AM_CONDITIONAL([am__fastdepCC], [
test "x$enable_dependency_tracking" != xno \
&& test "$am_cv_CC_dependencies_compiler_type" = gcc3])
m4trace:configure.in:7: -1- AC_SUBST([am__fastdepCC_TRUE])
m4trace:configure.in:7: -1- AC_SUBST_TRACE([am__fastdepCC_TRUE])
m4trace:configure.in:7: -1- m4_pattern_allow([^am__fastdepCC_TRUE$])
m4trace:configure.in:7: -1- AC_SUBST([am__fastdepCC_FALSE])
m4trace:configure.in:7: -1- AC_SUBST_TRACE([am__fastdepCC_FALSE])
m4trace:configure.in:7: -1- m4_pattern_allow([^am__fastdepCC_FALSE$])
m4trace:configure.in:7: -1- _AM_SUBST_NOTMAKE([am__fastdepCC_TRUE])
m4trace:configure.in:7: -1- _AM_SUBST_NOTMAKE([am__fastdepCC_FALSE])
m4trace:configure.in:8: -1- AM_PROG_CC_C_O
m4trace:configure.in:8: -1- AC_DEFINE_TRACE_LITERAL([NO_MINUS_C_MINUS_O])
m4trace:configure.in:8: -1- m4_pattern_allow([^NO_MINUS_C_MINUS_O$])
m4trace:configure.in:8: -1- AH_OUTPUT([NO_MINUS_C_MINUS_O], [/* Define to 1 if your C compiler doesn\'t accept -c and -o together. */
#undef NO_MINUS_C_MINUS_O])
m4trace:configure.in:8: -1- AC_REQUIRE_AUX_FILE([compile])
m4trace:configure.in:9: -1- AC_DEFINE_TRACE_LITERAL([const])
m4trace:configure.in:9: -1- m4_pattern_allow([^const$])
m4trace:configure.in:9: -1- AH_OUTPUT([const], [/* Define to empty if `const\' does not conform to ANSI C. */
#undef const])
m4trace:configure.in:11: -1- _m4_warn([obsolete], [The macro `AC_LIBTOOL_WIN32_DLL' is obsolete.
You should run autoupdate.], [aclocal.m4:7625: AC_LIBTOOL_WIN32_DLL is expanded from...
configure.in:11: the top level])
m4trace:configure.in:11: -1- AC_SUBST([AS])
m4trace:configure.in:11: -1- AC_SUBST_TRACE([AS])
m4trace:configure.in:11: -1- m4_pattern_allow([^AS$])
m4trace:configure.in:11: -1- AC_SUBST([DLLTOOL])
m4trace:configure.in:11: -1- AC_SUBST_TRACE([DLLTOOL])
m4trace:configure.in:11: -1- m4_pattern_allow([^DLLTOOL$])
m4trace:configure.in:11: -1- AC_SUBST([OBJDUMP])
m4trace:configure.in:11: -1- AC_SUBST_TRACE([OBJDUMP])
m4trace:configure.in:11: -1- m4_pattern_allow([^OBJDUMP$])
m4trace:configure.in:11: -1- _m4_warn([obsolete], [AC_LIBTOOL_WIN32_DLL: Remove this warning and the call to _LT_SET_OPTION when you
put the `win32-dll' option into LT_INIT's first parameter.], [aclocal.m4:7625: AC_LIBTOOL_WIN32_DLL is expanded from...
configure.in:11: the top level])
m4trace:configure.in:12: -1- _m4_warn([obsolete], [The macro `AM_PROG_LIBTOOL' is obsolete.
You should run autoupdate.], [aclocal.m4:127: AM_PROG_LIBTOOL is expanded from...
configure.in:12: the top level])
m4trace:configure.in:12: -1- LT_INIT
m4trace:configure.in:12: -1- m4_pattern_forbid([^_?LT_[A-Z_]+$])
m4trace:configure.in:12: -1- m4_pattern_allow([^(_LT_EOF|LT_DLGLOBAL|LT_DLLAZY_OR_NOW|LT_MULTI_MODULE)$])
m4trace:configure.in:12: -1- AC_REQUIRE_AUX_FILE([ltmain.sh])
m4trace:configure.in:12: -1- AC_SUBST([LIBTOOL])
m4trace:configure.in:12: -1- AC_SUBST_TRACE([LIBTOOL])
m4trace:configure.in:12: -1- m4_pattern_allow([^LIBTOOL$])
m4trace:configure.in:12: -1- AC_SUBST([SED])
m4trace:configure.in:12: -1- AC_SUBST_TRACE([SED])
m4trace:configure.in:12: -1- m4_pattern_allow([^SED$])
m4trace:configure.in:12: -1- AC_SUBST([GREP])
m4trace:configure.in:12: -1- AC_SUBST_TRACE([GREP])
m4trace:configure.in:12: -1- m4_pattern_allow([^GREP$])
m4trace:configure.in:12: -1- AC_SUBST([EGREP])
m4trace:configure.in:12: -1- AC_SUBST_TRACE([EGREP])
m4trace:configure.in:12: -1- m4_pattern_allow([^EGREP$])
m4trace:configure.in:12: -1- AC_SUBST([FGREP])
m4trace:configure.in:12: -1- AC_SUBST_TRACE([FGREP])
m4trace:configure.in:12: -1- m4_pattern_allow([^FGREP$])
m4trace:configure.in:12: -1- AC_SUBST([GREP])
m4trace:configure.in:12: -1- AC_SUBST_TRACE([GREP])
m4trace:configure.in:12: -1- m4_pattern_allow([^GREP$])
m4trace:configure.in:12: -1- AC_SUBST([LD])
m4trace:configure.in:12: -1- AC_SUBST_TRACE([LD])
m4trace:configure.in:12: -1- m4_pattern_allow([^LD$])
m4trace:configure.in:12: -1- AC_SUBST([DUMPBIN])
m4trace:configure.in:12: -1- AC_SUBST_TRACE([DUMPBIN])
m4trace:configure.in:12: -1- m4_pattern_allow([^DUMPBIN$])
m4trace:configure.in:12: -1- AC_SUBST([ac_ct_DUMPBIN])
m4trace:configure.in:12: -1- AC_SUBST_TRACE([ac_ct_DUMPBIN])
m4trace:configure.in:12: -1- m4_pattern_allow([^ac_ct_DUMPBIN$])
m4trace:configure.in:12: -1- AC_SUBST([DUMPBIN])
m4trace:configure.in:12: -1- AC_SUBST_TRACE([DUMPBIN])
m4trace:configure.in:12: -1- m4_pattern_allow([^DUMPBIN$])
m4trace:configure.in:12: -1- AC_SUBST([NM])
m4trace:configure.in:12: -1- AC_SUBST_TRACE([NM])
m4trace:configure.in:12: -1- m4_pattern_allow([^NM$])
m4trace:configure.in:12: -1- AC_SUBST([LN_S], [$as_ln_s])
m4trace:configure.in:12: -1- AC_SUBST_TRACE([LN_S])
m4trace:configure.in:12: -1- m4_pattern_allow([^LN_S$])
m4trace:configure.in:12: -1- AC_SUBST([to_host_path_cmd])
m4trace:configure.in:12: -1- AC_SUBST_TRACE([to_host_path_cmd])
m4trace:configure.in:12: -1- m4_pattern_allow([^to_host_path_cmd$])
m4trace:configure.in:12: -1- AC_SUBST([OBJDUMP])
m4trace:configure.in:12: -1- AC_SUBST_TRACE([OBJDUMP])
m4trace:configure.in:12: -1- m4_pattern_allow([^OBJDUMP$])
m4trace:configure.in:12: -1- AC_SUBST([OBJDUMP])
m4trace:configure.in:12: -1- AC_SUBST_TRACE([OBJDUMP])
m4trace:configure.in:12: -1- m4_pattern_allow([^OBJDUMP$])
m4trace:configure.in:12: -1- AC_SUBST([DLLTOOL])
m4trace:configure.in:12: -1- AC_SUBST_TRACE([DLLTOOL])
m4trace:configure.in:12: -1- m4_pattern_allow([^DLLTOOL$])
m4trace:configure.in:12: -1- AC_SUBST([DLLTOOL])
m4trace:configure.in:12: -1- AC_SUBST_TRACE([DLLTOOL])
m4trace:configure.in:12: -1- m4_pattern_allow([^DLLTOOL$])
m4trace:configure.in:12: -1- AC_SUBST([AR])
m4trace:configure.in:12: -1- AC_SUBST_TRACE([AR])
m4trace:configure.in:12: -1- m4_pattern_allow([^AR$])
m4trace:configure.in:12: -1- AC_SUBST([STRIP])
m4trace:configure.in:12: -1- AC_SUBST_TRACE([STRIP])
m4trace:configure.in:12: -1- m4_pattern_allow([^STRIP$])
m4trace:configure.in:12: -1- AC_SUBST([RANLIB])
m4trace:configure.in:12: -1- AC_SUBST_TRACE([RANLIB])
m4trace:configure.in:12: -1- m4_pattern_allow([^RANLIB$])
m4trace:configure.in:12: -1- m4_pattern_allow([LT_OBJDIR])
m4trace:configure.in:12: -1- AC_DEFINE_TRACE_LITERAL([LT_OBJDIR])
m4trace:configure.in:12: -1- m4_pattern_allow([^LT_OBJDIR$])
m4trace:configure.in:12: -1- AH_OUTPUT([LT_OBJDIR], [/* Define to the sub-directory in which libtool stores uninstalled libraries.
*/
#undef LT_OBJDIR])
m4trace:configure.in:12: -1- LT_SUPPORTED_TAG([CC])
m4trace:configure.in:12: -1- AC_SUBST([DSYMUTIL])
m4trace:configure.in:12: -1- AC_SUBST_TRACE([DSYMUTIL])
m4trace:configure.in:12: -1- m4_pattern_allow([^DSYMUTIL$])
m4trace:configure.in:12: -1- AC_SUBST([NMEDIT])
m4trace:configure.in:12: -1- AC_SUBST_TRACE([NMEDIT])
m4trace:configure.in:12: -1- m4_pattern_allow([^NMEDIT$])
m4trace:configure.in:12: -1- AC_SUBST([LIPO])
m4trace:configure.in:12: -1- AC_SUBST_TRACE([LIPO])
m4trace:configure.in:12: -1- m4_pattern_allow([^LIPO$])
m4trace:configure.in:12: -1- AC_SUBST([OTOOL])
m4trace:configure.in:12: -1- AC_SUBST_TRACE([OTOOL])
m4trace:configure.in:12: -1- m4_pattern_allow([^OTOOL$])
m4trace:configure.in:12: -1- AC_SUBST([OTOOL64])
m4trace:configure.in:12: -1- AC_SUBST_TRACE([OTOOL64])
m4trace:configure.in:12: -1- m4_pattern_allow([^OTOOL64$])
m4trace:configure.in:12: -1- AH_OUTPUT([HAVE_DLFCN_H], [/* Define to 1 if you have the <dlfcn.h> header file. */
#undef HAVE_DLFCN_H])
m4trace:configure.in:12: -1- AC_SUBST([CPP])
m4trace:configure.in:12: -1- AC_SUBST_TRACE([CPP])
m4trace:configure.in:12: -1- m4_pattern_allow([^CPP$])
m4trace:configure.in:12: -1- AC_SUBST([CPPFLAGS])
m4trace:configure.in:12: -1- AC_SUBST_TRACE([CPPFLAGS])
m4trace:configure.in:12: -1- m4_pattern_allow([^CPPFLAGS$])
m4trace:configure.in:12: -1- AC_SUBST([CPP])
m4trace:configure.in:12: -1- AC_SUBST_TRACE([CPP])
m4trace:configure.in:12: -1- m4_pattern_allow([^CPP$])
m4trace:configure.in:12: -1- AC_DEFINE_TRACE_LITERAL([STDC_HEADERS])
m4trace:configure.in:12: -1- m4_pattern_allow([^STDC_HEADERS$])
m4trace:configure.in:12: -1- AH_OUTPUT([STDC_HEADERS], [/* Define to 1 if you have the ANSI C header files. */
#undef STDC_HEADERS])
m4trace:configure.in:12: -1- AH_OUTPUT([HAVE_SYS_TYPES_H], [/* Define to 1 if you have the <sys/types.h> header file. */
#undef HAVE_SYS_TYPES_H])
m4trace:configure.in:12: -1- AH_OUTPUT([HAVE_SYS_STAT_H], [/* Define to 1 if you have the <sys/stat.h> header file. */
#undef HAVE_SYS_STAT_H])
m4trace:configure.in:12: -1- AH_OUTPUT([HAVE_STDLIB_H], [/* Define to 1 if you have the <stdlib.h> header file. */
#undef HAVE_STDLIB_H])
m4trace:configure.in:12: -1- AH_OUTPUT([HAVE_STRING_H], [/* Define to 1 if you have the <string.h> header file. */
#undef HAVE_STRING_H])
m4trace:configure.in:12: -1- AH_OUTPUT([HAVE_MEMORY_H], [/* Define to 1 if you have the <memory.h> header file. */
#undef HAVE_MEMORY_H])
m4trace:configure.in:12: -1- AH_OUTPUT([HAVE_STRINGS_H], [/* Define to 1 if you have the <strings.h> header file. */
#undef HAVE_STRINGS_H])
m4trace:configure.in:12: -1- AH_OUTPUT([HAVE_INTTYPES_H], [/* Define to 1 if you have the <inttypes.h> header file. */
#undef HAVE_INTTYPES_H])
m4trace:configure.in:12: -1- AH_OUTPUT([HAVE_STDINT_H], [/* Define to 1 if you have the <stdint.h> header file. */
#undef HAVE_STDINT_H])
m4trace:configure.in:12: -1- AH_OUTPUT([HAVE_UNISTD_H], [/* Define to 1 if you have the <unistd.h> header file. */
#undef HAVE_UNISTD_H])
m4trace:configure.in:13: -1- AC_SUBST([LIBTOOL_DEPS])
m4trace:configure.in:13: -1- AC_SUBST_TRACE([LIBTOOL_DEPS])
m4trace:configure.in:13: -1- m4_pattern_allow([^LIBTOOL_DEPS$])
m4trace:configure.in:22: -1- AC_SUBST([BUILDENV])
m4trace:configure.in:22: -1- AC_SUBST_TRACE([BUILDENV])
m4trace:configure.in:22: -1- m4_pattern_allow([^BUILDENV$])
m4trace:configure.in:23: -1- AM_CONDITIONAL([ENABLE_WIN32], [test "$BUILDENV" == "WIN32"])
m4trace:configure.in:23: -1- AC_SUBST([ENABLE_WIN32_TRUE])
m4trace:configure.in:23: -1- AC_SUBST_TRACE([ENABLE_WIN32_TRUE])
m4trace:configure.in:23: -1- m4_pattern_allow([^ENABLE_WIN32_TRUE$])
m4trace:configure.in:23: -1- AC_SUBST([ENABLE_WIN32_FALSE])
m4trace:configure.in:23: -1- AC_SUBST_TRACE([ENABLE_WIN32_FALSE])
m4trace:configure.in:23: -1- m4_pattern_allow([^ENABLE_WIN32_FALSE$])
m4trace:configure.in:23: -1- _AM_SUBST_NOTMAKE([ENABLE_WIN32_TRUE])
m4trace:configure.in:23: -1- _AM_SUBST_NOTMAKE([ENABLE_WIN32_FALSE])
m4trace:configure.in:24: -1- AM_CONDITIONAL([DISABLE_WIN32], [test "$BUILDENV" != "WIN32"])
m4trace:configure.in:24: -1- AC_SUBST([DISABLE_WIN32_TRUE])
m4trace:configure.in:24: -1- AC_SUBST_TRACE([DISABLE_WIN32_TRUE])
m4trace:configure.in:24: -1- m4_pattern_allow([^DISABLE_WIN32_TRUE$])
m4trace:configure.in:24: -1- AC_SUBST([DISABLE_WIN32_FALSE])
m4trace:configure.in:24: -1- AC_SUBST_TRACE([DISABLE_WIN32_FALSE])
m4trace:configure.in:24: -1- m4_pattern_allow([^DISABLE_WIN32_FALSE$])
m4trace:configure.in:24: -1- _AM_SUBST_NOTMAKE([DISABLE_WIN32_TRUE])
m4trace:configure.in:24: -1- _AM_SUBST_NOTMAKE([DISABLE_WIN32_FALSE])
m4trace:configure.in:30: -1- AM_CONDITIONAL([ENABLE_CCID], [test "$MY_CCID" == "1"])
m4trace:configure.in:30: -1- AC_SUBST([ENABLE_CCID_TRUE])
m4trace:configure.in:30: -1- AC_SUBST_TRACE([ENABLE_CCID_TRUE])
m4trace:configure.in:30: -1- m4_pattern_allow([^ENABLE_CCID_TRUE$])
m4trace:configure.in:30: -1- AC_SUBST([ENABLE_CCID_FALSE])
m4trace:configure.in:30: -1- AC_SUBST_TRACE([ENABLE_CCID_FALSE])
m4trace:configure.in:30: -1- m4_pattern_allow([^ENABLE_CCID_FALSE$])
m4trace:configure.in:30: -1- _AM_SUBST_NOTMAKE([ENABLE_CCID_TRUE])
m4trace:configure.in:30: -1- _AM_SUBST_NOTMAKE([ENABLE_CCID_FALSE])
m4trace:configure.in:34: -2- _m4_warn([obsolete], [The macro `AC_HELP_STRING' is obsolete.
You should run autoupdate.], [/usr/src/autoconf/autoconf-2.63/lib/autoconf/general.m4:209: AC_HELP_STRING is expanded from...
configure.in:34: the top level])
m4trace:configure.in:46: -1- AC_SUBST([OPENCT_CFLAGS])
m4trace:configure.in:46: -1- AC_SUBST_TRACE([OPENCT_CFLAGS])
m4trace:configure.in:46: -1- m4_pattern_allow([^OPENCT_CFLAGS$])
m4trace:configure.in:47: -1- AC_SUBST([OPENCT_LIBS])
m4trace:configure.in:47: -1- AC_SUBST_TRACE([OPENCT_LIBS])
m4trace:configure.in:47: -1- m4_pattern_allow([^OPENCT_LIBS$])
m4trace:configure.in:49: -1- AM_CONDITIONAL([HAVE_OPENCT], [test "x$OPENCT_MSG" = "xyes"])
m4trace:configure.in:49: -1- AC_SUBST([HAVE_OPENCT_TRUE])
m4trace:configure.in:49: -1- AC_SUBST_TRACE([HAVE_OPENCT_TRUE])
m4trace:configure.in:49: -1- m4_pattern_allow([^HAVE_OPENCT_TRUE$])
m4trace:configure.in:49: -1- AC_SUBST([HAVE_OPENCT_FALSE])
m4trace:configure.in:49: -1- AC_SUBST_TRACE([HAVE_OPENCT_FALSE])
m4trace:configure.in:49: -1- m4_pattern_allow([^HAVE_OPENCT_FALSE$])
m4trace:configure.in:49: -1- _AM_SUBST_NOTMAKE([HAVE_OPENCT_TRUE])
m4trace:configure.in:49: -1- _AM_SUBST_NOTMAKE([HAVE_OPENCT_FALSE])
m4trace:configure.in:54: -1- AC_SUBST([FIRMWARE_PATH])
m4trace:configure.in:54: -1- AC_SUBST_TRACE([FIRMWARE_PATH])
m4trace:configure.in:54: -1- m4_pattern_allow([^FIRMWARE_PATH$])
m4trace:configure.in:55: -1- AM_CONDITIONAL([ENABLE_FIRMWARE], [test "$FIRMWARE_PATH" != ""])
m4trace:configure.in:55: -1- AC_SUBST([ENABLE_FIRMWARE_TRUE])
m4trace:configure.in:55: -1- AC_SUBST_TRACE([ENABLE_FIRMWARE_TRUE])
m4trace:configure.in:55: -1- m4_pattern_allow([^ENABLE_FIRMWARE_TRUE$])
m4trace:configure.in:55: -1- AC_SUBST([ENABLE_FIRMWARE_FALSE])
m4trace:configure.in:55: -1- AC_SUBST_TRACE([ENABLE_FIRMWARE_FALSE])
m4trace:configure.in:55: -1- m4_pattern_allow([^ENABLE_FIRMWARE_FALSE$])
m4trace:configure.in:55: -1- _AM_SUBST_NOTMAKE([ENABLE_FIRMWARE_TRUE])
m4trace:configure.in:55: -1- _AM_SUBST_NOTMAKE([ENABLE_FIRMWARE_FALSE])
m4trace:configure.in:60: -1- AM_CONDITIONAL([ENABLE_STATIC], [test "$ENABLE_STATIC" == "1"])
m4trace:configure.in:60: -1- AC_SUBST([ENABLE_STATIC_TRUE])
m4trace:configure.in:60: -1- AC_SUBST_TRACE([ENABLE_STATIC_TRUE])
m4trace:configure.in:60: -1- m4_pattern_allow([^ENABLE_STATIC_TRUE$])
m4trace:configure.in:60: -1- AC_SUBST([ENABLE_STATIC_FALSE])
m4trace:configure.in:60: -1- AC_SUBST_TRACE([ENABLE_STATIC_FALSE])
m4trace:configure.in:60: -1- m4_pattern_allow([^ENABLE_STATIC_FALSE$])
m4trace:configure.in:60: -1- _AM_SUBST_NOTMAKE([ENABLE_STATIC_TRUE])
m4trace:configure.in:60: -1- _AM_SUBST_NOTMAKE([ENABLE_STATIC_FALSE])
m4trace:configure.in:64: -1- AH_OUTPUT([HAVE_LIBUSB], [/* Define to 1 if you have the `usb\' library (-lusb). */
#undef HAVE_LIBUSB])
m4trace:configure.in:64: -1- AC_DEFINE_TRACE_LITERAL([HAVE_LIBUSB])
m4trace:configure.in:64: -1- m4_pattern_allow([^HAVE_LIBUSB$])
m4trace:configure.in:65: -1- AM_CONDITIONAL([HAVE_LIBUSB], [test "x$have_libusb" = "xyes"])
m4trace:configure.in:65: -1- AC_SUBST([HAVE_LIBUSB_TRUE])
m4trace:configure.in:65: -1- AC_SUBST_TRACE([HAVE_LIBUSB_TRUE])
m4trace:configure.in:65: -1- m4_pattern_allow([^HAVE_LIBUSB_TRUE$])
m4trace:configure.in:65: -1- AC_SUBST([HAVE_LIBUSB_FALSE])
m4trace:configure.in:65: -1- AC_SUBST_TRACE([HAVE_LIBUSB_FALSE])
m4trace:configure.in:65: -1- m4_pattern_allow([^HAVE_LIBUSB_FALSE$])
m4trace:configure.in:65: -1- _AM_SUBST_NOTMAKE([HAVE_LIBUSB_TRUE])
m4trace:configure.in:65: -1- _AM_SUBST_NOTMAKE([HAVE_LIBUSB_FALSE])
m4trace:configure.in:68: -1- AC_CONFIG_FILES([Makefile etc/Makefile etc/udev/Makefile src/Makefile include/Makefile include/librfid/Makefile utils/Makefile src/librfid.pc win32/Makefile])
m4trace:configure.in:68: -1- _m4_warn([obsolete], [AC_OUTPUT should be used without arguments.
You should run autoupdate.], [])
m4trace:configure.in:68: -1- AC_SUBST([LIB@&t@OBJS], [$ac_libobjs])
m4trace:configure.in:68: -1- AC_SUBST_TRACE([LIB@&t@OBJS])
m4trace:configure.in:68: -1- m4_pattern_allow([^LIB@&t@OBJS$])
m4trace:configure.in:68: -1- AC_SUBST([LTLIBOBJS], [$ac_ltlibobjs])
m4trace:configure.in:68: -1- AC_SUBST_TRACE([LTLIBOBJS])
m4trace:configure.in:68: -1- m4_pattern_allow([^LTLIBOBJS$])
m4trace:configure.in:68: -1- AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])
m4trace:configure.in:68: -1- AC_SUBST([am__EXEEXT_TRUE])
m4trace:configure.in:68: -1- AC_SUBST_TRACE([am__EXEEXT_TRUE])
m4trace:configure.in:68: -1- m4_pattern_allow([^am__EXEEXT_TRUE$])
m4trace:configure.in:68: -1- AC_SUBST([am__EXEEXT_FALSE])
m4trace:configure.in:68: -1- AC_SUBST_TRACE([am__EXEEXT_FALSE])
m4trace:configure.in:68: -1- m4_pattern_allow([^am__EXEEXT_FALSE$])
m4trace:configure.in:68: -1- _AM_SUBST_NOTMAKE([am__EXEEXT_TRUE])
m4trace:configure.in:68: -1- _AM_SUBST_NOTMAKE([am__EXEEXT_FALSE])
m4trace:configure.in:68: -1- AC_SUBST_TRACE([top_builddir])
m4trace:configure.in:68: -1- AC_SUBST_TRACE([top_build_prefix])
m4trace:configure.in:68: -1- AC_SUBST_TRACE([srcdir])
m4trace:configure.in:68: -1- AC_SUBST_TRACE([abs_srcdir])
m4trace:configure.in:68: -1- AC_SUBST_TRACE([top_srcdir])
m4trace:configure.in:68: -1- AC_SUBST_TRACE([abs_top_srcdir])
m4trace:configure.in:68: -1- AC_SUBST_TRACE([builddir])
m4trace:configure.in:68: -1- AC_SUBST_TRACE([abs_builddir])
m4trace:configure.in:68: -1- AC_SUBST_TRACE([abs_top_builddir])
m4trace:configure.in:68: -1- AC_SUBST_TRACE([INSTALL])
m4trace:configure.in:68: -1- AC_SUBST_TRACE([MKDIR_P])
m4trace:configure.in:68: -1- AC_REQUIRE_AUX_FILE([ltmain.sh])
+143
View File
@@ -0,0 +1,143 @@
#! /bin/sh
# Wrapper for compilers which do not understand `-c -o'.
scriptversion=2009-10-06.20; # UTC
# Copyright (C) 1999, 2000, 2003, 2004, 2005, 2009 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>.
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 $?
;;
esac
ofile=
cfile=
eat=
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:
+1501
View File
File diff suppressed because it is too large Load Diff
+642
View File
@@ -0,0 +1,642 @@
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
It was created by configure, which was
generated by GNU Autoconf 2.63. Invocation command line was
$ ./configure
## --------- ##
## Platform. ##
## --------- ##
hostname = BlubbFish
uname -m = i686
uname -r = 1.0.11(0.46/3/2)
uname -s = MINGW32_NT-6.1
uname -v = 2009-07-11 17:46
/usr/bin/uname -p = unknown
/bin/uname -X = unknown
/bin/arch = unknown
/usr/bin/arch -k = unknown
/usr/convex/getsysinfo = unknown
/usr/bin/hostinfo = unknown
/bin/machine = unknown
/usr/bin/oslevel = unknown
/bin/universe = unknown
PATH: .
PATH: /usr/local/bin
PATH: /mingw/bin
PATH: /bin
PATH: /c/Program Files/PC Connectivity Solution/
PATH: /c/Program Files/ATI Stream/bin/x86
PATH: /e/Programme/MikTeX/miktex/bin
PATH: /c/Windows/system32
PATH: /c/Windows
PATH: /c/Windows/System32/Wbem
PATH: /c/Windows/System32/WindowsPowerShell/v1.0/
PATH: /e/Programme/SVN/bin/
PATH: /c/Program Files/ATI Stream/Tools/Stream KernelAnalyzer 1.5/
PATH: /c/VXIPNP/WinNT/Bin
PATH: /e/Programme/JAF
PATH: /mingw/libexec/arm/bin
PATH: /e/Programme/hacker/Nmap
PATH: /c/Program Files/OpenVPN/bin
## ----------- ##
## Core tests. ##
## ----------- ##
configure:1950: checking build system type
configure:1968: result: i686-pc-mingw32
configure:1990: checking host system type
configure:2005: result: i686-pc-mingw32
configure:2027: checking target system type
configure:2042: result: i686-pc-mingw32
configure:2086: checking for a BSD-compatible install
configure:2154: result: /bin/install -c
configure:2165: checking whether build environment is sane
configure:2225: result: yes
configure:2366: checking for a thread-safe mkdir -p
configure:2405: result: /bin/mkdir -p
configure:2418: checking for gawk
configure:2434: found /bin/gawk
configure:2445: result: gawk
configure:2456: checking whether make sets $(MAKE)
configure:2478: result: yes
configure:2609: checking for gcc
configure:2625: found /mingw/bin/gcc
configure:2636: result: gcc
configure:2868: checking for C compiler version
configure:2876: gcc --version >&5
gcc.exe (GCC) 3.4.5 (mingw-vista special r3)
Copyright (C) 2004 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
configure:2880: $? = 0
configure:2887: gcc -v >&5
Reading specs from E:/Programme/Mingw/bin/../lib/gcc/mingw32/3.4.5/specs
Configured with: ../gcc-3.4.5-20060117-3/configure --with-gcc --with-gnu-ld --with-gnu-as --host=mingw32 --target=mingw32 --prefix=/mingw --enable-threads --disable-nls --enable-languages=c,c++,f77,ada,objc,java --disable-win32-registry --disable-shared --enable-sjlj-exceptions --enable-libgcj --disable-java-awt --without-x --enable-java-gc=boehm --disable-libgcj-debug --enable-interpreter --enable-hash-synchronization --enable-libstdcxx-debug
Thread model: win32
gcc version 3.4.5 (mingw-vista special r3)
configure:2891: $? = 0
configure:2898: gcc -V >&5
gcc.exe: `-V' option must have argument
configure:2902: $? = 1
configure:2925: checking for C compiler default output file name
configure:2947: gcc conftest.c >&5
configure:2951: $? = 0
configure:2989: result: a.exe
configure:3008: checking whether the C compiler works
configure:3018: ./a.exe
configure:3022: $? = 0
configure:3041: result: yes
configure:3048: checking whether we are cross compiling
configure:3050: result: no
configure:3053: checking for suffix of executables
configure:3060: gcc -o conftest.exe conftest.c >&5
configure:3064: $? = 0
configure:3090: result: .exe
configure:3096: checking for suffix of object files
configure:3122: gcc -c conftest.c >&5
configure:3126: $? = 0
configure:3151: result: o
configure:3155: checking whether we are using the GNU C compiler
configure:3184: gcc -c conftest.c >&5
configure:3191: $? = 0
configure:3208: result: yes
configure:3217: checking whether gcc accepts -g
configure:3247: gcc -c -g conftest.c >&5
configure:3254: $? = 0
configure:3355: result: yes
configure:3372: checking for gcc option to accept ISO C89
configure:3446: gcc -c -g -O2 conftest.c >&5
configure:3453: $? = 0
configure:3476: result: none needed
configure:3505: checking for style of include used by make
configure:3533: result: GNU
configure:3558: checking dependency style of gcc
configure:3668: result: gcc3
configure:3684: checking whether gcc and cc understand -c and -o together
configure:3719: gcc -c conftest.c -o conftest2.o >&5
configure:3723: $? = 0
configure:3729: gcc -c conftest.c -o conftest2.o >&5
configure:3733: $? = 0
configure:3744: cc -c conftest.c >&5
./configure: line 3746: cc: command not found
configure:3748: $? = 127
configure:3788: result: yes
configure:3816: checking for an ANSI C-conforming const
configure:3891: gcc -c -g -O2 conftest.c >&5
configure:3898: $? = 0
configure:3913: result: yes
configure:3971: checking for as
configure:3987: found /mingw/bin/as
configure:3998: result: as
configure:4063: checking for dlltool
configure:4079: found /mingw/bin/dlltool
configure:4090: result: dlltool
configure:4155: checking for objdump
configure:4171: found /mingw/bin/objdump
configure:4182: result: objdump
configure:4229: WARNING: Libtool does not cope well with whitespace in `pwd`
configure:4273: checking how to print strings
configure:4300: result: printf
configure:4321: checking for a sed that does not truncate output
configure:4387: result: /bin/sed
configure:4405: checking for grep that handles long lines and -e
configure:4465: result: /bin/grep
configure:4470: checking for egrep
configure:4534: result: /bin/grep -E
configure:4539: checking for fgrep
configure:4603: result: /bin/grep -F
configure:4638: checking for ld used by gcc
configure:4705: result: E:/Programme/Mingw/mingw32/bin/ld.exe
configure:4714: checking if the linker (E:/Programme/Mingw/mingw32/bin/ld.exe) is GNU ld
configure:4729: result: yes
configure:4741: checking for BSD- or MS-compatible name lister (nm)
configure:4790: result: /mingw/bin/nm
configure:4920: checking the name lister (/mingw/bin/nm) interface
configure:4927: gcc -c -g -O2 conftest.c >&5
configure:4930: /mingw/bin/nm "conftest.o"
configure:4933: output
00000000 b .bss
00000000 d .data
00000000 N .stab
00000000 N .stabstr
00000000 t .text
00000000 B _some_variable
configure:4940: result: BSD nm
configure:4943: checking whether ln -s works
configure:4947: result: yes
configure:4955: checking the maximum length of command line arguments
configure:5080: result: 8192
configure:5097: checking whether the shell understands some XSI constructs
configure:5107: result: yes
configure:5111: checking whether the shell understands "+="
configure:5117: result: yes
configure:5152: checking how to convert i686-pc-mingw32 paths to i686-pc-mingw32 format
configure:5214: result: func_msys_to_mingw_path_convert
configure:5221: checking for E:/Programme/Mingw/mingw32/bin/ld.exe option to reload object files
configure:5228: result: -r
configure:5297: checking for objdump
configure:5324: result: objdump
configure:5353: checking how to recognize dependent libraries
configure:5549: result: file_magic ^x86 archive import|^x86 DLL
configure:5609: checking for dlltool
configure:5636: result: dlltool
configure:5666: checking how to associate runtime and link libraries
configure:5693: result: func_cygming_dll_for_implib_fallback
configure:5747: checking for ar
configure:5763: found /mingw/bin/ar
configure:5774: result: ar
configure:5852: checking for strip
configure:5868: found /mingw/bin/strip
configure:5879: result: strip
configure:5951: checking for ranlib
configure:5967: found /mingw/bin/ranlib
configure:5978: result: ranlib
configure:6080: checking command to parse /mingw/bin/nm output from gcc object
configure:6198: gcc -c -g -O2 conftest.c >&5
configure:6201: $? = 0
configure:6205: /mingw/bin/nm conftest.o \| sed -n -e 's/^.*[ ]\([ABCDGIRSTW][ABCDGIRSTW]*\)[ ][ ]*\([_A-Za-z][_A-Za-z0-9]*\)\{0,1\}$/\1 \2 \2/p' \> conftest.nm
configure:6208: $? = 0
cannot find nm_test_var in conftest.nm
configure:6198: gcc -c -g -O2 conftest.c >&5
configure:6201: $? = 0
configure:6205: /mingw/bin/nm conftest.o \| sed -n -e 's/^.*[ ]\([ABCDGIRSTW][ABCDGIRSTW]*\)[ ][ ]*_\([_A-Za-z][_A-Za-z0-9]*\)\{0,1\}$/\1 _\2 \2/p' \> conftest.nm
configure:6208: $? = 0
configure:6262: gcc -o conftest.exe -g -O2 conftest.c conftstm.o >&5
configure:6265: $? = 0
configure:6303: result: ok
configure:7169: checking how to run the C preprocessor
configure:7209: gcc -E conftest.c
configure:7216: $? = 0
configure:7247: gcc -E conftest.c
conftest.c:10:28: ac_nonexistent.h: No such file or directory
configure:7254: $? = 1
configure: failed program was:
| /* confdefs.h. */
| #define PACKAGE_NAME ""
| #define PACKAGE_TARNAME ""
| #define PACKAGE_VERSION ""
| #define PACKAGE_STRING ""
| #define PACKAGE_BUGREPORT ""
| #define PACKAGE "librfid"
| #define VERSION "0.1.0"
| /* end confdefs.h. */
| #include <ac_nonexistent.h>
configure:7287: result: gcc -E
configure:7316: gcc -E conftest.c
configure:7323: $? = 0
configure:7354: gcc -E conftest.c
conftest.c:10:28: ac_nonexistent.h: No such file or directory
configure:7361: $? = 1
configure: failed program was:
| /* confdefs.h. */
| #define PACKAGE_NAME ""
| #define PACKAGE_TARNAME ""
| #define PACKAGE_VERSION ""
| #define PACKAGE_STRING ""
| #define PACKAGE_BUGREPORT ""
| #define PACKAGE "librfid"
| #define VERSION "0.1.0"
| /* end confdefs.h. */
| #include <ac_nonexistent.h>
configure:7401: checking for ANSI C header files
configure:7431: gcc -c -g -O2 conftest.c >&5
configure:7438: $? = 0
configure:7537: gcc -o conftest.exe -g -O2 conftest.c >&5
configure:7541: $? = 0
configure:7547: ./conftest.exe
configure:7551: $? = 0
configure:7569: result: yes
configure:7593: checking for sys/types.h
configure:7614: gcc -c -g -O2 conftest.c >&5
configure:7621: $? = 0
configure:7638: result: yes
configure:7593: checking for sys/stat.h
configure:7614: gcc -c -g -O2 conftest.c >&5
configure:7621: $? = 0
configure:7638: result: yes
configure:7593: checking for stdlib.h
configure:7614: gcc -c -g -O2 conftest.c >&5
configure:7621: $? = 0
configure:7638: result: yes
configure:7593: checking for string.h
configure:7614: gcc -c -g -O2 conftest.c >&5
configure:7621: $? = 0
configure:7638: result: yes
configure:7593: checking for memory.h
configure:7614: gcc -c -g -O2 conftest.c >&5
configure:7621: $? = 0
configure:7638: result: yes
configure:7593: checking for strings.h
configure:7614: gcc -c -g -O2 conftest.c >&5
configure:7621: $? = 0
configure:7638: result: yes
configure:7593: checking for inttypes.h
configure:7614: gcc -c -g -O2 conftest.c >&5
configure:7621: $? = 0
configure:7638: result: yes
configure:7593: checking for stdint.h
configure:7614: gcc -c -g -O2 conftest.c >&5
configure:7621: $? = 0
configure:7638: result: yes
configure:7593: checking for unistd.h
configure:7614: gcc -c -g -O2 conftest.c >&5
configure:7621: $? = 0
configure:7638: result: yes
configure:7656: checking for dlfcn.h
configure:7677: gcc -c -g -O2 conftest.c >&5
conftest.c:54:19: dlfcn.h: No such file or directory
configure:7684: $? = 1
configure: failed program was:
| /* confdefs.h. */
| #define PACKAGE_NAME ""
| #define PACKAGE_TARNAME ""
| #define PACKAGE_VERSION ""
| #define PACKAGE_STRING ""
| #define PACKAGE_BUGREPORT ""
| #define PACKAGE "librfid"
| #define VERSION "0.1.0"
| #define STDC_HEADERS 1
| #define HAVE_SYS_TYPES_H 1
| #define HAVE_SYS_STAT_H 1
| #define HAVE_STDLIB_H 1
| #define HAVE_STRING_H 1
| #define HAVE_MEMORY_H 1
| #define HAVE_STRINGS_H 1
| #define HAVE_INTTYPES_H 1
| #define HAVE_STDINT_H 1
| #define HAVE_UNISTD_H 1
| /* end confdefs.h. */
| #include <stdio.h>
| #ifdef HAVE_SYS_TYPES_H
| # include <sys/types.h>
| #endif
| #ifdef HAVE_SYS_STAT_H
| # include <sys/stat.h>
| #endif
| #ifdef STDC_HEADERS
| # include <stdlib.h>
| # include <stddef.h>
| #else
| # ifdef HAVE_STDLIB_H
| # include <stdlib.h>
| # endif
| #endif
| #ifdef HAVE_STRING_H
| # if !defined STDC_HEADERS && defined HAVE_MEMORY_H
| # include <memory.h>
| # endif
| # include <string.h>
| #endif
| #ifdef HAVE_STRINGS_H
| # include <strings.h>
| #endif
| #ifdef HAVE_INTTYPES_H
| # include <inttypes.h>
| #endif
| #ifdef HAVE_STDINT_H
| # include <stdint.h>
| #endif
| #ifdef HAVE_UNISTD_H
| # include <unistd.h>
| #endif
|
| #include <dlfcn.h>
configure:7701: result: no
configure:7888: checking for objdir
configure:7903: result: .libs
configure:8165: checking if gcc supports -fno-rtti -fno-exceptions
configure:8183: gcc -c -g -O2 -fno-rtti -fno-exceptions conftest.c >&5
cc1.exe: warning: command line option "-fno-rtti" is valid for C++/ObjC++ but not for C
configure:8187: $? = 0
configure:8200: result: no
configure:8220: checking for gcc option to produce PIC
configure:8492: result: -DDLL_EXPORT -DPIC
configure:8504: checking if gcc PIC flag -DDLL_EXPORT -DPIC works
configure:8522: gcc -c -g -O2 -DDLL_EXPORT -DPIC -DPIC conftest.c >&5
configure:8526: $? = 0
configure:8539: result: yes
configure:8563: checking if gcc static flag -static works
configure:8591: result: yes
configure:8606: checking if gcc supports -c -o file.o
configure:8627: gcc -c -g -O2 -o out/conftest2.o conftest.c >&5
configure:8631: $? = 0
configure:8653: result: yes
configure:8661: checking if gcc supports -c -o file.o
configure:8708: result: yes
configure:8741: checking whether the gcc linker (E:/Programme/Mingw/mingw32/bin/ld.exe) supports shared libraries
configure:9890: result: yes
configure:9927: checking whether -lc should be explicitly linked in
configure:9935: gcc -c -g -O2 conftest.c >&5
configure:9938: $? = 0
configure:9953: gcc -shared conftest.o -v -o ./conftest -Wl,--enable-auto-image-base -Xlinker --out-implib -Xlinker conftest 2\>\&1 \| /bin/grep -lc \>/dev/null 2\>\&1
configure:9956: $? = 1
configure:9970: result: yes
configure:10135: checking dynamic linker characteristics
configure:10837: result: Win32 ld.exe
configure:10944: checking how to hardcode library paths into programs
configure:10969: result: immediate
configure:11802: checking whether stripping libraries is possible
configure:11807: result: yes
configure:11842: checking if libtool supports shared libraries
configure:11844: result: yes
configure:11847: checking whether to build shared libraries
configure:11868: result: yes
configure:11871: checking whether to build static libraries
configure:11875: result: yes
configure:11912: checking for build environment
configure:11919: result: UNIX
## ---------------- ##
## Cache variables. ##
## ---------------- ##
ac_cv_build=i686-pc-mingw32
ac_cv_c_compiler_gnu=yes
ac_cv_c_const=yes
ac_cv_env_CC_set=
ac_cv_env_CC_value=
ac_cv_env_CFLAGS_set=
ac_cv_env_CFLAGS_value=
ac_cv_env_CPPFLAGS_set=
ac_cv_env_CPPFLAGS_value=
ac_cv_env_CPP_set=
ac_cv_env_CPP_value=
ac_cv_env_LDFLAGS_set=
ac_cv_env_LDFLAGS_value=
ac_cv_env_LIBS_set=
ac_cv_env_LIBS_value=
ac_cv_env_build_alias_set=
ac_cv_env_build_alias_value=
ac_cv_env_host_alias_set=
ac_cv_env_host_alias_value=
ac_cv_env_target_alias_set=
ac_cv_env_target_alias_value=
ac_cv_exeext=.exe
ac_cv_header_dlfcn_h=no
ac_cv_header_inttypes_h=yes
ac_cv_header_memory_h=yes
ac_cv_header_stdc=yes
ac_cv_header_stdint_h=yes
ac_cv_header_stdlib_h=yes
ac_cv_header_string_h=yes
ac_cv_header_strings_h=yes
ac_cv_header_sys_stat_h=yes
ac_cv_header_sys_types_h=yes
ac_cv_header_unistd_h=yes
ac_cv_host=i686-pc-mingw32
ac_cv_objext=o
ac_cv_path_EGREP='/bin/grep -E'
ac_cv_path_FGREP='/bin/grep -F'
ac_cv_path_GREP=/bin/grep
ac_cv_path_SED=/bin/sed
ac_cv_path_install='/bin/install -c'
ac_cv_path_mkdir=/bin/mkdir
ac_cv_prog_AWK=gawk
ac_cv_prog_CPP='gcc -E'
ac_cv_prog_ac_ct_AR=ar
ac_cv_prog_ac_ct_AS=as
ac_cv_prog_ac_ct_CC=gcc
ac_cv_prog_ac_ct_DLLTOOL=dlltool
ac_cv_prog_ac_ct_OBJDUMP=objdump
ac_cv_prog_ac_ct_RANLIB=ranlib
ac_cv_prog_ac_ct_STRIP=strip
ac_cv_prog_cc_c89=
ac_cv_prog_cc_g=yes
ac_cv_prog_cc_gcc_c_o=yes
ac_cv_prog_make_make_set=yes
ac_cv_target=i686-pc-mingw32
am_cv_CC_dependencies_compiler_type=gcc3
lt_cv_archive_cmds_need_lc=yes
lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
lt_cv_file_magic_cmd=func_win32_libid
lt_cv_file_magic_test_file=
lt_cv_ld_reload_flag=-r
lt_cv_nm_interface='BSD nm'
lt_cv_objdir=.libs
lt_cv_path_LD=E:/Programme/Mingw/mingw32/bin/ld.exe
lt_cv_path_NM=/mingw/bin/nm
lt_cv_prog_compiler_c_o=yes
lt_cv_prog_compiler_pic_works=yes
lt_cv_prog_compiler_rtti_exceptions=no
lt_cv_prog_compiler_static_works=yes
lt_cv_prog_gnu_ld=yes
lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib_fallback
lt_cv_sys_global_symbol_pipe='sed -n -e '\''s/^.*[ ]\([ABCDGIRSTW][ABCDGIRSTW]*\)[ ][ ]*_\([_A-Za-z][_A-Za-z0-9]*\)␍\{0,1\}$/\1 _\2 \2/p'\'''
lt_cv_sys_global_symbol_to_c_name_address='sed -n -e '\''s/^: \([^ ]*\)[ ]*$/ {\"\1\", (void *) 0},/p'\'' -e '\''s/^[ABCDGIRSTW]* \([^ ]*\) \([^ ]*\)$/ {"\2", (void *) \&\2},/p'\'''
lt_cv_sys_global_symbol_to_c_name_address_lib_prefix='sed -n -e '\''s/^: \([^ ]*\)[ ]*$/ {\"\1\", (void *) 0},/p'\'' -e '\''s/^[ABCDGIRSTW]* \([^ ]*\) \(lib[^ ]*\)$/ {"\2", (void *) \&\2},/p'\'' -e '\''s/^[ABCDGIRSTW]* \([^ ]*\) \([^ ]*\)$/ {"lib\2", (void *) \&\2},/p'\'''
lt_cv_sys_global_symbol_to_cdecl='sed -n -e '\''s/^T .* \(.*\)$/extern int \1();/p'\'' -e '\''s/^[ABCDGIRSTW]* .* \(.*\)$/extern char \1;/p'\'''
lt_cv_sys_max_cmd_len=8192
lt_cv_to_host_path_cmd=func_msys_to_mingw_path_convert
## ----------------- ##
## Output variables. ##
## ----------------- ##
ACLOCAL='${SHELL} "/D/Visual Studio 2010/Projects/Matomat/librfid_1999/missing" --run aclocal-1.11'
AMDEPBACKSLASH='\'
AMDEP_FALSE='#'
AMDEP_TRUE=''
AMTAR='${SHELL} "/D/Visual Studio 2010/Projects/Matomat/librfid_1999/missing" --run tar'
AR='ar'
AS='as'
AUTOCONF='${SHELL} "/D/Visual Studio 2010/Projects/Matomat/librfid_1999/missing" --run autoconf'
AUTOHEADER='${SHELL} "/D/Visual Studio 2010/Projects/Matomat/librfid_1999/missing" --run autoheader'
AUTOMAKE='${SHELL} "/D/Visual Studio 2010/Projects/Matomat/librfid_1999/missing" --run automake-1.11'
AWK='gawk'
BUILDENV='UNIX'
CC='gcc'
CCDEPMODE='depmode=gcc3'
CFLAGS='-g -O2'
CPP='gcc -E'
CPPFLAGS=''
CYGPATH_W='echo'
DEFS=''
DEPDIR='.deps'
DISABLE_WIN32_FALSE='#'
DISABLE_WIN32_TRUE=''
DLLTOOL='dlltool'
DSYMUTIL=''
DUMPBIN=''
ECHO_C=''
ECHO_N='-n'
ECHO_T=''
EGREP='/bin/grep -E'
ENABLE_CCID_FALSE=''
ENABLE_CCID_TRUE='#'
ENABLE_FIRMWARE_FALSE=''
ENABLE_FIRMWARE_TRUE=''
ENABLE_STATIC_FALSE=''
ENABLE_STATIC_TRUE=''
ENABLE_WIN32_FALSE=''
ENABLE_WIN32_TRUE='#'
EXEEXT='.exe'
FGREP='/bin/grep -F'
FIRMWARE_PATH=''
GREP='/bin/grep'
HAVE_LIBUSB_FALSE=''
HAVE_LIBUSB_TRUE=''
HAVE_OPENCT_FALSE=''
HAVE_OPENCT_TRUE=''
INSTALL_DATA='${INSTALL} -m 644'
INSTALL_PROGRAM='${INSTALL}'
INSTALL_SCRIPT='${INSTALL}'
INSTALL_STRIP_PROGRAM='$(install_sh) -c -s'
LD='E:/Programme/Mingw/mingw32/bin/ld.exe'
LDFLAGS=''
LIBOBJS=''
LIBS=''
LIBTOOL='$(SHELL) $(top_builddir)/libtool'
LIBTOOL_DEPS='./ltmain.sh'
LIPO=''
LN_S='ln -s'
LTLIBOBJS=''
MAKEINFO='${SHELL} "/D/Visual Studio 2010/Projects/Matomat/librfid_1999/missing" --run makeinfo'
MKDIR_P='/bin/mkdir -p'
NM='/mingw/bin/nm'
NMEDIT=''
OBJDUMP='objdump'
OBJEXT='o'
OPENCT_CFLAGS=''
OPENCT_LIBS=''
OTOOL64=''
OTOOL=''
PACKAGE='librfid'
PACKAGE_BUGREPORT=''
PACKAGE_NAME=''
PACKAGE_STRING=''
PACKAGE_TARNAME=''
PACKAGE_VERSION=''
PATH_SEPARATOR=':'
RANLIB='ranlib'
SED='/bin/sed'
SET_MAKE=''
SHELL='/bin/sh'
STRIP='strip'
VERSION='0.1.0'
ac_ct_CC='gcc'
ac_ct_DUMPBIN=''
am__EXEEXT_FALSE=''
am__EXEEXT_TRUE=''
am__fastdepCC_FALSE='#'
am__fastdepCC_TRUE=''
am__include='include'
am__isrc=''
am__leading_dot='.'
am__quote=''
am__tar='${AMTAR} chof - "$$tardir"'
am__untar='${AMTAR} xf -'
bindir='${exec_prefix}/bin'
build='i686-pc-mingw32'
build_alias=''
build_cpu='i686'
build_os='mingw32'
build_vendor='pc'
datadir='${datarootdir}'
datarootdir='${prefix}/share'
docdir='${datarootdir}/doc/${PACKAGE}'
dvidir='${docdir}'
exec_prefix='NONE'
host='i686-pc-mingw32'
host_alias=''
host_cpu='i686'
host_os='mingw32'
host_vendor='pc'
htmldir='${docdir}'
includedir='${prefix}/include'
infodir='${datarootdir}/info'
install_sh='${SHELL} '\''/D/Visual Studio 2010/Projects/Matomat/librfid_1999/install-sh'\'''
libdir='${exec_prefix}/lib'
libexecdir='${exec_prefix}/libexec'
localedir='${datarootdir}/locale'
localstatedir='${prefix}/var'
mandir='${datarootdir}/man'
mkdir_p='/bin/mkdir -p'
oldincludedir='/usr/include'
pdfdir='${docdir}'
prefix='NONE'
program_transform_name='s,x,x,'
psdir='${docdir}'
sbindir='${exec_prefix}/sbin'
sharedstatedir='${prefix}/com'
sysconfdir='${prefix}/etc'
target='i686-pc-mingw32'
target_alias=''
target_cpu='i686'
target_os='mingw32'
target_vendor='pc'
to_host_path_cmd='func_msys_to_mingw_path_convert'
## ----------- ##
## confdefs.h. ##
## ----------- ##
#define PACKAGE_NAME ""
#define PACKAGE_TARNAME ""
#define PACKAGE_VERSION ""
#define PACKAGE_STRING ""
#define PACKAGE_BUGREPORT ""
#define PACKAGE "librfid"
#define VERSION "0.1.0"
#define STDC_HEADERS 1
#define HAVE_SYS_TYPES_H 1
#define HAVE_SYS_STAT_H 1
#define HAVE_STDLIB_H 1
#define HAVE_STRING_H 1
#define HAVE_MEMORY_H 1
#define HAVE_STRINGS_H 1
#define HAVE_INTTYPES_H 1
#define HAVE_STDINT_H 1
#define HAVE_UNISTD_H 1
#define LT_OBJDIR ".libs/"
configure: exit 258
+1705
View File
File diff suppressed because it is too large Load Diff
+14381
View File
File diff suppressed because it is too large Load Diff
+68
View File
@@ -0,0 +1,68 @@
dnl Process this file with autoconf to create configure.
AC_INIT
AC_CANONICAL_SYSTEM
AM_INIT_AUTOMAKE(librfid, 0.1.0)
AC_PROG_CC
AM_PROG_CC_C_O
AC_C_CONST
AC_EXEEXT
AC_LIBTOOL_WIN32_DLL
AM_PROG_LIBTOOL
AC_SUBST(LIBTOOL_DEPS)
AC_MSG_CHECKING([for build environment])
case "$target_alias" in
*-mingw*) BUILDENV=WIN32;;
*-cygwin*) BUILDENV=WIN32;;
*) BUILDENV=UNIX;;
esac
AC_MSG_RESULT($BUILDENV)
AC_SUBST(BUILDENV)
AM_CONDITIONAL(ENABLE_WIN32, test "$BUILDENV" == "WIN32")
AM_CONDITIONAL(DISABLE_WIN32, test "$BUILDENV" != "WIN32")
AC_ARG_ENABLE(ccid,
[ --enable-ccid Include internal CCID driver for CM5121],
[MY_CCID=1], [MY_CCID=0])
# AC_SUBST(MY_CCID)
AM_CONDITIONAL(ENABLE_CCID, test "$MY_CCID" == "1")
dnl Enable/disable openct
AC_ARG_ENABLE(openct,
AC_HELP_STRING([--enable-openct], [Use (patched) OpenCT for CM5121 CCID access. [[default=no]]]),
[ENABLE_OPENCT="${enableval}"],
[ENABLE_OPENCT="no"])
OPENCT_MSG=no
if test "x${ENABLE_OPENCT}" = "xyes"; then
PKG_CHECK_MODULES(OPENCT, [libopenct], [
OPENCT_MSG=yes
AC_DEFINE(HAVE_OPENCT, 1, [Have OpenCT libraries and header files])
], [
OPENCT_MSG=no
])
AC_SUBST(OPENCT_CFLAGS)
AC_SUBST(OPENCT_LIBS)
fi
AM_CONDITIONAL(HAVE_OPENCT, test "x$OPENCT_MSG" = "xyes")
AC_ARG_WITH(firmware,
[ --with-firmware=PATH Compile for running inside firmware],
[FIRMWARE_PATH="$withval"], [FIRMWARE_PATH=""])
AC_SUBST(FIRMWARE_PATH)
AM_CONDITIONAL(ENABLE_FIRMWARE, test "$FIRMWARE_PATH" != "")
AC_ARG_ENABLE(static,
[ --enable-static Don't use dynamic allocations at all],
[ENABLE_STATIC=1], [ENABLE_STATIC=0])
AM_CONDITIONAL(ENABLE_STATIC, test "$ENABLE_STATIC" == "1")
AC_ARG_WITH()
AC_CHECK_LIB(usb, usb_close,,)
AM_CONDITIONAL(HAVE_LIBUSB, test "x$have_libusb" = "xyes")
dnl Output the makefile
AC_OUTPUT(Makefile etc/Makefile etc/udev/Makefile src/Makefile include/Makefile include/librfid/Makefile utils/Makefile src/librfid.pc win32/Makefile)
+630
View File
@@ -0,0 +1,630 @@
#! /bin/sh
# depcomp - compile a program generating dependencies as side-effects
scriptversion=2009-04-28.21; # UTC
# Copyright (C) 1999, 2000, 2003, 2004, 2005, 2006, 2007, 2009 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 outputing dependencies.
libtool Whether libtool is used (yes/no).
Report bugs to <bug-automake@gnu.org>.
EOF
exit $?
;;
-v | --v*)
echo "depcomp $scriptversion"
exit $?
;;
esac
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"
# 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
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 -eq 0; then :
else
rm -f "$tmpdepfile"
exit $stat
fi
mv "$tmpdepfile" "$depfile"
;;
gcc)
## 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).
## - 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 -eq 0; then :
else
rm -f "$tmpdepfile"
exit $stat
fi
rm -f "$depfile"
echo "$object : \\" > "$depfile"
alpha=ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz
## 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.
tr ' ' '
' < "$tmpdepfile" |
## 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.
## Some versions of the HPUX 10.20 sed can't process this invocation
## correctly. Breaking it into two sed invocations is a workaround.
sed -e 's/^\\$//' -e '/^$/d' -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 -eq 0; then :
else
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 ' ' '
' < "$tmpdepfile" \
| sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' | \
tr '
' ' ' >> "$depfile"
echo >> "$depfile"
# The second pass generates a dummy entry for each header file.
tr ' ' '
' < "$tmpdepfile" \
| sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' -e 's/$/:/' \
>> "$depfile"
else
# The sourcefile does not contain any dependencies, so just
# store a dummy comment line, to avoid errors with the Makefile
# "include basename.Plo" scheme.
echo "#dummy" > "$depfile"
fi
rm -f "$tmpdepfile"
;;
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.
dir=`echo "$object" | sed -e 's|/[^/]*$|/|'`
test "x$dir" = "x$object" && dir=
base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'`
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 -eq 0; then :
else
rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3"
exit $stat
fi
for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3"
do
test -f "$tmpdepfile" && break
done
if test -f "$tmpdepfile"; then
# Each line is of the form `foo.o: dependent.h'.
# Do two passes, one to just change these to
# `$object: dependent.h' and one to simply `dependent.h:'.
sed -e "s,^.*\.[a-z]*:,$object:," < "$tmpdepfile" > "$depfile"
# That's a tab and a space in the [].
sed -e 's,^.*\.[a-z]*:[ ]*,,' -e 's,$,:,' < "$tmpdepfile" >> "$depfile"
else
# The sourcefile does not contain any dependencies, so just
# store a dummy comment line, to avoid errors with the Makefile
# "include basename.Plo" scheme.
echo "#dummy" > "$depfile"
fi
rm -f "$tmpdepfile"
;;
icc)
# Intel's C compiler understands `-MD -MF file'. However on
# icc -MD -MF foo.d -c -o sub/foo.o sub/foo.c
# ICC 7.0 will fill foo.d with something like
# foo.o: sub/foo.c
# foo.o: sub/foo.h
# which is wrong. We want:
# sub/foo.o: sub/foo.c
# sub/foo.o: sub/foo.h
# sub/foo.c:
# sub/foo.h:
# ICC 7.1 will output
# foo.o: sub/foo.c sub/foo.h
# and will wrap long lines using \ :
# foo.o: sub/foo.c ... \
# sub/foo.h ... \
# ...
"$@" -MD -MF "$tmpdepfile"
stat=$?
if test $stat -eq 0; then :
else
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.
dir=`echo "$object" | sed -e 's|/[^/]*$|/|'`
test "x$dir" = "x$object" && dir=
base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'`
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 -eq 0; then :
else
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,^.*\.[a-z]*:,$object:," "$tmpdepfile" > "$depfile"
# Add `dependent.h:' lines.
sed -ne '2,${
s/^ *//
s/ \\*$//
s/$/:/
p
}' "$tmpdepfile" >> "$depfile"
else
echo "#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.
dir=`echo "$object" | sed -e 's|/[^/]*$|/|'`
test "x$dir" = "x$object" && dir=
base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'`
if test "$libtool" = yes; then
# With Tru64 cc, shared objects can also be used to make a
# static library. This mechanism is used in libtool 1.4 series to
# handle both shared and static libraries in a single compilation.
# With libtool 1.4, dependencies were output in $dir.libs/$base.lo.d.
#
# With libtool 1.5 this exception was removed, and libtool now
# 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.libs/$base.lo.d # libtool 1.4
tmpdepfile2=$dir$base.o.d # libtool 1.5
tmpdepfile3=$dir.libs/$base.o.d # libtool 1.5
tmpdepfile4=$dir.libs/$base.d # Compaq CCC V6.2-504
"$@" -Wc,-MD
else
tmpdepfile1=$dir$base.o.d
tmpdepfile2=$dir$base.d
tmpdepfile3=$dir$base.d
tmpdepfile4=$dir$base.d
"$@" -MD
fi
stat=$?
if test $stat -eq 0; then :
else
rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" "$tmpdepfile4"
exit $stat
fi
for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" "$tmpdepfile4"
do
test -f "$tmpdepfile" && break
done
if test -f "$tmpdepfile"; then
sed -e "s,^.*\.[a-z]*:,$object:," < "$tmpdepfile" > "$depfile"
# That's a tab and a space in the [].
sed -e 's,^.*\.[a-z]*:[ ]*,,' -e 's,$,:,' < "$tmpdepfile" >> "$depfile"
else
echo "#dummy" > "$depfile"
fi
rm -f "$tmpdepfile"
;;
#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:^[ ]*[^: ][^:][^:]*\:[ ]*:'"$object"'\: :' > "$tmpdepfile"
rm -f "$depfile"
cat < "$tmpdepfile" > "$depfile"
tr ' ' '
' < "$tmpdepfile" | \
## Some versions of the HPUX 10.20 sed can't process this invocation
## correctly. Breaking it into two sed invocations is a workaround.
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"
cat < "$tmpdepfile" > "$depfile"
sed '1,2d' "$tmpdepfile" | tr ' ' '
' | \
## Some versions of the HPUX 10.20 sed can't process this invocation
## correctly. Breaking it into two sed invocations is a workaround.
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:: \1 \\:p' >> "$depfile"
echo " " >> "$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:
+2
View File
@@ -0,0 +1,2 @@
SUBDIRS = udev
+560
View File
@@ -0,0 +1,560 @@
# Makefile.in generated by automake 1.11 from Makefile.am.
# @configure_input@
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
# 2003, 2004, 2005, 2006, 2007, 2008, 2009 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@
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@
target_triplet = @target@
subdir = etc
DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/configure.in
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
mkinstalldirs = $(install_sh) -d
CONFIG_CLEAN_FILES =
CONFIG_CLEAN_VPATH_FILES =
SOURCES =
DIST_SOURCES =
RECURSIVE_TARGETS = all-recursive check-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 uninstall-recursive
RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \
distclean-recursive maintainer-clean-recursive
AM_RECURSIVE_TARGETS = $(RECURSIVE_TARGETS:-recursive=) \
$(RECURSIVE_CLEAN_TARGETS:-recursive=) tags TAGS ctags CTAGS \
distdir
ETAGS = etags
CTAGS = ctags
DIST_SUBDIRS = $(SUBDIRS)
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
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"
ACLOCAL = @ACLOCAL@
AMTAR = @AMTAR@
AR = @AR@
AS = @AS@
AUTOCONF = @AUTOCONF@
AUTOHEADER = @AUTOHEADER@
AUTOMAKE = @AUTOMAKE@
AWK = @AWK@
BUILDENV = @BUILDENV@
CC = @CC@
CCDEPMODE = @CCDEPMODE@
CFLAGS = @CFLAGS@
CPP = @CPP@
CPPFLAGS = @CPPFLAGS@
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@
FIRMWARE_PATH = @FIRMWARE_PATH@
GREP = @GREP@
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@
LIBTOOL_DEPS = @LIBTOOL_DEPS@
LIPO = @LIPO@
LN_S = @LN_S@
LTLIBOBJS = @LTLIBOBJS@
MAKEINFO = @MAKEINFO@
MKDIR_P = @MKDIR_P@
NM = @NM@
NMEDIT = @NMEDIT@
OBJDUMP = @OBJDUMP@
OBJEXT = @OBJEXT@
OPENCT_CFLAGS = @OPENCT_CFLAGS@
OPENCT_LIBS = @OPENCT_LIBS@
OTOOL = @OTOOL@
OTOOL64 = @OTOOL64@
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@
RANLIB = @RANLIB@
SED = @SED@
SET_MAKE = @SET_MAKE@
SHELL = @SHELL@
STRIP = @STRIP@
VERSION = @VERSION@
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_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@
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 = @target@
target_alias = @target_alias@
target_cpu = @target_cpu@
target_os = @target_os@
target_vendor = @target_vendor@
to_host_path_cmd = @to_host_path_cmd@
top_build_prefix = @top_build_prefix@
top_builddir = @top_builddir@
top_srcdir = @top_srcdir@
SUBDIRS = udev
all: all-recursive
.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 etc/Makefile'; \
$(am__cd) $(top_srcdir) && \
$(AUTOMAKE) --gnu etc/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
$(am__aclocal_m4_deps):
mostlyclean-libtool:
-rm -f *.lo
clean-libtool:
-rm -rf .libs _libs
# 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.
$(RECURSIVE_TARGETS):
@failcom='exit 1'; \
for f in x $$MAKEFLAGS; do \
case $$f in \
*=* | --[!k]*);; \
*k*) failcom='fail=yes';; \
esac; \
done; \
dot_seen=no; \
target=`echo $@ | sed s/-recursive//`; \
list='$(SUBDIRS)'; 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"
$(RECURSIVE_CLEAN_TARGETS):
@failcom='exit 1'; \
for f in x $$MAKEFLAGS; do \
case $$f in \
*=* | --[!k]*);; \
*k*) failcom='fail=yes';; \
esac; \
done; \
dot_seen=no; \
case "$@" in \
distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \
*) list='$(SUBDIRS)' ;; \
esac; \
rev=''; for subdir in $$list; do \
if test "$$subdir" = "."; then :; else \
rev="$$subdir $$rev"; \
fi; \
done; \
rev="$$rev ."; \
target=`echo $@ | sed s/-recursive//`; \
for subdir in $$rev; do \
echo "Making $$target in $$subdir"; \
if test "$$subdir" = "."; then \
local_target="$$target-am"; \
else \
local_target="$$target"; \
fi; \
($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
|| eval $$failcom; \
done && test -z "$$fail"
tags-recursive:
list='$(SUBDIRS)'; for subdir in $$list; do \
test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \
done
ctags-recursive:
list='$(SUBDIRS)'; for subdir in $$list; do \
test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \
done
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; nonempty = 1; } \
END { if (nonempty) { for (i in files) print i; }; }'`; \
mkid -fID $$unique
tags: TAGS
TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
$(TAGS_FILES) $(LISP)
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; \
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; }; }'`; \
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
CTAGS: ctags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
$(TAGS_FILES) $(LISP)
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)$$unique" \
|| $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
$$unique
GTAGS:
here=`$(am__cd) $(top_builddir) && pwd` \
&& $(am__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 "$(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 \
test -d "$(distdir)/$$subdir" \
|| $(MKDIR_P) "$(distdir)/$$subdir" \
|| exit 1; \
fi; \
done
@list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
if test "$$subdir" = .; then :; else \
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
check-am: all-am
check: check-recursive
all-am: Makefile
installdirs: installdirs-recursive
installdirs-am:
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:
$(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)
-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-recursive
clean-am: clean-generic clean-libtool mostlyclean-am
distclean: distclean-recursive
-rm -f Makefile
distclean-am: clean-am distclean-generic distclean-tags
dvi: dvi-recursive
dvi-am:
html: html-recursive
html-am:
info: info-recursive
info-am:
install-data-am:
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 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:
.MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) ctags-recursive \
install-am install-strip tags-recursive
.PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \
all all-am check check-am clean clean-generic clean-libtool \
ctags ctags-recursive distclean 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 installdirs-am maintainer-clean \
maintainer-clean-generic mostlyclean mostlyclean-generic \
mostlyclean-libtool pdf pdf-am ps ps-am tags tags-recursive \
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:
+2
View File
@@ -0,0 +1,2 @@
EXTRA_DIST = librfid.rules
+358
View File
@@ -0,0 +1,358 @@
# Makefile.in generated by automake 1.11 from Makefile.am.
# @configure_input@
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
# 2003, 2004, 2005, 2006, 2007, 2008, 2009 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@
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@
target_triplet = @target@
subdir = etc/udev
DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/configure.in
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
mkinstalldirs = $(install_sh) -d
CONFIG_CLEAN_FILES =
CONFIG_CLEAN_VPATH_FILES =
SOURCES =
DIST_SOURCES =
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
ACLOCAL = @ACLOCAL@
AMTAR = @AMTAR@
AR = @AR@
AS = @AS@
AUTOCONF = @AUTOCONF@
AUTOHEADER = @AUTOHEADER@
AUTOMAKE = @AUTOMAKE@
AWK = @AWK@
BUILDENV = @BUILDENV@
CC = @CC@
CCDEPMODE = @CCDEPMODE@
CFLAGS = @CFLAGS@
CPP = @CPP@
CPPFLAGS = @CPPFLAGS@
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@
FIRMWARE_PATH = @FIRMWARE_PATH@
GREP = @GREP@
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@
LIBTOOL_DEPS = @LIBTOOL_DEPS@
LIPO = @LIPO@
LN_S = @LN_S@
LTLIBOBJS = @LTLIBOBJS@
MAKEINFO = @MAKEINFO@
MKDIR_P = @MKDIR_P@
NM = @NM@
NMEDIT = @NMEDIT@
OBJDUMP = @OBJDUMP@
OBJEXT = @OBJEXT@
OPENCT_CFLAGS = @OPENCT_CFLAGS@
OPENCT_LIBS = @OPENCT_LIBS@
OTOOL = @OTOOL@
OTOOL64 = @OTOOL64@
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@
RANLIB = @RANLIB@
SED = @SED@
SET_MAKE = @SET_MAKE@
SHELL = @SHELL@
STRIP = @STRIP@
VERSION = @VERSION@
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_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@
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 = @target@
target_alias = @target_alias@
target_cpu = @target_cpu@
target_os = @target_os@
target_vendor = @target_vendor@
to_host_path_cmd = @to_host_path_cmd@
top_build_prefix = @top_build_prefix@
top_builddir = @top_builddir@
top_srcdir = @top_srcdir@
EXTRA_DIST = librfid.rules
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 etc/udev/Makefile'; \
$(am__cd) $(top_srcdir) && \
$(AUTOMAKE) --gnu etc/udev/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
$(am__aclocal_m4_deps):
mostlyclean-libtool:
-rm -f *.lo
clean-libtool:
-rm -rf .libs _libs
tags: TAGS
TAGS:
ctags: CTAGS
CTAGS:
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:
$(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)
-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 \
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 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:
+13
View File
@@ -0,0 +1,13 @@
# This file is part of the librfid distribution
#
# udev rules file for supported readers
#
#
ACTION!="add", GOTO="librfid_rules_end"
SUBSYSTEM!="usb_device", GOTO="librfid_rules_end"
# Omnikey 5121
SYSFS{idVendor}=="076b", SYSFS{idProduct}=="5121", MODE="664", GROUP="users"
LABEL="librfid_rules_end"
+2
View File
@@ -0,0 +1,2 @@
SUBDIRS = librfid
+560
View File
@@ -0,0 +1,560 @@
# Makefile.in generated by automake 1.11 from Makefile.am.
# @configure_input@
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
# 2003, 2004, 2005, 2006, 2007, 2008, 2009 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@
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@
target_triplet = @target@
subdir = include
DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/configure.in
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
mkinstalldirs = $(install_sh) -d
CONFIG_CLEAN_FILES =
CONFIG_CLEAN_VPATH_FILES =
SOURCES =
DIST_SOURCES =
RECURSIVE_TARGETS = all-recursive check-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 uninstall-recursive
RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \
distclean-recursive maintainer-clean-recursive
AM_RECURSIVE_TARGETS = $(RECURSIVE_TARGETS:-recursive=) \
$(RECURSIVE_CLEAN_TARGETS:-recursive=) tags TAGS ctags CTAGS \
distdir
ETAGS = etags
CTAGS = ctags
DIST_SUBDIRS = $(SUBDIRS)
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
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"
ACLOCAL = @ACLOCAL@
AMTAR = @AMTAR@
AR = @AR@
AS = @AS@
AUTOCONF = @AUTOCONF@
AUTOHEADER = @AUTOHEADER@
AUTOMAKE = @AUTOMAKE@
AWK = @AWK@
BUILDENV = @BUILDENV@
CC = @CC@
CCDEPMODE = @CCDEPMODE@
CFLAGS = @CFLAGS@
CPP = @CPP@
CPPFLAGS = @CPPFLAGS@
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@
FIRMWARE_PATH = @FIRMWARE_PATH@
GREP = @GREP@
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@
LIBTOOL_DEPS = @LIBTOOL_DEPS@
LIPO = @LIPO@
LN_S = @LN_S@
LTLIBOBJS = @LTLIBOBJS@
MAKEINFO = @MAKEINFO@
MKDIR_P = @MKDIR_P@
NM = @NM@
NMEDIT = @NMEDIT@
OBJDUMP = @OBJDUMP@
OBJEXT = @OBJEXT@
OPENCT_CFLAGS = @OPENCT_CFLAGS@
OPENCT_LIBS = @OPENCT_LIBS@
OTOOL = @OTOOL@
OTOOL64 = @OTOOL64@
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@
RANLIB = @RANLIB@
SED = @SED@
SET_MAKE = @SET_MAKE@
SHELL = @SHELL@
STRIP = @STRIP@
VERSION = @VERSION@
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_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@
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 = @target@
target_alias = @target_alias@
target_cpu = @target_cpu@
target_os = @target_os@
target_vendor = @target_vendor@
to_host_path_cmd = @to_host_path_cmd@
top_build_prefix = @top_build_prefix@
top_builddir = @top_builddir@
top_srcdir = @top_srcdir@
SUBDIRS = librfid
all: all-recursive
.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 include/Makefile'; \
$(am__cd) $(top_srcdir) && \
$(AUTOMAKE) --gnu include/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
$(am__aclocal_m4_deps):
mostlyclean-libtool:
-rm -f *.lo
clean-libtool:
-rm -rf .libs _libs
# 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.
$(RECURSIVE_TARGETS):
@failcom='exit 1'; \
for f in x $$MAKEFLAGS; do \
case $$f in \
*=* | --[!k]*);; \
*k*) failcom='fail=yes';; \
esac; \
done; \
dot_seen=no; \
target=`echo $@ | sed s/-recursive//`; \
list='$(SUBDIRS)'; 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"
$(RECURSIVE_CLEAN_TARGETS):
@failcom='exit 1'; \
for f in x $$MAKEFLAGS; do \
case $$f in \
*=* | --[!k]*);; \
*k*) failcom='fail=yes';; \
esac; \
done; \
dot_seen=no; \
case "$@" in \
distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \
*) list='$(SUBDIRS)' ;; \
esac; \
rev=''; for subdir in $$list; do \
if test "$$subdir" = "."; then :; else \
rev="$$subdir $$rev"; \
fi; \
done; \
rev="$$rev ."; \
target=`echo $@ | sed s/-recursive//`; \
for subdir in $$rev; do \
echo "Making $$target in $$subdir"; \
if test "$$subdir" = "."; then \
local_target="$$target-am"; \
else \
local_target="$$target"; \
fi; \
($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
|| eval $$failcom; \
done && test -z "$$fail"
tags-recursive:
list='$(SUBDIRS)'; for subdir in $$list; do \
test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \
done
ctags-recursive:
list='$(SUBDIRS)'; for subdir in $$list; do \
test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \
done
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; nonempty = 1; } \
END { if (nonempty) { for (i in files) print i; }; }'`; \
mkid -fID $$unique
tags: TAGS
TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
$(TAGS_FILES) $(LISP)
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; \
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; }; }'`; \
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
CTAGS: ctags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
$(TAGS_FILES) $(LISP)
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)$$unique" \
|| $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
$$unique
GTAGS:
here=`$(am__cd) $(top_builddir) && pwd` \
&& $(am__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 "$(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 \
test -d "$(distdir)/$$subdir" \
|| $(MKDIR_P) "$(distdir)/$$subdir" \
|| exit 1; \
fi; \
done
@list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
if test "$$subdir" = .; then :; else \
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
check-am: all-am
check: check-recursive
all-am: Makefile
installdirs: installdirs-recursive
installdirs-am:
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:
$(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)
-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-recursive
clean-am: clean-generic clean-libtool mostlyclean-am
distclean: distclean-recursive
-rm -f Makefile
distclean-am: clean-am distclean-generic distclean-tags
dvi: dvi-recursive
dvi-am:
html: html-recursive
html-am:
info: info-recursive
info-am:
install-data-am:
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 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:
.MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) ctags-recursive \
install-am install-strip tags-recursive
.PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \
all all-am check check-am clean clean-generic clean-libtool \
ctags ctags-recursive distclean 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 installdirs-am maintainer-clean \
maintainer-clean-generic mostlyclean mostlyclean-generic \
mostlyclean-libtool pdf pdf-am ps ps-am tags tags-recursive \
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:
+13
View File
@@ -0,0 +1,13 @@
pkginclude_HEADERS = rfid.h rfid_scan.h rfid_asic.h rfid_asic_rc632.h \
rfid_layer2.h rfid_layer2_iso14443a.h \
rfid_layer2_iso14443b.h rfid_layer2_iso15693.h \
rfid_protocol.h rfid_protocol_tcl.h \
rfid_protocol_mifare_ul.h \
rfid_protocol_mifare_classic.h \
rfid_reader.h \
rfid_system.h \
rfid_access_mifare_classic.h \
rfid_reader_cm5121.h \
rfid_reader_openpcd.h
+467
View File
@@ -0,0 +1,467 @@
# Makefile.in generated by automake 1.11 from Makefile.am.
# @configure_input@
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
# 2003, 2004, 2005, 2006, 2007, 2008, 2009 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@
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@
target_triplet = @target@
subdir = include/librfid
DIST_COMMON = $(pkginclude_HEADERS) $(srcdir)/Makefile.am \
$(srcdir)/Makefile.in
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/configure.in
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
mkinstalldirs = $(install_sh) -d
CONFIG_CLEAN_FILES =
CONFIG_CLEAN_VPATH_FILES =
SOURCES =
DIST_SOURCES =
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__installdirs = "$(DESTDIR)$(pkgincludedir)"
HEADERS = $(pkginclude_HEADERS)
ETAGS = etags
CTAGS = ctags
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
ACLOCAL = @ACLOCAL@
AMTAR = @AMTAR@
AR = @AR@
AS = @AS@
AUTOCONF = @AUTOCONF@
AUTOHEADER = @AUTOHEADER@
AUTOMAKE = @AUTOMAKE@
AWK = @AWK@
BUILDENV = @BUILDENV@
CC = @CC@
CCDEPMODE = @CCDEPMODE@
CFLAGS = @CFLAGS@
CPP = @CPP@
CPPFLAGS = @CPPFLAGS@
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@
FIRMWARE_PATH = @FIRMWARE_PATH@
GREP = @GREP@
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@
LIBTOOL_DEPS = @LIBTOOL_DEPS@
LIPO = @LIPO@
LN_S = @LN_S@
LTLIBOBJS = @LTLIBOBJS@
MAKEINFO = @MAKEINFO@
MKDIR_P = @MKDIR_P@
NM = @NM@
NMEDIT = @NMEDIT@
OBJDUMP = @OBJDUMP@
OBJEXT = @OBJEXT@
OPENCT_CFLAGS = @OPENCT_CFLAGS@
OPENCT_LIBS = @OPENCT_LIBS@
OTOOL = @OTOOL@
OTOOL64 = @OTOOL64@
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@
RANLIB = @RANLIB@
SED = @SED@
SET_MAKE = @SET_MAKE@
SHELL = @SHELL@
STRIP = @STRIP@
VERSION = @VERSION@
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_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@
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 = @target@
target_alias = @target_alias@
target_cpu = @target_cpu@
target_os = @target_os@
target_vendor = @target_vendor@
to_host_path_cmd = @to_host_path_cmd@
top_build_prefix = @top_build_prefix@
top_builddir = @top_builddir@
top_srcdir = @top_srcdir@
pkginclude_HEADERS = rfid.h rfid_scan.h rfid_asic.h rfid_asic_rc632.h \
rfid_layer2.h rfid_layer2_iso14443a.h \
rfid_layer2_iso14443b.h rfid_layer2_iso15693.h \
rfid_protocol.h rfid_protocol_tcl.h \
rfid_protocol_mifare_ul.h \
rfid_protocol_mifare_classic.h \
rfid_reader.h \
rfid_system.h \
rfid_access_mifare_classic.h \
rfid_reader_cm5121.h \
rfid_reader_openpcd.h
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 include/librfid/Makefile'; \
$(am__cd) $(top_srcdir) && \
$(AUTOMAKE) --gnu include/librfid/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
$(am__aclocal_m4_deps):
mostlyclean-libtool:
-rm -f *.lo
clean-libtool:
-rm -rf .libs _libs
install-pkgincludeHEADERS: $(pkginclude_HEADERS)
@$(NORMAL_INSTALL)
test -z "$(pkgincludedir)" || $(MKDIR_P) "$(DESTDIR)$(pkgincludedir)"
@list='$(pkginclude_HEADERS)'; test -n "$(pkgincludedir)" || list=; \
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_HEADER) $$files '$(DESTDIR)$(pkgincludedir)'"; \
$(INSTALL_HEADER) $$files "$(DESTDIR)$(pkgincludedir)" || exit $$?; \
done
uninstall-pkgincludeHEADERS:
@$(NORMAL_UNINSTALL)
@list='$(pkginclude_HEADERS)'; test -n "$(pkgincludedir)" || list=; \
files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
test -n "$$files" || exit 0; \
echo " ( cd '$(DESTDIR)$(pkgincludedir)' && rm -f" $$files ")"; \
cd "$(DESTDIR)$(pkgincludedir)" && rm -f $$files
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; nonempty = 1; } \
END { if (nonempty) { for (i in files) print i; }; }'`; \
mkid -fID $$unique
tags: TAGS
TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
$(TAGS_FILES) $(LISP)
set x; \
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; }; }'`; \
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
CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
$(TAGS_FILES) $(LISP)
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)$$unique" \
|| $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
$$unique
GTAGS:
here=`$(am__cd) $(top_builddir) && pwd` \
&& $(am__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 "$(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 $(HEADERS)
installdirs:
for dir in "$(DESTDIR)$(pkgincludedir)"; do \
test -z "$$dir" || $(MKDIR_P) "$$dir"; \
done
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)
-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 distclean-tags
dvi: dvi-am
dvi-am:
html: html-am
html-am:
info: info-am
info-am:
install-data-am: install-pkgincludeHEADERS
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: uninstall-pkgincludeHEADERS
.MAKE: install-am install-strip
.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \
clean-libtool ctags distclean 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-pkgincludeHEADERS 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 uninstall uninstall-am uninstall-pkgincludeHEADERS
# 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:
+64
View File
@@ -0,0 +1,64 @@
#ifndef _RFID_H
#define _RFID_H
#include <stddef.h>
#include <sys/types.h>
#ifdef __MINGW32__
#define ENOTSUP 100
#define ETIMEDOUT 101
typedef unsigned char u_int8_t;
typedef unsigned short u_int16_t;
typedef unsigned long u_int32_t;
typedef unsigned long long u_int64_t;
#endif/*__MINGW32__*/
#ifdef __LIBRFID__
#include <librfid/rfid_system.h>
#ifdef DEBUG_LIBRFID
#ifdef LIBRFID_FIRMWARE
extern void debugp(const char *format, ...);
extern const char *hexdump(const void *data, unsigned int len);
#define rfid_hexdump(x, y) hexdump(x, y)
#define DEBUGP(x, args ...) debugp("%s(%d):%s: " x, __FILE__, __LINE__, __FUNCTION__, ## args)
#define DEBUGPC(x, args ...) debugp(x, ## args)
#else /* LIBRFID_FIRMWARE */
extern const char *rfid_hexdump(const void *data, unsigned int len);
#define DEBUGP(x, args ...) fprintf(stderr, "%s(%d):%s: " x, __FILE__, __LINE__, __FUNCTION__, ## args)
#define DEBUGPC(x, args ...) fprintf(stderr, x, ## args)
#endif /* LIBRFID_FIRMWARE */
#else /* DEBUG */
extern const char *rfid_hexdump(const void *data, unsigned int len);
#define DEBUGP(x, args ...)
#define DEBUGPC(x, args ...)
#endif /* DEBUG */
#ifndef ARRAY_SIZE
#define ARRAY_SIZE(x) (sizeof(x) / sizeof((x)[0]))
#endif
#endif /* __LIBRFID__ */
int rfid_init();
enum rfid_opt_level {
RFID_LEVEL_ASIC,
RFID_LEVEL_READER,
RFID_LEVEL_LAYER2,
RFID_LEVEL_LAYER3,
};
enum rfid_frametype {
RFID_14443A_FRAME_REGULAR,
RFID_14443B_FRAME_REGULAR,
RFID_MIFARE_FRAME,
};
#endif /* _RFID_H */
@@ -0,0 +1,46 @@
#ifndef _RFID_MIFARE_ACCESS_H
#define _RFID_MIFARE_ACCESS_H
struct mfcl_access_sect {
u_int8_t block[4];
};
int mfcl_compile_access(u_int8_t *encoded,
const struct mfcl_access_sect *ac);
int mfcl_parse_access(struct mfcl_access_sect *ac, u_int8_t *encoded);
enum mfcl_access_exp_data {
MFCL_ACCESS_NEVER = 0,
MFCL_ACCESS_KEY_A = 1,
MFCL_ACCESS_KEY_B = 2,
};
struct mfcl_access_exp_block {
u_int8_t read:2,
write:2,
inc:2,
dec:2;
};
struct mfcl_access_exp_acc {
u_int16_t key_a_rd:2,
key_a_wr:2,
acc_rd:2,
acc_wr:2,
key_b_rd:2,
key_b_wr:2;
};
struct mfcl_access_exp_sect {
struct mfcl_access_exp_block block[3];
struct mfcl_access_exp_acc acc;
};
void mfcl_access_to_exp(struct mfcl_access_exp_sect *exp,
const struct mfcl_access_sect *sect);
char *mfcl_access_exp_stringify(const struct mfcl_access_exp_block *exp);
char *mfcl_access_exp_acc_stringify(const struct mfcl_access_exp_acc *acc);
#endif
+55
View File
@@ -0,0 +1,55 @@
#ifndef _RFID_ASIC_H
#define _RFID_ASIC_H
enum rfid_frametype;
#include <librfid/rfid_asic_rc632.h>
/* a low-level transport, over which the ASIC layer can talk to its ASIC */
struct rfid_asic_transport {
char *name;
union {
struct rfid_asic_rc632_transport rc632;
} priv;
};
/* An instance handle to 'struct rfid_asic_transport' */
struct rfid_asic_transport_handle {
void *data; /* handle to stuff like even lower layers */
struct rfid_asic_transport *rat;
};
/* Some implementation-specific data. A reader will specify one of these for
* ASIC-specific parameters such as e.g. RC632 mod conductance */
struct rfid_asic_implementation {
union {
struct rfid_asic_rc632_impl rc632;
} priv;
};
struct rfid_asic_handle {
struct rfid_asic_transport_handle *rath;
unsigned int fc;
unsigned int mtu;
unsigned int mru;
union {
struct rfid_asic_rc632_handle rc632;
//struct rfid_asic_rc531_handle rc531;
} priv;
struct rfid_asic *asic;
};
struct rfid_asic {
char *name;
unsigned int fc; /* carrier frequency */
union {
struct rfid_asic_rc632 rc632;
//struct rfid_asic_rc531 rc531;
} priv;
};
#endif /* _RFID_ASIC_H */
@@ -0,0 +1,97 @@
#ifndef _RFID_ASIC_RC632_H
#define _RFID_ASIC_RC632_H
struct rfid_asic_transport_handle;
#include <librfid/rfid.h>
#include <librfid/rfid_asic.h>
struct rfid_asic_rc632_transport {
struct {
int (*reg_write)(struct rfid_asic_transport_handle *rath,
u_int8_t reg,
u_int8_t value);
int (*reg_read)(struct rfid_asic_transport_handle *rath,
u_int8_t reg,
u_int8_t *value);
int (*fifo_write)(struct rfid_asic_transport_handle *rath,
u_int8_t len,
const u_int8_t *buf,
u_int8_t flags);
int (*fifo_read)(struct rfid_asic_transport_handle *rath,
u_int8_t len,
u_int8_t *buf);
} fn;
};
struct rfid_asic_handle;
struct iso14443a_atqa;
struct iso14443a_anticol_cmd;
struct rfid_asic_rc632 {
struct {
int (*power_up)(struct rfid_asic_handle *h);
int (*power_down)(struct rfid_asic_handle *h);
int (*turn_on_rf)(struct rfid_asic_handle *h);
int (*turn_off_rf)(struct rfid_asic_handle *h);
int (*transceive)(struct rfid_asic_handle *h,
enum rfid_frametype,
const u_int8_t *tx_buf,
unsigned int tx_len,
u_int8_t *rx_buf,
unsigned int *rx_len,
u_int64_t timeout,
unsigned int flags);
struct {
int (*init)(struct rfid_asic_handle *h);
int (*transceive_sf)(struct rfid_asic_handle *h,
u_int8_t cmd,
struct iso14443a_atqa *atqa);
int (*transceive_acf)(struct rfid_asic_handle *h,
struct iso14443a_anticol_cmd *cmd,
unsigned int *bit_of_col);
int (*set_speed)(struct rfid_asic_handle *h,
unsigned int tx,
unsigned int speed);
} iso14443a;
struct {
int (*init)(struct rfid_asic_handle *h);
} iso14443b;
struct {
int (*init)(struct rfid_asic_handle *h);
} iso15693;
struct {
int (*setkey)(struct rfid_asic_handle *h,
const unsigned char *key);
int (*auth)(struct rfid_asic_handle *h, u_int8_t cmd,
u_int32_t serno, u_int8_t block);
} mifare_classic;
} fn;
};
struct rc632_transport_handle {
};
/* A handle to a specific RC632 chip */
struct rfid_asic_rc632_handle {
struct rc632_transport_handle th;
};
struct rfid_asic_rc632_impl_proto {
u_int8_t mod_conductance;
u_int8_t cw_conductance;
u_int8_t bitphase;
u_int8_t threshold;
};
struct rfid_asic_rc632_impl {
u_int32_t mru; /* maximum receive unit (PICC->PCD) */
u_int32_t mtu; /* maximum transmit unit (PCD->PICC) */
//struct rfid_asic_rc632_impl_proto proto[NUM_RFID_PROTOCOLS];
};
extern struct rfid_asic_handle * rc632_open(struct rfid_asic_transport_handle *th);
extern void rc632_close(struct rfid_asic_handle *h);
#endif
@@ -0,0 +1,84 @@
#ifndef _RFID_LAYER2_H
#define _RFID_LAYER2_H
#include <librfid/rfid.h>
struct rfid_layer2_handle;
struct rfid_reader_handle;
enum rfid_layer2_id {
RFID_LAYER2_NONE,
RFID_LAYER2_ISO14443A,
RFID_LAYER2_ISO14443B,
RFID_LAYER2_ISO15693,
};
/* 0...0xffff = global options, 0x10000...0x1ffff = private options */
#define RFID_OPT_L2_PRIV 0x00010000
enum rfid_layer2_opt {
RFID_OPT_LAYER2_UID = 0x0001,
RFID_OPT_LAYER2_PROTO_SUPP = 0x0002,
RFID_OPT_LAYER2_WUP = 0x0003,
};
struct rfid_layer2_handle *rfid_layer2_init(struct rfid_reader_handle *rh,
unsigned int id);
int rfid_layer2_open(struct rfid_layer2_handle *l2h);
int rfid_layer2_transceive(struct rfid_layer2_handle *l2h,
enum rfid_frametype frametype,
const unsigned char *tx_buf, unsigned int tx_len,
unsigned char *rx_buf, unsigned int *rx_len,
u_int64_t timeout, unsigned int flags);
int rfid_layer2_close(struct rfid_layer2_handle *l2h);
int rfid_layer2_fini(struct rfid_layer2_handle *l2h);
int rfid_layer2_getopt(struct rfid_layer2_handle *ph, int optname,
void *optval, unsigned int *optlen);
int rfid_layer2_setopt(struct rfid_layer2_handle *ph, int optname,
const void *optval, unsigned int optlen);
char *rfid_layer2_name(struct rfid_layer2_handle *l2h);
#ifdef __LIBRFID__
#include <librfid/rfid_layer2_iso14443a.h>
#include <librfid/rfid_layer2_iso14443b.h>
#include <librfid/rfid_layer2_iso15693.h>
struct rfid_layer2 {
unsigned int id;
char *name;
struct {
struct rfid_layer2_handle *(*init)(struct rfid_reader_handle *h);
int (*open)(struct rfid_layer2_handle *h);
int (*transceive)(struct rfid_layer2_handle *h,
enum rfid_frametype frametype,
const unsigned char *tx_buf,
unsigned int tx_len, unsigned char *rx_buf,
unsigned int *rx_len, u_int64_t timeout,
unsigned int flags);
int (*close)(struct rfid_layer2_handle *h);
int (*fini)(struct rfid_layer2_handle *h);
int (*getopt)(struct rfid_layer2_handle *h,
int optname, void *optval, unsigned int *optlen);
int (*setopt)(struct rfid_layer2_handle *h,
int optname, const void *optval,
unsigned int optlen);
} fn;
};
struct rfid_layer2_handle {
struct rfid_reader_handle *rh;
unsigned char uid[10]; /* triple size 14443a id is 10 bytes */
unsigned int uid_len;
unsigned int proto_supported;
unsigned int flags;
union {
struct iso14443a_handle iso14443a;
struct iso14443b_handle iso14443b;
struct iso15693_handle iso15693;
} priv;
struct rfid_layer2 *l2;
};
#endif /* __LIBRFID__ */
#endif
@@ -0,0 +1,95 @@
#ifndef _RFID_ISO14443A_H
#define _RFID_ISO14443A_H
enum rfid_14443a_opt {
RFID_OPT_14443A_SPEED_RX = 0x00010001,
RFID_OPT_14443A_SPEED_TX = 0x00010002,
RFID_OPT_14443A_ATQA = 0x00010003,
RFID_OPT_14443A_WUPA = 0x00010004,
};
enum rfid_14443_opt_speed {
RFID_14443A_SPEED_106K = 0x01,
RFID_14443A_SPEED_212K = 0x02,
RFID_14443A_SPEED_424K = 0x04,
RFID_14443A_SPEED_848K = 0x08,
};
#ifdef __LIBRFID__
#include <sys/types.h>
/* protocol definitions */
/* ISO 14443-3, Chapter 6.3.1 */
enum iso14443a_sf_cmd {
ISO14443A_SF_CMD_REQA = 0x26,
ISO14443A_SF_CMD_WUPA = 0x52,
ISO14443A_SF_CMD_OPT_TIMESLOT = 0x35, /* Annex C */
/* 40 to 4f and 78 to 7f: proprietary */
};
struct iso14443a_atqa {
u_int8_t bf_anticol:5,
rfu1:1,
uid_size:2;
u_int8_t proprietary:4,
rfu2:4;
} __attribute__((packed));
#define ISO14443A_HLTA 0x5000
/* ISO 14443-3, Chapter 6.3.2 */
struct iso14443a_anticol_cmd {
unsigned char sel_code;
unsigned char nvb;
unsigned char uid_bits[5];
} __attribute__((packed));
enum iso14443a_anticol_sel_code {
ISO14443A_AC_SEL_CODE_CL1 = 0x93,
ISO14443A_AC_SEL_CODE_CL2 = 0x95,
ISO14443A_AC_SEL_CODE_CL3 = 0x97,
};
#define ISO14443A_BITOFCOL_NONE 0xffffffff
struct iso14443a_handle {
unsigned int state;
unsigned int level;
unsigned int tcl_capable;
struct iso14443a_atqa atqa;
};
enum iso14443a_level {
ISO14443A_LEVEL_NONE,
ISO14443A_LEVEL_CL1,
ISO14443A_LEVEL_CL2,
ISO14443A_LEVEL_CL3,
};
enum iso14443a_state {
ISO14443A_STATE_ERROR,
ISO14443A_STATE_NONE,
ISO14443A_STATE_REQA_SENT,
ISO14443A_STATE_ATQA_RCVD,
ISO14443A_STATE_NO_BITFRAME_ANTICOL,
ISO14443A_STATE_ANTICOL_RUNNING,
ISO14443A_STATE_SELECTED,
};
/* Section 6.1.2 values in usec, rounded up to next usec */
#define ISO14443A_FDT_ANTICOL_LAST1 92 /* 1236 / fc = 91.15 usec */
#define ISO14443A_FDT_ANTICOL_LAST0 87 /* 1172 / fc = 86.43 usec */
#define ISO14443_CARRIER_FREQ 13560000
#define ISO14443A_FDT_OTHER_LAST1(n) (((n*128+84)*1000000)/ISO14443_CARRIER_FREQ)
#include <librfid/rfid_layer2.h>
extern const struct rfid_layer2 rfid_layer2_iso14443a;
#endif /* __LIBRFID__ */
#endif /* _ISO14443A_H */
@@ -0,0 +1,96 @@
#ifndef _RFID_LAYER2_ISO14443B_H
#define _RFID_LAYER2_ISO14443B_H
#include <librfid/rfid_layer2.h>
enum rfid_iso14443_opt {
RFID_OPT_14443B_CID = 0x00010001,
RFID_OPT_14443B_FSC = 0x00010002,
RFID_OPT_14443B_FSD = 0x00010003,
RFID_OPT_14443B_FWT = 0x00010004,
RFID_OPT_14443B_TR0 = 0x00010005,
RFID_OPT_14443B_TR1 = 0x00010006,
};
#ifdef __LIBRFID__
struct iso14443b_atqb {
unsigned char fifty;
unsigned char pupi[4];
unsigned char app_data[4];
struct {
unsigned char bit_rate_capability;
unsigned char protocol_type:4,
max_frame_size:4;
unsigned char fo:2,
adc:2,
fwi:4;
} __attribute__ ((packed)) protocol_info;
} __attribute__ ((packed));
struct iso14443b_attrib_hdr {
unsigned char one_d;
unsigned char identifier[4];
struct {
unsigned char rfu:2,
sof:1,
eof:1,
min_tr1:2,
min_tr0:2;
} __attribute__ ((packed)) param1;
struct {
unsigned char fsdi:4,
spd_out:2,
spd_in:2;
} __attribute__ ((packed)) param2;
struct {
unsigned char protocol_type:4,
rfu:4;
} __attribute__ ((packed)) param3;
struct {
unsigned char cid:4,
rfu:4;
} __attribute__ ((packed)) param4;
} __attribute__ ((packed));
struct iso14443b_handle {
unsigned int tcl_capable; /* do we support T=CL */
unsigned int cid; /* Card ID */
unsigned int fsc; /* max. frame size card */
unsigned int fsd; /* max. frame size reader */
unsigned int fwt; /* frame waiting time (in usec) */
unsigned int mbl; /* maximum buffer length */
unsigned int tr0; /* pcd-eof to picc-subcarrier-on */
unsigned int tr1; /* picc-subcarrier-on to picc-sof */
unsigned int flags;
unsigned int state;
};
enum {
ISO14443B_CID_SUPPORTED = 0x01,
ISO14443B_NAD_SUPPORTED = 0x02,
};
enum {
ISO14443B_STATE_ERROR,
ISO14443B_STATE_NONE,
ISO14443B_STATE_REQB_SENT,
ISO14443B_STATE_ATQB_RCVD,
ISO14443B_STATE_ATTRIB_SENT,
ISO14443B_STATE_SELECTED,
ISO14443B_STATE_HLTB_SENT,
ISO14443B_STATE_HALTED,
};
#include <librfid/rfid_layer2.h>
extern const struct rfid_layer2 rfid_layer2_iso14443b;
#endif /* __LIBRFID__ */
#endif
@@ -0,0 +1,177 @@
#ifndef _RFID_ISO15693_H
#define _RFID_ISO15693_H
#include <sys/types.h>
/*
07h = TagIt
04h = I.CODE
05h = Infineon
02h = ST
*/
/* protocol definitions */
#if 0
struct rfid_15693_handle;
struct rfid_layer2_15693t {
unsigned char *name;
struct {
int (*init)(struct iso15693_handle *handle);
int (*fini)(struct iso15693_handle *handle);
#if 0
int (*transceive_sf)(struct iso14443a_handle *handle,
unsigned char cmd,
struct iso14443a_atqa *atqa);
int (*transceive_acf)(struct iso14443a_handle *handle,
struct iso14443a_anticol_cmd *acf,
unsigned int *bit_of_col);
#endif
int (*transceive)(struct iso15693_handle *handle,
const unsigned char *tx_buf,
unsigned int tx_len,
unsigned char *rx_buf,
unsigned int *rx_len);
} fn;
union {
} priv;
};
#endif
struct iso15693_handle {
unsigned int state;
unsigned int ask100:1,
out256:1;
};
enum rfid_15693_state {
ISO15693_STATE_ERROR,
ISO15693_STATE_NONE,
};
enum rfid_15693_opt {
RFID_OPT_15693_MOD_DEPTH = 0x00010001,
RFID_OPT_15693_VCD_CODING = 0x00010002,
RFID_OPT_15693_VICC_SUBC = 0x00010003,
RFID_OPT_15693_VICC_SPEED = 0x00010004,
};
enum rfid_15693_opt_mod_depth {
RFID_15693_MOD_10ASK = 0x01,
RFID_15693_MOD_100ASK = 0x02,
};
enum rfid_15693_opt_vcd_coding {
RFID_15693_VCD_CODING_1OUT256 = 0x01,
RFID_15693_VCD_CODING_1OUT4 = 0x02,
};
enum rfid_15693_opt_vicc_subc {
RFID_15693_VICC_SUBC_SINGLE = 0x01,
RFID_15693_VICC_SUBC_DUAL = 0x02,
};
enum rfid_15693_opt_vicc_speed {
RFID_15693_VICC_SPEED_SLOW = 0x01,
RFID_15693_VICC_SPEED_FAST = 0x02,
};
#ifdef __LIBRFID__
#define ISO15693_UID_LEN 8
#define ISO15693_CRC_LEN 2
/* ISO 15693-3, Ch. 7.2 Table 3*/
enum iso15693_request_flags {
RFID_15693_F_SUBC_TWO = 0x01,
RFID_15693_F_RATE_HIGH = 0x02,
RFID_15693_F_INV_TABLE_5 = 0x04,
RFID_15693_F_PROT_OEXT = 0x08,
};
/* ISO 15693-3, Ch. 7.2 Table 4 */
enum iso15693_request_flags_table4 {
RFID_15693_F4_SELECTED = 0x10, /* only VICC in 'select' state */
RFID_15693_F4_ADDRESS = 0x20, /* request is addressed */
RFID_15693_F4_CUSTOM = 0x40,
};
/* ISO 15693-3, Ch. 7.2 Table 5 */
enum iso15693_request_flags_table5 {
RFID_15693_F5_AFI_PRES = 0x10, /* AFI is present */
RFID_15693_F5_NSLOTS_1 = 0x20, /* only 1 slot (instead of 16) */
RFID_15693_F5_CUSTOM = 0x40,
};
/* ISO 15963-3, Ch. 7.2 Figure 4 */
struct iso15693_request {
u_int8_t flags;
u_int8_t command;
u_int8_t data[0];
} __attribute__ ((packed));
/* ISO 15693, Ch. 7.3 Table 6 */
enum iso15693_response_flags {
RFID_15693_RF_ERROR = 0x01,
RFID_15693_RF_EXTENDED = 0x08,
};
/* ISO 15693, Ch. 7.3.2 Table 7 */
enum iso15693_response_errors {
RFID_15693_ERR_NOTSUPP = 0x01,
RFID_15693_ERR_INVALID = 0x02, /* command not recognized */
RFID_15693_ERR_UNKNOWN = 0x0f, /* unknown error */
RFID_15693_ERR_BLOCK_NA = 0x10, /* block not available */
RFID_15693_ERR_BLOCK_LOCKED = 0x11,
RFID_15693_ERR_BLOCK_LOCKED_CH = 0x12,
RFID_15693_ERR_BLOCK_NOTPROG = 0x13,
RFID_15693_ERR_BLOCK_NOTLOCK = 0x14,
};
/* ISO 15693, Ch. 7.4 */
enum iso15693_vicc_states {
RFID_15693_STATE_POWER_OFF,
RFID_15693_STATE_READY,
RFID_15693_STATE_QUIET,
RFID_15693_STATE_SELECTED,
};
/* ISO 15693, Ch. 9.1 Table 10*/
enum iso15693_commands {
/* Mandatory 0x01 .. 0x1f */
ISO15693_CMD_INVENTORY = 0x01,
ISO15693_CMD_STAY_QUIET = 0x02,
/* Optional 0x20 .. 0x9f */
ISO15693_CMD_READ_BLOCK_SINGLE = 0x20,
ISO15693_CMD_WRITE_BLOCK_SINGLE = 0x21,
ISO15693_CMD_LOCK_BLOCK = 0x22,
ISO15693_CMD_READ_BLOCK_MULTI = 0x23,
ISO15693_CMD_WRITE_BLOCK_MULTI = 0x24,
ISO15693_CMD_SELECT = 0x25,
ISO15693_CMD_RESET_TO_READY = 0x26,
ISO15693_CMD_WRITE_AFI = 0x27,
ISO15693_CMD_LOCK_AFI = 0x28,
ISO15693_CMD_WRITE_DSFID = 0x29,
ISO15693_CMD_LOCK_DSFID = 0x2a,
ISO15693_CMD_GET_SYSINFO = 0x2b,
ISO15693_CMD_GET_BLOCK_SECURITY = 0x2c,
/* Custom 0xa0 .. 0xdf */
ICODE_CMD_INVENTORY_READ = 0xa0,
ICODE_CMD_FAST_INVENTORY_READ = 0xa1,
ICODE_CMD_EAS_SET = 0xa2,
ICODE_CMD_EAS_RESET = 0xa3,
ICODE_CMD_EAS_LOCK = 0xa4,
ICODE_CMD_EAS_ALARM = 0xa5,
/* Proprietary 0xe0 .. 0xff */
};
#include <librfid/rfid_layer2.h>
extern const struct rfid_layer2 rfid_layer2_iso15693;
#endif /* __LIBRFID__ */
#endif /* _ISO15693_H */
@@ -0,0 +1,103 @@
#ifndef _RFID_PROTOCOL_H
#define _RFID_PROTOCOL_H
#include <librfid/rfid_layer2.h>
struct rfid_protocol_handle;
struct rfid_protocol_handle *
rfid_protocol_init(struct rfid_layer2_handle *l2h, unsigned int id);
int rfid_protocol_open(struct rfid_protocol_handle *ph);
int rfid_protocol_transceive(struct rfid_protocol_handle *ph,
const unsigned char *tx_buf, unsigned int tx_len,
unsigned char *rx_buf, unsigned int *rx_len,
unsigned int timeout, unsigned int flags);
int
rfid_protocol_read(struct rfid_protocol_handle *ph,
unsigned int page,
unsigned char *rx_data,
unsigned int *rx_len);
int
rfid_protocol_write(struct rfid_protocol_handle *ph,
unsigned int page,
unsigned char *tx_data,
unsigned int tx_len);
int rfid_protocol_fini(struct rfid_protocol_handle *ph);
int rfid_protocol_close(struct rfid_protocol_handle *ph);
int rfid_protocol_getopt(struct rfid_protocol_handle *ph, int optname,
void *optval, unsigned int *optlen);
int rfid_protocol_setopt(struct rfid_protocol_handle *ph, int optname,
const void *optval, unsigned int optlen);
char *rfid_protocol_name(struct rfid_protocol_handle *ph);
enum rfid_protocol_id {
RFID_PROTOCOL_UNKNOWN,
RFID_PROTOCOL_TCL,
RFID_PROTOCOL_MIFARE_UL,
RFID_PROTOCOL_MIFARE_CLASSIC,
NUM_RFID_PROTOCOLS
};
enum rfid_protocol_opt {
RFID_OPT_PROTO_ID,
RFID_OPT_PROTO_SIZE = 0x10000001,
};
#ifdef __LIBRFID__
struct rfid_protocol {
unsigned int id;
char *name;
struct {
struct rfid_protocol_handle *(*init)(struct rfid_layer2_handle *l2h);
int (*open)(struct rfid_protocol_handle *ph);
int (*close)(struct rfid_protocol_handle *ph);
int (*fini)(struct rfid_protocol_handle *ph);
/* transceive for session based transport protocols */
int (*transceive)(struct rfid_protocol_handle *ph,
const unsigned char *tx_buf,
unsigned int tx_len,
unsigned char *rx_buf,
unsigned int *rx_len,
unsigned int timeout,
unsigned int flags);
/* read/write for synchronous memory cards */
int (*read)(struct rfid_protocol_handle *ph,
unsigned int page,
unsigned char *rx_data,
unsigned int *rx_len);
int (*write)(struct rfid_protocol_handle *ph,
unsigned int page,
unsigned char *tx_data,
unsigned int tx_len);
int (*getopt)(struct rfid_protocol_handle *h,
int optname, void *optval, unsigned int *optlen);
int (*setopt)(struct rfid_protocol_handle *h,
int optname, const void *optval,
unsigned int optlen);
} fn;
};
#include <librfid/rfid_protocol_tcl.h>
#include <librfid/rfid_protocol_mifare_ul.h>
#include <librfid/rfid_protocol_mifare_classic.h>
struct rfid_protocol_handle {
struct rfid_layer2_handle *l2h;
struct rfid_protocol *proto;
union {
struct tcl_handle tcl;
} priv; /* priv has to be last, since
* it could contain additional
* private data over the end of
* sizeof(priv). */
};
#endif /* __LIBRFID__ */
#endif /* _RFID_PROTOCOL_H */
@@ -0,0 +1,41 @@
#ifndef _MIFARE_CLASSIC_H
#define _MIFARE_CLASSIC_H
#include <librfid/rfid_protocol.h>
#define MIFARE_CL_KEYA_DEFAULT "\xa0\xa1\xa2\xa3\xa4\xa5"
#define MIFARE_CL_KEYB_DEFAULT "\xb0\xb1\xb2\xb3\xb4\xb5"
#define MIFARE_CL_KEYA_DEFAULT_INFINEON "\xff\xff\xff\xff\xff\xff"
#define MIFARE_CL_KEYB_DEFAULT_INFINEON MIFARE_CL_KEYA_DEFAULT_INFINEON
#define MIFARE_CL_KEY_LEN (sizeof(MIFARE_CL_KEYA_DEFAULT)-1)
#define MIFARE_CL_PAGE_MAX 0xff
#define MIFARE_CL_PAGE_SIZE 20
#define RFID_CMD_MIFARE_AUTH1A 0x60
#define RFID_CMD_MIFARE_AUTH1B 0x61
enum rfid_proto_mfcl_opt {
RFID_OPT_P_MFCL_SIZE = 0x10000001,
};
#ifdef __LIBRFID__
extern const struct rfid_protocol rfid_protocol_mfcl;
#define MIFARE_CL_CMD_WRITE16 0xA0
#define MIFARE_CL_CMD_WRITE4 0xA2
#define MIFARE_CL_CMD_READ 0x30
#define MIFARE_CL_RESP_ACK 0x0a
#define MIFARE_CL_RESP_NAK 0x00
#endif /* __LIBRFID__ */
extern int mfcl_set_key(struct rfid_protocol_handle *ph, unsigned char *key);
extern int mfcl_auth(struct rfid_protocol_handle *ph, u_int8_t cmd, u_int8_t block);
#endif /* _MIFARE_CLASSIC_H */
@@ -0,0 +1,24 @@
#ifndef _RFID_PROTOCOL_MFUL_H
#define _RFID_PROTOCOL_MFUL_H
int rfid_mful_lock_page(struct rfid_protocol_handle *ph, unsigned int page);
int rfid_mful_lock_otp(struct rfid_protocol_handle *ph);
#define MIFARE_UL_PAGE_MAX 15
#ifdef __LIBRFID__
#define MIFARE_UL_CMD_WRITE 0xA2
#define MIFARE_UL_CMD_READ 0x30
#define MIFARE_UL_RESP_ACK 0x0a
#define MIFARE_UL_RESP_NAK 0x00
#define MIFARE_UL_PAGE_LOCK 2
#define MIFARE_UL_PAGE_OTP 3
extern const struct rfid_protocol rfid_protocol_mful;
#endif /* __LIBRFID__ */
#endif
@@ -0,0 +1,76 @@
#ifndef _RFID_PROTOCOL_TCL_H
#define _RFID_PROTOCOL_TCL_H
enum rfid_proto_tcl_opt {
RFID_OPT_P_TCL_ATS = 0x00010001,
RFID_OPT_P_TCL_ATS_LEN = 0x00010002,
};
#ifdef __LIBRFID__
enum tcl_transport_rate {
TCL_RATE_106 = 0x01,
TCL_RATE_212 = 0x02,
TCL_RATE_424 = 0x04,
TCL_RATE_848 = 0x08,
};
enum tcl_transport_transceive_flags {
TCL_TRANSP_F_TX_CRC = 0x01, /* transport adds TX CRC */
TCL_TRANSP_F_RX_CRC = 0x02,
};
struct tcl_handle {
/* derived from ats */
unsigned char *historical_bytes; /* points into ats */
unsigned int historical_len;
unsigned int fsc; /* max frame size accepted by card */
unsigned int fsd; /* max frame size accepted by reader */
unsigned int fwt; /* frame waiting time (in usec)*/
unsigned char ta; /* divisor information */
unsigned char sfgt; /* start-up frame guard time (in usec) */
/* otherwise determined */
unsigned int cid; /* Card ID */
unsigned int nad; /* Node Address */
unsigned int flags;
unsigned int state; /* protocol state */
unsigned int toggle; /* send toggle with next frame */
unsigned int ats_len;
unsigned char ats[256]; /* ATS cannot be bigger than FSD-2 bytes,
according to ISO 14443-4 5.2.2 */
};
enum tcl_handle_flags {
TCL_HANDLE_F_NAD_SUPPORTED = 0x0001,
TCL_HANDLE_F_CID_SUPPORTED = 0x0002,
TCL_HANDLE_F_NAD_USED = 0x0010,
TCL_HANDLE_F_CID_USED = 0x0020,
};
enum tcl_pcb_bits {
TCL_PCB_CID_FOLLOWING = 0x08,
TCL_PCB_NAD_FOLLOWING = 0x04,
};
enum tcl_pcd_state {
TCL_STATE_NONE = 0x00,
TCL_STATE_INITIAL,
TCL_STATE_RATS_SENT, /* waiting for ATS */
TCL_STATE_ATS_RCVD, /* ATS received */
TCL_STATE_PPS_SENT, /* waiting for PPS response */
TCL_STATE_ESTABLISHED, /* xchg transparent data */
TCL_STATE_DESELECT_SENT, /* waiting for DESELECT response */
TCL_STATE_DESELECTED, /* card deselected or HLTA'd */
};
extern const struct rfid_protocol rfid_protocol_tcl;
#endif /* __LIBRFID__ */
#endif
@@ -0,0 +1,85 @@
#ifndef _RFID_READER_H
#define _RFID_READER_H
#include <librfid/rfid_asic.h>
#include <librfid/rfid_layer2_iso14443a.h>
struct rfid_reader_handle;
struct rfid_reader {
char *name;
unsigned int id;
unsigned int l2_supported;
unsigned int proto_supported;
int (*get_api_version)(
struct rfid_reader_handle *h,
u_int8_t *version);
int (*get_environment)(
struct rfid_reader_handle *rh,
unsigned char num_bytes,
unsigned char *buf);
int (*set_environment)(
struct rfid_reader_handle *rh,
unsigned char num_bytes,
const unsigned char *buf);
int (*reset)(struct rfid_reader_handle *h);
int (*transceive)(struct rfid_reader_handle *h,
enum rfid_frametype frametype,
const unsigned char *tx_buf, unsigned int tx_len,
unsigned char *rx_buf, unsigned int *rx_len,
u_int64_t timeout, unsigned int flags);
struct rfid_reader_handle * (*open)(void *data);
void (*close)(struct rfid_reader_handle *h);
struct rfid_14443a_reader {
int (*init)(struct rfid_reader_handle *h);
int (*transceive_sf)(struct rfid_reader_handle *h,
unsigned char cmd,
struct iso14443a_atqa *atqa);
int (*transceive_acf)(struct rfid_reader_handle *h,
struct iso14443a_anticol_cmd *cmd,
unsigned int *bit_of_col);
int (*set_speed)(struct rfid_reader_handle *h,
unsigned int tx,
unsigned int speed);
unsigned int speed;
} iso14443a;
struct rfid_14443b_reader {
int (*init)(struct rfid_reader_handle *rh);
unsigned int speed;
} iso14443b;
struct rfid_15693_reader {
int (*init)(struct rfid_reader_handle *rh);
} iso15693;
struct rfid_mifare_classic_reader {
int (*setkey)(struct rfid_reader_handle *h, const unsigned char *key);
int (*auth)(struct rfid_reader_handle *h, u_int8_t cmd,
u_int32_t serno, u_int8_t block);
} mifare_classic;
};
enum rfid_reader_id {
RFID_READER_CM5121,
RFID_READER_PEGODA,
RFID_READER_OPENPCD,
};
struct rfid_reader_handle {
struct rfid_asic_handle *ah;
union {
} priv;
struct rfid_reader *reader;
};
extern struct rfid_reader_handle *
rfid_reader_open(void *data, unsigned int id);
extern void rfid_reader_close(struct rfid_reader_handle *rh);
#endif
@@ -0,0 +1,22 @@
#ifndef _RFID_READER_CM5121_H
#define _RFID_READER_CM5121_H
#include <librfid/rfid_reader.h>
#define CM5121_CW_CONDUCTANCE 0x3f
#define CM5121_MOD_CONDUCTANCE 0x3f
#define CM5121_14443A_BITPHASE 0xa9
#define CM5121_14443A_THRESHOLD 0xff
#define CM5121_14443B_BITPHASE 0xad
#define CM5121_14443B_THRESHOLD 0xff
extern int
PC_to_RDR_Escape(void *handle,
const unsigned char *tx_buf, size_t tx_len,
unsigned char *rx_buf, size_t *rx_len);
extern const struct rfid_reader rfid_reader_cm5121;
// extern struct rfid_asic_transport cm5121_ccid;
#endif
@@ -0,0 +1,102 @@
#ifndef _OPENPCD_PROTO_H
#define _OPENPCD_PROTO_H
/* This header file describes the USB protocol of the OpenPCD RFID reader */
#include <sys/types.h>
struct openpcd_hdr {
u_int8_t cmd; /* command. high nibble: class,
* low nibble: cmd */
u_int8_t flags;
u_int8_t reg; /* register */
u_int8_t val; /* value (in case of write *) */
u_int8_t data[0];
} __attribute__ ((packed));
#define OPCD_REV_LEN 16
struct openpcd_compile_version {
char svnrev[OPCD_REV_LEN];
char by[OPCD_REV_LEN];
char date[OPCD_REV_LEN];
} __attribute__ ((packed));
#define OPENPCD_FLAG_RESPOND 0x01 /* Response requested */
#define OPENPCD_FLAG_ERROR 0x80 /* An error occurred */
enum openpcd_cmd_class {
OPENPCD_CMD_CLS_GENERIC = 0x0,
/* PCD (reader) side */
OPENPCD_CMD_CLS_RC632 = 0x1,
//OPENPCD_CMD_CLS_LED = 0x2,
OPENPCD_CMD_CLS_SSC = 0x3,
OPENPCD_CMD_CLS_PWM = 0x4,
OPENPCD_CMD_CLS_ADC = 0x5,
/* PICC (transponder) side */
OPENPCD_CMD_CLS_PICC = 0xe,
OPENPCD_CMD_CLS_USBTEST = 0xf,
};
#define OPENPCD_REG_MAX 0x3f
#define OPENPCD_CMD_CLS(x) (x >> 4)
#define OPENPCD_CMD(x) (x & 0xf)
#define OPENPCD_CLS2CMD(x) (x << 4)
#define OPENPCD_CMD_GET_VERSION (0x1|OPENPCD_CLS2CMD(OPENPCD_CMD_CLS_GENERIC))
#define OPENPCD_CMD_SET_LED (0x2|OPENPCD_CLS2CMD(OPENPCD_CMD_CLS_GENERIC))
#define OPENPCD_CMD_GET_SERIAL (0x3|OPENPCD_CLS2CMD(OPENPCD_CMD_CLS_GENERIC))
#define OPENPCD_CMD_GET_API_VERSION (0x4|OPENPCD_CLS2CMD(OPENPCD_CMD_CLS_GENERIC))
#define OPENPCD_CMD_GET_ENVIRONMENT (0x5|OPENPCD_CLS2CMD(OPENPCD_CMD_CLS_GENERIC))
#define OPENPCD_CMD_SET_ENVIRONMENT (0x6|OPENPCD_CLS2CMD(OPENPCD_CMD_CLS_GENERIC))
#define OPENPCD_CMD_RESET (0x7|OPENPCD_CLS2CMD(OPENPCD_CMD_CLS_GENERIC))
/* CMD_CLS_RC632 */
#define OPENPCD_CMD_WRITE_REG (0x1|OPENPCD_CLS2CMD(OPENPCD_CMD_CLS_RC632))
#define OPENPCD_CMD_WRITE_FIFO (0x2|OPENPCD_CLS2CMD(OPENPCD_CMD_CLS_RC632))
#define OPENPCD_CMD_WRITE_VFIFO (0x3|OPENPCD_CLS2CMD(OPENPCD_CMD_CLS_RC632))
#define OPENPCD_CMD_REG_BITS_CLEAR (0x4|OPENPCD_CLS2CMD(OPENPCD_CMD_CLS_RC632))
#define OPENPCD_CMD_REG_BITS_SET (0x5|OPENPCD_CLS2CMD(OPENPCD_CMD_CLS_RC632))
#define OPENPCD_CMD_READ_REG (0x6|OPENPCD_CLS2CMD(OPENPCD_CMD_CLS_RC632))
#define OPENPCD_CMD_READ_FIFO (0x7|OPENPCD_CLS2CMD(OPENPCD_CMD_CLS_RC632))
#define OPENPCD_CMD_READ_VFIFO (0x8|OPENPCD_CLS2CMD(OPENPCD_CMD_CLS_RC632))
#define OPENPCD_CMD_DUMP_REGS (0x9|OPENPCD_CLS2CMD(OPENPCD_CMD_CLS_RC632))
#define OPENPCD_CMD_IRQ (0xa|OPENPCD_CLS2CMD(OPENPCD_CMD_CLS_RC632))
/* CMD_CLS_SSC */
#define OPENPCD_CMD_SSC_READ (0x1|OPENPCD_CLS2CMD(OPENPCD_CMD_CLS_SSC))
#define OPENPCD_CMD_SSC_WRITE (0x2|OPENPCD_CLS2CMD(OPENPCD_CMD_CLS_SSC))
/* CMD_CLS_PWM */
#define OPENPCD_CMD_PWM_ENABLE (0x1|OPENPCD_CLS2CMD(OPENPCD_CMD_CLS_PWM))
#define OPENPCD_CMD_PWM_DUTY_SET (0x2|OPENPCD_CLS2CMD(OPENPCD_CMD_CLS_PWM))
#define OPENPCD_CMD_PWM_DUTY_GET (0x3|OPENPCD_CLS2CMD(OPENPCD_CMD_CLS_PWM))
#define OPENPCD_CMD_PWM_FREQ_SET (0x4|OPENPCD_CLS2CMD(OPENPCD_CMD_CLS_PWM))
#define OPENPCD_CMD_PWM_FREQ_GET (0x5|OPENPCD_CLS2CMD(OPENPCD_CMD_CLS_PWM))
/* CMD_CLS_PICC */
#define OPENPCD_CMD_PICC_REG_WRITE (0x1|OPENPCD_CLS2CMD(OPENPCD_CMD_CLS_PICC))
#define OPENPCD_CMD_PICC_REG_READ (0x2|OPENPCD_CLS2CMD(OPENPCD_CMD_CLS_PICC))
/* CMD_CLS_ADC */
#define OPENPCD_CMD_ADC_READ (0x1|OPENPCD_CLS2CMD(OPENPCD_CMD_CLS_ADC))
/* CMD_CLS_USBTEST */
#define OPENPCD_CMD_USBTEST_IN (0x1|OPENPCD_CLS2CMD(OPENPCD_CMD_CLS_USBTEST))
#define OPENPCD_CMD_USBTEST_OUT (0x2|OPENPCD_CLS2CMD(OPENPCD_CMD_CLS_USBTEST))
/* FIXME */
#define OPENPCD_CMD_PIO_IRQ (0x3|OPENPCD_CLS2CMD(OPENPCD_CMD_CLS_USBTEST))
#define OPENPCD_VENDOR_ID 0x2342
#define OPENPCD_PRODUCT_ID 0x0001
#define OPENPCD_OUT_EP 0x01
#define OPENPCD_IN_EP 0x82
#define OPENPCD_IRQ_EP 0x83
extern const struct rfid_reader rfid_reader_openpcd;
#endif
+18
View File
@@ -0,0 +1,18 @@
#ifndef _RFID_SCAN_H
#define _RFID_SCAN_H
#include <librfid/rfid_reader.h>
#include <librfid/rfid_layer2.h>
#include <librfid/rfid_protocol.h>
struct rfid_layer2_handle *
rfid_layer2_scan(struct rfid_reader_handle *rh);
struct rfid_protocol_handle *
rfid_protocol_scan(struct rfid_layer2_handle *l2h);
int rfid_scan(struct rfid_reader_handle *rh,
struct rfid_layer2_handle **l2h,
struct rfid_protocol_handle **ph);
#endif /* _RFID_SCAN_H */
@@ -0,0 +1,57 @@
/* system / environment specific defines */
/* build for openpcd firmware */
//#define LIBRFID_FIRMWARE
/* build without dynamic allocations */
//#define LIBRFID_STATIC
#ifdef __LIBRFID__
#ifndef LIBRFID_STATIC
/* If we're not doing a firmware compile, then we just use the regular
* malloc()/free() functions as expected */
#define malloc_asic_handle(x) malloc(x)
#define free_asic_handle(x) free(x)
#define malloc_layer2_handle(x) malloc(x)
#define free_layer2_handle(x) free(x)
#define malloc_protocol_handle(x) malloc(x)
#define free_protocol_handle(x) free(x)
#define malloc_rat_handle(x) malloc(x)
#define free_rat_handle(x) free(x)
#define malloc_reader_handle(x) malloc(x)
#define free_reader_handle(x) free(x)
#else
/* If we're actually doing a firmware compile, then we use pre-allocated
* handles in order to avoid dynamic memory allocation. */
#define EMPTY_STATEMENT do {} while(0)
extern struct rfid_asic_handle rfid_ah;
#define malloc_asic_handle(x) &rfid_ah
#define free_asic_handle(x) EMPTY_STATEMENT
extern struct rfid_layer2_handle rfid_l2h;
#define malloc_layer2_handle(x) &rfid_l2h
#define free_layer2_handle(x) EMPTY_STATEMENT
extern struct rfid_protocol_handle rfid_ph;
#define malloc_protocol_handle(x) &rfid_ph
#define free_protocol_handle(x) EMPTY_STATEMENT
extern struct rfid_asic_transport_handle rfid_ath;
#define malloc_rat_handle(x) &rfid_ath
#define free_rat_handle(x) EMPTY_STATEMENT
extern struct rfid_reader_handle rfid_rh;
#define malloc_reader_handle(x) &rfid_rh
#define free_reader_handle(x) EMPTY_STATEMENT
#endif /* LIBRFID_STATIC */
#endif /* __LIBRFID__ */
+520
View File
@@ -0,0 +1,520 @@
#!/bin/sh
# install - install a program, script, or datafile
scriptversion=2009-04-28.21; # 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
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
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
trap '(exit $?); exit' 1 2 13 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 starting with `-'.
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
# Protect names starting with `-'.
case $dst in
-*) dst=./$dst;;
esac
# 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-writeable 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 -z "$d" && 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:
+73
View File
@@ -0,0 +1,73 @@
Name: librfid
Version: 0.1.0
Release: 1%{?dist}
Summary: The librfid is a Free Software RFID library
Group: System Environment/Libraries
License: GPL
URL: http://www.openmrtd.org/projects/librfid/
Source0: http://www.openmrtd.org/projects/librfid/files/%{name}-%{version}.tar.bz2
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildRequires: libusb-devel
%description
librfid is a Free Software RFID library. It implements the PCD (reader)
side protocol stack of ISO 14443 A, ISO 14443 B, ISO 15693,
Mifare Ultralight and Mifare Classic. Support for iCODE and
other 13.56MHz based transponders is planned.
%package devel
Summary: Development files for %{name}
Group: Development/Libraries
Requires: %{name} = %{version}-%{release}
%description devel
The %{name}-devel package contains libraries and header files for
developing applications that use %{name}.
%prep
%setup -q
%build
%configure --disable-static
make %{?_smp_mflags}
%install
rm -rf $RPM_BUILD_ROOT
make install DESTDIR=$RPM_BUILD_ROOT
find $RPM_BUILD_ROOT -name '*.la' -exec rm -f {} ';'
%clean
rm -rf $RPM_BUILD_ROOT
%post -p /sbin/ldconfig
%postun -p /sbin/ldconfig
%files
%defattr(-,root,root,-)
%doc COPYING README TODO
%{_libdir}/*.so.*
%{_bindir}/librfid-tool
%{_bindir}/mifare-tool
%{_bindir}/send_script
%files devel
%defattr(-,root,root,-)
%doc COPYING README TODO
%{_includedir}/*
%{_libdir}/*.so
%changelog
* Sat Dec 30 2006 Kushal Das <kushal@openpcd.org> 0.1.0-1
- Initial release
File diff suppressed because it is too large Load Diff
+376
View File
@@ -0,0 +1,376 @@
#! /bin/sh
# Common stub for a few missing GNU programs while installing.
scriptversion=2009-04-28.21; # UTC
# Copyright (C) 1996, 1997, 1999, 2000, 2002, 2003, 2004, 2005, 2006,
# 2008, 2009 Free Software Foundation, Inc.
# Originally 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
run=:
sed_output='s/.* --output[ =]\([^ ]*\).*/\1/p'
sed_minuso='s/.* -o \([^ ]*\).*/\1/p'
# In the cases where this matters, `missing' is being run in the
# srcdir already.
if test -f configure.ac; then
configure_ac=configure.ac
else
configure_ac=configure.in
fi
msg="missing on your system"
case $1 in
--run)
# Try to run requested program, and just exit if it succeeds.
run=
shift
"$@" && exit 0
# Exit code 63 means version mismatch. This often happens
# when the user try to use an ancient version of a tool on
# a file that requires a minimum version. In this case we
# we should proceed has if the program had been absent, or
# if --run hadn't been passed.
if test $? = 63; then
run=:
msg="probably too old"
fi
;;
-h|--h|--he|--hel|--help)
echo "\
$0 [OPTION]... PROGRAM [ARGUMENT]...
Handle \`PROGRAM [ARGUMENT]...' for when PROGRAM is missing, or return an
error status if there is no known handling for PROGRAM.
Options:
-h, --help display this help and exit
-v, --version output version information and exit
--run try to run the given command, and emulate it if it fails
Supported PROGRAM values:
aclocal touch file \`aclocal.m4'
autoconf touch file \`configure'
autoheader touch file \`config.h.in'
autom4te touch the output file, or create a stub one
automake touch all \`Makefile.in' files
bison create \`y.tab.[ch]', if possible, from existing .[ch]
flex create \`lex.yy.c', if possible, from existing .c
help2man touch the output file
lex create \`lex.yy.c', if possible, from existing .c
makeinfo touch the output file
tar try tar, gnutar, gtar, then tar without non-portable flags
yacc create \`y.tab.[ch]', if possible, from existing .[ch]
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
# normalize program name to check for.
program=`echo "$1" | sed '
s/^gnu-//; t
s/^gnu//; t
s/^g//; t'`
# Now exit if we have it, but it failed. Also exit now if we
# don't have it and --version was passed (most likely to detect
# the program). This is about non-GNU programs, so use $1 not
# $program.
case $1 in
lex*|yacc*)
# Not GNU programs, they don't have --version.
;;
tar*)
if test -n "$run"; then
echo 1>&2 "ERROR: \`tar' requires --run"
exit 1
elif test "x$2" = "x--version" || test "x$2" = "x--help"; then
exit 1
fi
;;
*)
if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
# We have it, but it failed.
exit 1
elif test "x$2" = "x--version" || test "x$2" = "x--help"; then
# Could not run --version or --help. This is probably someone
# running `$TOOL --version' or `$TOOL --help' to check whether
# $TOOL exists and not knowing $TOOL uses missing.
exit 1
fi
;;
esac
# If it does not exist, or fails to run (possibly an outdated version),
# try to emulate it.
case $program in
aclocal*)
echo 1>&2 "\
WARNING: \`$1' is $msg. You should only need it if
you modified \`acinclude.m4' or \`${configure_ac}'. You might want
to install the \`Automake' and \`Perl' packages. Grab them from
any GNU archive site."
touch aclocal.m4
;;
autoconf*)
echo 1>&2 "\
WARNING: \`$1' is $msg. You should only need it if
you modified \`${configure_ac}'. You might want to install the
\`Autoconf' and \`GNU m4' packages. Grab them from any GNU
archive site."
touch configure
;;
autoheader*)
echo 1>&2 "\
WARNING: \`$1' is $msg. You should only need it if
you modified \`acconfig.h' or \`${configure_ac}'. You might want
to install the \`Autoconf' and \`GNU m4' packages. Grab them
from any GNU archive site."
files=`sed -n 's/^[ ]*A[CM]_CONFIG_HEADER(\([^)]*\)).*/\1/p' ${configure_ac}`
test -z "$files" && files="config.h"
touch_files=
for f in $files; do
case $f in
*:*) touch_files="$touch_files "`echo "$f" |
sed -e 's/^[^:]*://' -e 's/:.*//'`;;
*) touch_files="$touch_files $f.in";;
esac
done
touch $touch_files
;;
automake*)
echo 1>&2 "\
WARNING: \`$1' is $msg. You should only need it if
you modified \`Makefile.am', \`acinclude.m4' or \`${configure_ac}'.
You might want to install the \`Automake' and \`Perl' packages.
Grab them from any GNU archive site."
find . -type f -name Makefile.am -print |
sed 's/\.am$/.in/' |
while read f; do touch "$f"; done
;;
autom4te*)
echo 1>&2 "\
WARNING: \`$1' is needed, but is $msg.
You might have modified some files without having the
proper tools for further handling them.
You can get \`$1' as part of \`Autoconf' from any GNU
archive site."
file=`echo "$*" | sed -n "$sed_output"`
test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"`
if test -f "$file"; then
touch $file
else
test -z "$file" || exec >$file
echo "#! /bin/sh"
echo "# Created by GNU Automake missing as a replacement of"
echo "# $ $@"
echo "exit 0"
chmod +x $file
exit 1
fi
;;
bison*|yacc*)
echo 1>&2 "\
WARNING: \`$1' $msg. You should only need it if
you modified a \`.y' file. You may need the \`Bison' package
in order for those modifications to take effect. You can get
\`Bison' from any GNU archive site."
rm -f y.tab.c y.tab.h
if test $# -ne 1; then
eval LASTARG="\${$#}"
case $LASTARG in
*.y)
SRCFILE=`echo "$LASTARG" | sed 's/y$/c/'`
if test -f "$SRCFILE"; then
cp "$SRCFILE" y.tab.c
fi
SRCFILE=`echo "$LASTARG" | sed 's/y$/h/'`
if test -f "$SRCFILE"; then
cp "$SRCFILE" y.tab.h
fi
;;
esac
fi
if test ! -f y.tab.h; then
echo >y.tab.h
fi
if test ! -f y.tab.c; then
echo 'main() { return 0; }' >y.tab.c
fi
;;
lex*|flex*)
echo 1>&2 "\
WARNING: \`$1' is $msg. You should only need it if
you modified a \`.l' file. You may need the \`Flex' package
in order for those modifications to take effect. You can get
\`Flex' from any GNU archive site."
rm -f lex.yy.c
if test $# -ne 1; then
eval LASTARG="\${$#}"
case $LASTARG in
*.l)
SRCFILE=`echo "$LASTARG" | sed 's/l$/c/'`
if test -f "$SRCFILE"; then
cp "$SRCFILE" lex.yy.c
fi
;;
esac
fi
if test ! -f lex.yy.c; then
echo 'main() { return 0; }' >lex.yy.c
fi
;;
help2man*)
echo 1>&2 "\
WARNING: \`$1' is $msg. You should only need it if
you modified a dependency of a manual page. You may need the
\`Help2man' package in order for those modifications to take
effect. You can get \`Help2man' from any GNU archive site."
file=`echo "$*" | sed -n "$sed_output"`
test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"`
if test -f "$file"; then
touch $file
else
test -z "$file" || exec >$file
echo ".ab help2man is required to generate this page"
exit $?
fi
;;
makeinfo*)
echo 1>&2 "\
WARNING: \`$1' is $msg. You should only need it if
you modified a \`.texi' or \`.texinfo' file, or any other file
indirectly affecting the aspect of the manual. The spurious
call might also be the consequence of using a buggy \`make' (AIX,
DU, IRIX). You might want to install the \`Texinfo' package or
the \`GNU make' package. Grab either from any GNU archive site."
# The file to touch is that specified with -o ...
file=`echo "$*" | sed -n "$sed_output"`
test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"`
if test -z "$file"; then
# ... or it is the one specified with @setfilename ...
infile=`echo "$*" | sed 's/.* \([^ ]*\) *$/\1/'`
file=`sed -n '
/^@setfilename/{
s/.* \([^ ]*\) *$/\1/
p
q
}' $infile`
# ... or it is derived from the source name (dir/f.texi becomes f.info)
test -z "$file" && file=`echo "$infile" | sed 's,.*/,,;s,.[^.]*$,,'`.info
fi
# If the file does not exist, the user really needs makeinfo;
# let's fail without touching anything.
test -f $file || exit 1
touch $file
;;
tar*)
shift
# We have already tried tar in the generic part.
# Look for gnutar/gtar before invocation to avoid ugly error
# messages.
if (gnutar --version > /dev/null 2>&1); then
gnutar "$@" && exit 0
fi
if (gtar --version > /dev/null 2>&1); then
gtar "$@" && exit 0
fi
firstarg="$1"
if shift; then
case $firstarg in
*o*)
firstarg=`echo "$firstarg" | sed s/o//`
tar "$firstarg" "$@" && exit 0
;;
esac
case $firstarg in
*h*)
firstarg=`echo "$firstarg" | sed s/h//`
tar "$firstarg" "$@" && exit 0
;;
esac
fi
echo 1>&2 "\
WARNING: I can't seem to be able to run \`tar' with the given arguments.
You may want to install GNU tar or Free paxutils, or check the
command line arguments."
exit 1
;;
*)
echo 1>&2 "\
WARNING: \`$1' is needed, and is $msg.
You might have modified some files without having the
proper tools for further handling them. Check the \`README' file,
it often tells you about the needed prerequisites for installing
this package. You may also peek at any GNU archive site, in case
some other package would contain this missing \`$1' program."
exit 1
;;
esac
exit 0
# 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:
+306
View File
@@ -0,0 +1,306 @@
diff -Nru openct-0.6.7/src/ifd/Makefile.am openct-0.6.7-rfid/src/ifd/Makefile.am
--- openct-0.6.7/src/ifd/Makefile.am 2006-04-21 08:37:58.000000000 +0200
+++ openct-0.6.7-rfid/src/ifd/Makefile.am 2006-05-27 19:32:21.000000000 +0200
@@ -20,7 +20,7 @@
ifd-wbeiuu.c \
\
proto-gbp.c proto-sync.c proto-t0.c proto-t1.c \
- proto-trans.c \
+ proto-trans.c proto-escape.c \
\
sys-sunray.c sys-solaris.c sys-bsd.c sys-linux.c sys-null.c sys-osx.c \
\
diff -Nru openct-0.6.7/src/ifd/ifd-ccid.c openct-0.6.7-rfid/src/ifd/ifd-ccid.c
--- openct-0.6.7/src/ifd/ifd-ccid.c 2006-04-24 21:52:03.000000000 +0200
+++ openct-0.6.7-rfid/src/ifd/ifd-ccid.c 2006-05-27 19:46:29.000000000 +0200
@@ -5,6 +5,9 @@
*
* 2005-04-20: Harald Welte <laforge@gnumonks.org>
* Add support for PCMCIA based CCID Device (CardMan 4040)
+ *
+ * 2005-05-22: Harald Welte <laforge@gnumonks.org>
+ * Add suport for OmniKey Cardman 5121 RFID extensions
*/
#include "internal.h"
@@ -122,6 +125,7 @@
#define SUPPORT_T0 0x1
#define SUPPORT_T1 0x2
+#define SUPPORT_ESCAPE 0x80
#define SUPPORT_50V 1
#define SUPPORT_33V 2
@@ -740,6 +744,12 @@
st->reader_type = TYPE_TPDU;
}
+ if (de.idVendor == 0x076b && de.idProduct == 0x5121) {
+ /* special handling of RFID part of OmniKey 5121 */
+ reader->nslots++; /* one virtual slot for RFID escape */
+ st->proto_support |= SUPPORT_ESCAPE;
+ }
+
return 0;
}
@@ -816,6 +826,13 @@
int any = 0;
int i, j, bits, stat;
+ if (st->proto_support & SUPPORT_ESCAPE
+ && slot == reader->nslots-1) {
+ ifd_debug(1, "virtual escape slot, setting card present\n");
+ *status = IFD_CARD_PRESENT;
+ return 0;
+ }
+
i = 1 + (slot / 4);
j = 2 * (slot % 4);
stat = 0;
@@ -880,6 +897,8 @@
return 0;
}
+static int ccid_set_protocol(ifd_reader_t *reader, int s, int proto);
+
/*
* Reset
*/
@@ -898,6 +917,13 @@
if (!(status & IFD_CARD_PRESENT))
return IFD_ERROR_NO_CARD;
+ if (st->proto_support & SUPPORT_ESCAPE
+ && slot == reader->nslots-1) {
+ ifd_debug(1, "slot: %d, setting atr to 0xff", slot);
+ *((char *)atr) = 0xff;
+ ccid_set_protocol(reader, slot, IFD_PROTOCOL_ESCAPE);
+ return 1;
+ }
memset(ctlbuf, 0, 3);
n = -1;
@@ -940,6 +966,17 @@
ifd_atr_info_t atr_info;
int r;
+ slot = &reader->slot[s];
+
+ /* If we support RFID escaping, we only allow ESCAPE protocol
+ * at the last (== virtual) slot */
+ if ((st->proto_support & SUPPORT_ESCAPE)
+ && (proto != IFD_PROTOCOL_ESCAPE)
+ && (s == reader->nslots-1)) {
+ ct_error("reader doesn't support this protocol at this slot\n");
+ return IFD_ERROR_NOT_SUPPORTED;
+ }
+
switch (proto) {
case IFD_PROTOCOL_T0:
if (!(st->proto_support & SUPPORT_T0)) {
@@ -953,13 +990,36 @@
return IFD_ERROR_NOT_SUPPORTED;
}
break;
+ case IFD_PROTOCOL_ESCAPE:
+ /* virtual "escape" fallthrough protocol for stacking RFID
+ * protocol stack on top of openct */
+ if (!(st->proto_support & SUPPORT_ESCAPE)) {
+ ct_error("reader does not support this protocol");
+ return IFD_ERROR_NOT_SUPPORTED;
+ }
+ if (s != reader->nslots-1) {
+ ct_error("reader doesn't support this protocol at this slot");
+ return IFD_ERROR_NOT_SUPPORTED;
+ }
+ p = ifd_protocol_new(IFD_PROTOCOL_ESCAPE,reader, slot->dad);
+ if (!p) {
+ ct_error("%s: internal error", reader->name);
+ return -1;
+ }
+ if (slot->proto) {
+ ifd_protocol_free(slot->proto);
+ slot->proto = NULL;
+ }
+ slot->proto = p;
+ st->icc_proto[s] = proto;
+ ifd_debug(1, "set protocol to ESCAPE\n");
+ return 0;
+ break;
default:
ct_error("protocol unknown");
return IFD_ERROR_NOT_SUPPORTED;
}
- slot = &reader->slot[s];
-
if (st->reader_type == TYPE_APDU) {
p = ifd_protocol_new(IFD_PROTOCOL_TRANSPARENT,
reader, slot->dad);
@@ -1103,6 +1163,27 @@
return 0;
}
+static int ccid_escape(ifd_reader_t *reader, int slot, void *sbuf,
+ size_t slen, void *rbuf, size_t rlen)
+{
+ unsigned char sendbuf[CCID_MAX_MSG_LEN];
+ unsigned char recvbuf[CCID_MAX_MSG_LEN];
+ int r;
+
+ ifd_debug(1, "slot: %d, slen %d, rlen %d", slot, slen, rlen);
+
+ r = ccid_prepare_cmd(reader, sendbuf, sizeof(sendbuf), slot,
+ CCID_CMD_ESCAPE, NULL, sbuf, slen);
+ if (r < 0)
+ return r;
+
+ r = ccid_command(reader, &sendbuf[0], r, recvbuf, sizeof(recvbuf));
+ if (r < 0)
+ return r;
+
+ return ccid_extract_data(&recvbuf, r, rbuf, rlen);
+}
+
static int
ccid_transparent(ifd_reader_t * reader, int slot,
const void *sbuf, size_t slen, void *rbuf, size_t rlen)
@@ -1177,6 +1258,7 @@
ccid_driver.transparent = ccid_transparent;
ccid_driver.send = ccid_send;
ccid_driver.recv = ccid_recv;
+ ccid_driver.escape = ccid_escape;
ifd_driver_register("ccid", &ccid_driver);
}
diff -Nru openct-0.6.7/src/ifd/init.c openct-0.6.7-rfid/src/ifd/init.c
--- openct-0.6.7/src/ifd/init.c 2006-04-21 08:37:58.000000000 +0200
+++ openct-0.6.7-rfid/src/ifd/init.c 2006-05-27 19:32:21.000000000 +0200
@@ -54,6 +54,7 @@
ifd_protocol_register(&ifd_protocol_2wire);
ifd_protocol_register(&ifd_protocol_3wire);
ifd_protocol_register(&ifd_protocol_eurochip);
+ ifd_protocol_register(&ifd_protocol_esc);
if (ifd_conf_get_integer("debug", &ival) >= 0 && ival > ct_config.debug)
ct_config.debug = ival;
diff -Nru openct-0.6.7/src/ifd/internal.h openct-0.6.7-rfid/src/ifd/internal.h
--- openct-0.6.7/src/ifd/internal.h 2006-04-21 08:37:58.000000000 +0200
+++ openct-0.6.7-rfid/src/ifd/internal.h 2006-05-27 19:32:21.000000000 +0200
@@ -118,6 +118,7 @@
extern struct ifd_protocol_ops ifd_protocol_2wire;
extern struct ifd_protocol_ops ifd_protocol_3wire;
extern struct ifd_protocol_ops ifd_protocol_eurochip;
+extern struct ifd_protocol_ops ifd_protocol_esc;
extern void ifd_acr30u_register(void);
extern void ifd_cardman_register(void);
diff -Nru openct-0.6.7/src/ifd/proto-escape.c openct-0.6.7-rfid/src/ifd/proto-escape.c
--- openct-0.6.7/src/ifd/proto-escape.c 1970-01-01 01:00:00.000000000 +0100
+++ openct-0.6.7-rfid/src/ifd/proto-escape.c 2006-05-27 19:32:21.000000000 +0200
@@ -0,0 +1,77 @@
+/*
+ * Escape protocol - simply pass everything to the reader driver's escape()
+ *
+ * This is required for exporting access to vendor-specific CCID extensions,
+ * such as the Omnikey CardMan 5121 RFID support.
+ *
+ * The higher-level applications select a virtual slot (the last available slot
+ * number). This virtual slot will automatically get the IFD_PROTOCOL_ESCAPE
+ * assgigned to it and can then be used to transceive() data to/from the CCID.
+ *
+ * It's a bit ugly, but I was unable to come up with something cleaner.
+ *
+ * Copyright (C) 2005, Harald Welte <laforge@gnumonks.org>
+ */
+
+#include "internal.h"
+#include <unistd.h>
+#include <stdlib.h>
+#include <string.h>
+
+static int
+escape_init(ifd_protocol_t *prot)
+{
+ ifd_reader_t *reader = prot->reader;
+ const ifd_driver_t *drv;
+
+ if (!reader || !(drv = reader->driver)
+ || !drv->ops || !drv->ops->escape)
+ return -1;
+ return 0;
+}
+
+static void
+escape_release(ifd_protocol_t *prot)
+{
+ /* NOP */
+}
+
+static int
+escape_set_param(ifd_protocol_t *prot, int type, long value)
+{
+ ct_error("set_pameter not supported");
+ return -1;
+}
+
+static int
+escape_get_param(ifd_protocol_t *prot, int type, long *result)
+{
+ ct_error("get_pameter not supported");
+ return -1;
+}
+
+static int
+escape_transceive(ifd_protocol_t *prot, int dad,
+ const void *sbuf, size_t slen,
+ void *rbuf, size_t rlen)
+{
+ ifd_reader_t *reader = prot->reader;
+ const ifd_driver_t *drv = reader->driver;
+
+ return drv->ops->escape(reader, dad, sbuf, slen, rbuf, rlen);
+}
+
+struct ifd_protocol_ops ifd_protocol_esc = {
+ IFD_PROTOCOL_ESCAPE, /* id */
+ "escape", /* name */
+ sizeof(ifd_protocol_t), /* size */
+ escape_init, /* init */
+ escape_release, /* release */
+ escape_set_param, /* set_param */
+ escape_get_param, /* get_param */
+ NULL, /* resynchronize */
+ escape_transceive, /* transceive */
+ NULL, /* sync_read */
+ NULL, /* sync_write */
+};
+
diff -Nru openct-0.6.7/src/include/openct/driver.h openct-0.6.7-rfid/src/include/openct/driver.h
--- openct-0.6.7/src/include/openct/driver.h 2006-04-21 08:37:58.000000000 +0200
+++ openct-0.6.7-rfid/src/include/openct/driver.h 2006-05-27 19:32:21.000000000 +0200
@@ -318,6 +318,11 @@
int (*sync_write)(ifd_reader_t *reader, int slot, int proto,
unsigned short addr,
const unsigned char *sbuf, size_t slen);
+
+ /*Support for transparent access to "escape" */
+ int (*escape)(ifd_reader_t *reader, int slot,
+ void *sbuf, size_t slen,
+ void *rbuf, size_t rlen);
};
extern void ifd_driver_register(const char *,
diff -Nru openct-0.6.7/src/include/openct/ifd.h openct-0.6.7-rfid/src/include/openct/ifd.h
--- openct-0.6.7/src/include/openct/ifd.h 2006-04-21 08:37:58.000000000 +0200
+++ openct-0.6.7-rfid/src/include/openct/ifd.h 2006-05-27 19:42:54.000000000 +0200
@@ -29,6 +29,8 @@
IFD_PROTOCOL_TLP, /* older Gemplus protocol */
IFD_PROTOCOL_GBP, /* Gemplus block protocol */
IFD_PROTOCOL_EUROCHIP, /* Eurochip Countercard */
+ IFD_PROTOCOL_TCL, /* ISO 14443-4 T=CL */
+ IFD_PROTOCOL_ESCAPE, /* Virtual 'escape' protocol */
IFD_PROTOCOL_TRANSPARENT = 128
};
+8
View File
@@ -0,0 +1,8 @@
all: pegoda
pegoda: pegoda.o
$(CC) -lusb -o $@ $^
clean:
rm -f pegoda *.o
+298
View File
@@ -0,0 +1,298 @@
/*
* (C) 2005 by Harald Welte <laforge@gnumonks.org>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2
* as published by the Free Software Foundation
*
* 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, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#include <stdlib.h>
#include <stdio.h>
#include <unistd.h>
#include <string.h>
#include <errno.h>
#include <usb.h>
#include "pegoda.h"
const char *
hexdump(const void *data, unsigned int len)
{
static char string[1024];
unsigned char *d = (unsigned char *) data;
unsigned int i, left;
string[0] = '\0';
left = sizeof(string);
for (i = 0; len--; i += 3) {
if (i >= sizeof(string) -4)
break;
snprintf(string+i, 4, " %02x", *d++);
}
return string;
}
struct pegoda_handle {
struct usb_dev_handle *handle;
unsigned char seq;
unsigned char snr[4];
};
struct usb_device *find_device(u_int16_t vendor, u_int16_t device)
{
struct usb_bus *bus;
for (bus = usb_get_busses(); bus; bus = bus->next) {
struct usb_device *dev;
for (dev = bus->devices; dev; dev = dev->next) {
if (dev->descriptor.idVendor == vendor &&
dev->descriptor.idProduct == device) {
return dev;
}
}
}
return NULL;
}
int pegoda_transceive(struct pegoda_handle *ph,
u_int8_t cmd, unsigned char *tx, unsigned int tx_len,
unsigned char *rx, unsigned int *rx_len)
{
unsigned char txbuf[256];
unsigned char rxbuf[256];
int rc;
unsigned int len_expected;
struct pegoda_cmd_hdr *hdr = (struct pegoda_cmd_hdr *)txbuf;
struct pegoda_cmd_hdr *rxhdr = (struct pegoda_cmd_hdr *)rxbuf;
hdr->seq = ++(ph->seq);
hdr->cmd = cmd;
hdr->len = htons(tx_len);
memcpy(txbuf + sizeof(*hdr), tx, tx_len);
printf("tx [%u]: %s\n", tx_len+sizeof(*hdr),
hexdump(txbuf, tx_len + sizeof(*hdr)));
rc = usb_bulk_write(ph->handle, 0x02, (char *)txbuf,
tx_len + sizeof(*hdr), 0);
if (rc < 0)
return rc;
rc = usb_bulk_read(ph->handle, 0x81, (char *)rxbuf, sizeof(rxbuf), 0);
if (rc <= 0)
return rc;
if (rc != 2) {
fprintf(stderr, "unexpected: received %u bytes as length?\n");
return -EIO;
}
printf("len [%u]: %s\n", rc, hexdump(rxbuf, rc));
len_expected = rxbuf[0];
if (len_expected > sizeof(rxbuf))
return -EIO;
rc = usb_bulk_read(ph->handle, 0x81, (char *)rxbuf, len_expected, 0);
if (rc <= 0)
return rc;
printf("rx [%u]: %s\n", rc, hexdump(rxbuf, rc));
if (rc < 4)
return -EIO;
if (rxhdr->seq != hdr->seq)
return -EIO;
*rx_len = ntohs(rxhdr->len);
memcpy(rx, rxbuf+sizeof(*rxhdr), rc-sizeof(*rxhdr));
return rxhdr->cmd;
}
struct pegoda_handle *pegoda_open(void)
{
struct usb_device *pegoda;
unsigned char rbuf[16];
unsigned int rlen = sizeof(rbuf);
struct pegoda_handle *ph;
usb_init();
usb_find_busses();
usb_find_devices();
pegoda = find_device(USB_VENDOR_PHILIPS, USB_DEVICE_PEGODA);
if (!pegoda)
return NULL;
ph = malloc(sizeof(*ph));
if (!ph)
return NULL;
memset(ph, 0, sizeof(*ph));
printf("found pegoda, %u configurations\n",
pegoda->descriptor.bNumConfigurations);
printf("config 2 [nr %u] has %u interfaces\n",
pegoda->config[1].bConfigurationValue,
pegoda->config[1].bNumInterfaces);
printf("config 2 interface 0 has %u altsettings\n",
pegoda->config[1].interface[0].num_altsetting);
ph->handle = usb_open(pegoda);
if (!ph->handle)
goto out_free;
if (usb_set_configuration(ph->handle, 2))
goto out_free;
printf("configuration 2 successfully set\n");
if (usb_claim_interface(ph->handle, 0))
goto out_free;
printf("interface 0 claimed\n");
if (usb_set_altinterface(ph->handle, 1))
goto out_free;
printf("alt setting 1 selected\n");
pegoda_transceive(ph, PEGODA_CMD_PCD_CONFIG, NULL, 0, rbuf, &rlen);
return ph;
out_free:
free(ph);
return NULL;
}
/* Transform crypto1 key from generic 6byte into rc632 specific 12byte */
static int
mifare_transform_key(const u_int8_t *key6, u_int8_t *key12)
{
int i;
u_int8_t ln;
u_int8_t hn;
for (i = 0; i < 6; i++) {
ln = key6[i] & 0x0f;
hn = key6[i] >> 4;
key12[i * 2 + 1] = (~ln << 4) | ln;
key12[i * 2] = (~hn << 4) | hn;
}
return 0;
}
static int pegoda_auth_e2(struct pegoda_handle *ph,
u_int8_t keynr, u_int8_t sector)
{
unsigned char buf[3];
unsigned char rbuf[16];
unsigned int rlen = sizeof(rbuf);
buf[0] = 0x60;
buf[1] = keynr; /* key number */
buf[2] = sector; /* sector */
rlen = sizeof(rbuf);
pegoda_transceive(ph, PEGODA_CMD_PICC_AUTH, buf, 3, rbuf, &rlen);
/* FIXME: check response */
return 0;
}
static int pegoda_auth_key(struct pegoda_handle *ph,
u_int8_t sector, const unsigned char *key6)
{
unsigned char buf[1+4+12+1];
unsigned char rbuf[16];
unsigned int rlen = sizeof(rbuf);
buf[0] = 0x60;
memcpy(buf+1, ph->snr, 4);
mifare_transform_key(key6, buf+5);
buf[17] = sector;
pegoda_transceive(ph, PEGODA_CMD_PICC_AUTH_KEY, buf, 18, rbuf, &rlen);
/* FIXME: check response */
return 0;
}
static int pegoda_read16(struct pegoda_handle *ph,
u_int8_t page, unsigned char *rx)
{
int rc;
unsigned int rlen = 16;
rc = pegoda_transceive(ph, PEGODA_CMD_PICC_READ,
&page, 1, rx, &rlen);
if (rlen != 16)
return -EIO;
return 0;
}
int main(int argc, char **argv)
{
unsigned char buf[256];
unsigned char rbuf[256];
unsigned int rlen = sizeof(rbuf);
struct pegoda_handle *ph;
int i;
ph = pegoda_open();
if (!ph)
exit(1);
/* LED off */
buf[0] = 0x00;
rlen = sizeof(rbuf);
pegoda_transceive(ph, PEGODA_CMD_SWITCH_LED, buf, 1, rbuf, &rlen);
/* anticollision */
buf[0] = 0x26;
rlen = sizeof(rbuf);
pegoda_transceive(ph, PEGODA_CMD_PICC_COMMON_REQUEST,
buf, 1, rbuf, &rlen);
buf[0] = 0x93;
memset(buf+1, 0, 5);
rlen = sizeof(rbuf);
pegoda_transceive(ph, PEGODA_CMD_PICC_CASC_ANTICOLL,
buf, 6, rbuf, &rlen);
memcpy(ph->snr, rbuf, 4);
buf[0] = 0x93;
memcpy(buf+1, ph->snr, 4);
rlen = sizeof(rbuf);
pegoda_transceive(ph, PEGODA_CMD_PICC_CASC_SELECT,
buf, 5, rbuf, &rlen);
for (i = 0; i < 16; i++) {
int j;
pegoda_auth_key(ph, i, "\xff\xff\xff\xff\xff\xff");
for (j = 0; j < 4; j++) {
pegoda_read16(ph, (i*4)+j, rbuf);
printf("read16[%u:%u] = %s\n", i,j,hexdump(rbuf, 16));
}
}
exit(0);
}
+140
View File
@@ -0,0 +1,140 @@
#ifndef _PEGODA_H
#define _PEGODA_H
/*
* (C) 2005 by Harald Welte <laforge@gnumonks.org>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2
* as published by the Free Software Foundation
*
* 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, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#define USB_VENDOR_PHILIPS 0x0742
#define USB_DEVICE_PEGODA 0xff01
/* header of a pegoda usb command packet */
struct pegoda_cmd_hdr {
u_int8_t seq;
u_int8_t cmd;
u_int16_t len;
};
enum {
PEGODA_CMD_WRITE_RC = 0x01,
PEGODA_CMD_READ_RC = 0x02,
PEGODA_CMD_EXCHANGE_BYTESTREAM = 0x03,
PEGODA_CMD_WRITE_MULTIPLE = 0x04,
PEGODA_CMD_READ_MULTIPLE = 0x05,
PEGODA_CMD_READ_WORD = 0x06,
PEGODA_CMD_PCD_CONFIG = 0x10,
PEGODA_CMD_PICC_REQUEST = 0x11,
PEGODA_CMD_PICC_ANTICOLL = 0x12,
PEGODA_CMD_PICC_SELECT = 0x13,
PEGODA_CMD_PICC_AUTH = 0x14,
PEGODA_CMD_PICC_AUTH_E2 = 0x15,
PEGODA_CMD_LOAD_KEY_E2 = 0x17,
PEGODA_CMD_PICC_AUTH_KEY = 0x18,
PEGODA_CMD_PICC_READ = 0x19,
PEGODA_CMD_PICC_WRITE = 0x1a,
PEGODA_CMD_PICC_VALUE = 0x1b,
PEGODA_CMD_PICC_VALUE_DEBIT = 0x1c,
PEGODA_CMD_PICC_HALT = 0x1d,
PEGODA_CMD_PICC_WRITE4 = 0x1e,
PEGODA_CMD_PICC_COMMON_WRITE = 0x1f,
PEGODA_CMD_PCD_RF_RESET = 0x20,
PEGODA_CMD_PCD_RESET = 0x21,
PEGODA_CMD_PCD_GET_SNR = 0x22,
PEGODA_CMD_PCD_READ_E2 = 0x23,
PEGODA_CMD_PCD_SET_TMO = 0x27,
PEGODA_CMD_PICC_COMMON_READ = 0x28,
PEGODA_CMD_PCD_INITIALIZE_E2 = 0x29,
PEGODA_CMD_ACTIVE_ANTENNA_MASTER = 0x2a,
PEGODA_CMD_ACTIVE_ANTENNA_SLAVE = 0x2b,
PEGODA_CMD_HOST_TRANS_TMR_START = 0x30,
PEGODA_CMD_HOST_TRANS_TMR_STOP = 0x31,
PEGODA_CMD_HOST_GET_EXEC_TIME = 0x32,
PEGODA_CMD_PICC_COMMON_REQUEST = 0x40,
PEGODA_CMD_PICC_CASC_ANTICOLL = 0x41,
PEGODA_CMD_PICC_CASC_SELECT = 0x42,
PEGODA_CMD_PICC_ACTIVATE_IDLE = 0x43,
PEGODA_CMD_PICC_ACTIVATE_WAKEUP = 0x44,
PEGODA_CMD_PCD_SET_DEFAULT_ATTRIB = 0x45,
PEGODA_CMD_PCD_SET_ATTRIB = 0x46,
PEGODA_CMD_PCD_GET_ATTRIB = 0x47,
PEGODA_CMD_PICC_EXCHANGE_BLOCK = 0x48,
PEGODA_CMD_PICC_ACTIVATE_IDLE_LOOP = 0x49,
PEGODA_CMD_PICC_ACTTIVATION = 0x4a,
PEGODA_CMD_PCD_ENABLE_HIGH_BAUD_RATES = 0x4b,
PEGODA_CMD_SWITCH_LED = 0x60,
PEGODA_CMD_TEST_FLASH_NR = 0x61,
PEGODA_CMD_START_DOWNLOAD = 0x62,
PEGODA_CMD_GET_FW_VERSION = 0x63,
PEGODA_CMD_GET_RIC_VERSION = 0x64,
PEGODA_CMD_ENABLE_DEBUG_PINS = 0x65,
PEGODA_CMD_MIRROR_DATA = 0x66,
PEGODA_CMD_TEST_CMDS = 0x67,
PEGODA_CMD_TEST_PCD = 0x70,
PEGODA_CMD_TEST_PICC = 0x71,
PEGODA_CMD_GET_ONLINE_STATUS = 0x72,
PEGODA_CMD_I1_PCD_CONFIG = 0x80,
PEGODA_CMD_I1_INIT_STD_MODE = 0x81,
PEGODA_CMD_I1_CALC_TSE_HASH = 0x82,
PEGODA_CMD_I1_INIT_FAST_MODE = 0x83,
PEGODA_CMD_I1_OUTPUT_READ = 0x85,
PEGODA_CMD_I1_OUTPUT_ANTICOL_SELECT = 0x86,
PEGODA_CMD_I1_OUTPUT_WRITE = 0x87,
PEGODA_CMD_I1_OUTPUT_HALT = 0x88,
PEGODA_CMD_I1_OUTPUT_EAS = 0x89,
PEGODA_CMD_I1_RESET_QUIET = 0x8a,
PEGODA_CMD_I1_PCD_RF_RESET = 0x8b,
PEGODA_CMD_I1_SET_BIT_PHASE = 0x8c,
PEGODA_CMD_I2_INIT_STD_MODE = 0x90,
PEGODA_CMD_I2_INIT_FAST_MODE = 0x91,
PEGODA_CMD_15693_READ_SM = 0x92,
PEGODA_CMD_15693_INVENTORY = 0x93,
PEGODA_CMD_15693_WRITE_SM = 0x94,
PEGODA_CMD_15693_STAY_QUIET = 0x95,
PEGODA_CMD_15693_LOCK_BLOCK = 0x96,
PEGODA_CMD_15693_SELECT = 0x97,
PEGODA_CMD_15693_RESET_TO_READY = 0x98,
PEGODA_CMD_15693_WRITE_AFI = 0x99,
PEGODA_CMD_15693_LOCK_AFI = 0x9a,
PEGODA_CMD_15693_WRITE_DSFID = 0x9b,
PEGODA_CMD_15693_LOCK_DSFID = 0x9c,
PEGODA_CMD_15693_GET_SYSTEM_INFO = 0x9d,
PEGODA_CMD_15693_GET_MULTI_BLOCK_SEC = 0x9e,
PEGODA_CMD_15693_INVENTORY_READ = 0x9f,
PEGODA_CMD_15693_FAST_INVENTORY_READ = 0xa0,
PEGODA_CMD_15693_SET_EAS = 0xa1,
PEGODA_CMD_15693_RESET_EAS = 0xa2,
PEGODA_CMD_15693_LOCK_EAS = 0xa3,
PEGODA_CMD_15693_EAS_ALARM = 0xa4,
PEGODA_CMD_PC_PCD_CONFIG = 0xb0,
PEGODA_CMD_PC_BEGIN_ROUND = 0xb1,
PEGODA_CMD_PC_WRITE = 0xb3,
PEGODA_CMD_UID_PCD_CONFIG = 0xb8,
PEGODA_CMD_UID_BEGIN_ROUND = 0xb9,
PEGODA_CMD_UID_WRITE = 0xba,
PEGODA_CMD_UID_DESTROY = 0xbb,
};
#endif
+34
View File
@@ -0,0 +1,34 @@
CC=gcc
PYTHON=python
PREFIX=/usr
PYTHON_VER=2.5
PYTHON_INC=$(PREFIX)/include/python$(PYTHON_VER)
PYTHON_LIB=$(PREFIX)/lib/python$(PYTHON_VER)/site-packages/
LIBRFID_DIR=../src/.libs/librfid.la
LIBUSB_DIR=/usr/local/lib
SOURCE_MAIN=pyrfid.c
SOURCES=$(SOURCE_MAIN) ../utils/common.c
INCLUDES=-I$(PYTHON_INC) -I../include/ -I../utils/
CFLAGS=-O3 -Wall $(INCLUDES)
LDFLAGS=-shared -L$(LIBRFID_DIR) -lrfid -L$(LIBUSB_DIR) -lusb -Wl,--rpath -Wl,/usr/local/lib $(LIBS)
TARGET=$(SOURCE_MAIN:.c=.so)
OBJECTS=$(SOURCES:.c=.o)
all: $(SOURCE_MAIN) $(TARGET)
test:
$(PYTHON) $@.py
install: $(TARGET)
install $(TARGET) $(PYTHON_LIB)
$(TARGET): $(OBJECTS)
$(CC) $(LDFLAGS) -o $@ $(OBJECTS)
.c.o:
$(CC) $(CFLAGS) -c $< -o $@
clean:
rm -f $(OBJECTS) $(TARGET)
+98
View File
@@ -0,0 +1,98 @@
/* Python bindings for librfid
* (C) 2007 by Kushal Das <kushal@openpcd.org>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2
* as published by the Free Software Foundation
*
* 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, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#include <stdio.h>
#include <unistd.h>
#include <stdlib.h>
#include <string.h>
#include <errno.h>
#include <libgen.h>
#include <librfid/rfid.h>
#include <librfid/rfid_scan.h>
#include <librfid/rfid_reader.h>
#include <librfid/rfid_layer2.h>
#include <librfid/rfid_protocol.h>
#include <librfid/rfid_protocol_mifare_classic.h>
#include <librfid/rfid_protocol_mifare_ul.h>
#include <common.h>
#include <Python.h>
static PyObject *pyi_open(PyObject *self, PyObject *args);
static PyObject *pyi_close(PyObject *self, PyObject *args);
static PyObject *pyi_rfidscan(PyObject *self, PyObject *args);
static PyObject *pyi_rfidlayeropt(PyObject *self, PyObject *args);
static PyObject *pyi_Error;
struct rfid_reader_handle *rh;
struct rfid_layer2_handle *l2h;
struct rfid_protocol_handle *ph;
static PyMethodDef pyi_Methods[] = {
{"open", pyi_open, METH_VARARGS,
"This will initialise the RFID reader"},
{"close", pyi_close, METH_VARARGS,
"This will close the RFID reader"},
{"scan", pyi_rfidscan, METH_VARARGS,
"This will scan for any card"},
{"get_id", pyi_rfidlayeropt, METH_VARARGS,
"This will read the id of the card"},
{NULL, NULL, 0, NULL}
};
PyMODINIT_FUNC initpyrfid() {
PyObject *m;
m = Py_InitModule("pyrfid", pyi_Methods);
pyi_Error = PyErr_NewException("pyrfid.error", NULL, NULL);
Py_INCREF(pyi_Error);
PyModule_AddObject(m, "error", pyi_Error);
return;
}
static PyObject *pyi_open(PyObject *self, PyObject *args) {
rfid_init();
rh = rfid_reader_open(NULL, RFID_READER_OPENPCD);
if (!rh)
return Py_BuildValue("i", 1);
else
return Py_BuildValue("i", 0);
}
static PyObject *pyi_close(PyObject *self, PyObject *args) {
rfid_reader_close(rh);
// Py_INCREF(Py_None);
// return Py_None;
return Py_BuildValue("i", 0);
}
static PyObject *pyi_rfidscan(PyObject *self, PyObject *args) {
int rc;
rc = rfid_scan(rh, &l2h, &ph);
return Py_BuildValue("i", rc);
}
static PyObject *pyi_rfidlayeropt(PyObject *self, PyObject *args) {
unsigned char uid_buf[16];
char card_id[16];
unsigned int uid_len = sizeof(uid_buf);
rfid_layer2_getopt(l2h, RFID_OPT_LAYER2_UID, &uid_buf,
&uid_len);
strcpy(card_id,hexdump(uid_buf, uid_len));
return Py_BuildValue("s", card_id);
}
+29
View File
@@ -0,0 +1,29 @@
#!/usr/bin/env python
#Python bindings test file
#(C) 2007 by Kushal Das <kushal@openpcd.org>
#This program is free software; you can redistribute it and/or modify
#it under the terms of the GNU General Public License version 2
#as published by the Free Software Foundation
#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, write to the Free Software
#Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
import pyrfid
res = pyrfid.open()
if res == 1:
print "No device found"
else:
print "We found a device :)"
while 1:
res = pyrfid.scan()
if res == 3:
print "The id of the card is %s" %(pyrfid.get_id())
pyrfid.close()
+52
View File
@@ -0,0 +1,52 @@
LIBVERSION= 0:0:0
if ENABLE_FIRMWARE
INCLUDES_FIRMWARE = -I$(FIRMWARE_PATH)/include -I$(FIRMWARE_PATH)/src -I$(GNUARM_PATH)/arm-elf/include
AM_CFLAGS_FIRMWARE = -DLIBRFID_FIRMWARE -DLIBRFID_STATIC -D__MS_types__
endif
if ENABLE_STATIC
AM_CFLAGS_STATIC = -DLIBRFID_STATIC
endif
noinst_HEADERS=rfid_iso14443_common.h rc632.h libusb_dyn.h usleep.h
CORE=rfid.c rfid_layer2.c rfid_protocol.c rfid_reader.c rfid_scan.c
L2=rfid_layer2_iso14443a.c rfid_layer2_iso14443b.c rfid_layer2_iso15693.c rfid_iso14443_common.c
PROTO=rfid_proto_tcl.c rfid_proto_mifare_ul.c rfid_proto_mifare_classic.c
ASIC=rfid_asic_rc632.c
READER=rfid_reader_openpcd.c
MISC=rfid_access_mifare_classic.c
if ENABLE_WIN32
WIN32=usleep.c libusb_dyn.c
AM_LDLAGS_WIN32=-mno-cygwin -lwinmm
AM_CFLAGS_WIN32=-mno-cygwin
endif
if ENABLE_CCID
READER_CM5121=rfid_reader_cm5121.c ccid/rfid_reader_cm5121_ccid_direct.c ccid/ccid-driver.c
AM_CFLAGS_CM5121= -DENABLE_CM5121
endif
if HAVE_OPENCT
READER_CM5121=rfid_reader_cm5121.c rfid_reader_cm5121_openct.c
AM_CFLAGS_CM5121= -DENABLE_CM5121
endif
INCLUDES = $(all_includes) -I$(top_srcdir)/include $(INCLUDES_FIRMWARE) \
$(INCLUDES_STATIC) @OPENCT_CFLAGS@
AM_CFLAGS = -std=gnu99 -D__LIBRFID__ $(AM_CFLAGS_FIRMWARE) $(AM_CFLAGS_STATIC) \
$(AM_CFLAGS_CM5121) $(AM_CFLAGS_WIN32)
lib_LTLIBRARIES = librfid.la
librfid_la_LDFLAGS = -Wc,-nostartfiles -version-info $(LIBVERSION) $(AM_LDFLAGS_WIN32) @OPENCT_LIBS@
librfid_la_SOURCES = $(CORE) $(L2) $(PROTO) $(ASIC) $(MISC) \
$(READER) $(READER_CM5121) $(WIN32)
if ENABLE_WIN32
librfid_la_LIBADD = -lwinmm
endif
pkgconfigdir = $(libdir)/pkgconfig
pkgconfig_DATA = librfid.pc
+643
View File
@@ -0,0 +1,643 @@
# Makefile.in generated by automake 1.11 from Makefile.am.
# @configure_input@
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
# 2003, 2004, 2005, 2006, 2007, 2008, 2009 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@
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@
target_triplet = @target@
subdir = src
DIST_COMMON = $(noinst_HEADERS) $(srcdir)/Makefile.am \
$(srcdir)/Makefile.in $(srcdir)/librfid.pc.in
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/configure.in
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
mkinstalldirs = $(install_sh) -d
CONFIG_CLEAN_FILES = librfid.pc
CONFIG_CLEAN_VPATH_FILES =
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__installdirs = "$(DESTDIR)$(libdir)" "$(DESTDIR)$(pkgconfigdir)"
LTLIBRARIES = $(lib_LTLIBRARIES)
librfid_la_DEPENDENCIES =
am__librfid_la_SOURCES_DIST = rfid.c rfid_layer2.c rfid_protocol.c \
rfid_reader.c rfid_scan.c rfid_layer2_iso14443a.c \
rfid_layer2_iso14443b.c rfid_layer2_iso15693.c \
rfid_iso14443_common.c rfid_proto_tcl.c rfid_proto_mifare_ul.c \
rfid_proto_mifare_classic.c rfid_asic_rc632.c \
rfid_access_mifare_classic.c rfid_reader_openpcd.c \
rfid_reader_cm5121.c ccid/rfid_reader_cm5121_ccid_direct.c \
ccid/ccid-driver.c rfid_reader_cm5121_openct.c usleep.c \
libusb_dyn.c
am__objects_1 = rfid.lo rfid_layer2.lo rfid_protocol.lo rfid_reader.lo \
rfid_scan.lo
am__objects_2 = rfid_layer2_iso14443a.lo rfid_layer2_iso14443b.lo \
rfid_layer2_iso15693.lo rfid_iso14443_common.lo
am__objects_3 = rfid_proto_tcl.lo rfid_proto_mifare_ul.lo \
rfid_proto_mifare_classic.lo
am__objects_4 = rfid_asic_rc632.lo
am__objects_5 = rfid_access_mifare_classic.lo
am__objects_6 = rfid_reader_openpcd.lo
@ENABLE_CCID_FALSE@@HAVE_OPENCT_TRUE@am__objects_7 = \
@ENABLE_CCID_FALSE@@HAVE_OPENCT_TRUE@ rfid_reader_cm5121.lo \
@ENABLE_CCID_FALSE@@HAVE_OPENCT_TRUE@ rfid_reader_cm5121_openct.lo
@ENABLE_CCID_TRUE@am__objects_7 = rfid_reader_cm5121.lo \
@ENABLE_CCID_TRUE@ rfid_reader_cm5121_ccid_direct.lo \
@ENABLE_CCID_TRUE@ ccid-driver.lo
@ENABLE_WIN32_TRUE@am__objects_8 = usleep.lo libusb_dyn.lo
am_librfid_la_OBJECTS = $(am__objects_1) $(am__objects_2) \
$(am__objects_3) $(am__objects_4) $(am__objects_5) \
$(am__objects_6) $(am__objects_7) $(am__objects_8)
librfid_la_OBJECTS = $(am_librfid_la_OBJECTS)
librfid_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \
$(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
$(librfid_la_LDFLAGS) $(LDFLAGS) -o $@
DEFAULT_INCLUDES = -I.@am__isrc@
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) --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 = $(librfid_la_SOURCES)
DIST_SOURCES = $(am__librfid_la_SOURCES_DIST)
DATA = $(pkgconfig_DATA)
HEADERS = $(noinst_HEADERS)
ETAGS = etags
CTAGS = ctags
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
ACLOCAL = @ACLOCAL@
AMTAR = @AMTAR@
AR = @AR@
AS = @AS@
AUTOCONF = @AUTOCONF@
AUTOHEADER = @AUTOHEADER@
AUTOMAKE = @AUTOMAKE@
AWK = @AWK@
BUILDENV = @BUILDENV@
CC = @CC@
CCDEPMODE = @CCDEPMODE@
CFLAGS = @CFLAGS@
CPP = @CPP@
CPPFLAGS = @CPPFLAGS@
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@
FIRMWARE_PATH = @FIRMWARE_PATH@
GREP = @GREP@
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@
LIBTOOL_DEPS = @LIBTOOL_DEPS@
LIPO = @LIPO@
LN_S = @LN_S@
LTLIBOBJS = @LTLIBOBJS@
MAKEINFO = @MAKEINFO@
MKDIR_P = @MKDIR_P@
NM = @NM@
NMEDIT = @NMEDIT@
OBJDUMP = @OBJDUMP@
OBJEXT = @OBJEXT@
OPENCT_CFLAGS = @OPENCT_CFLAGS@
OPENCT_LIBS = @OPENCT_LIBS@
OTOOL = @OTOOL@
OTOOL64 = @OTOOL64@
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@
RANLIB = @RANLIB@
SED = @SED@
SET_MAKE = @SET_MAKE@
SHELL = @SHELL@
STRIP = @STRIP@
VERSION = @VERSION@
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_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@
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 = @target@
target_alias = @target_alias@
target_cpu = @target_cpu@
target_os = @target_os@
target_vendor = @target_vendor@
to_host_path_cmd = @to_host_path_cmd@
top_build_prefix = @top_build_prefix@
top_builddir = @top_builddir@
top_srcdir = @top_srcdir@
LIBVERSION = 0:0:0
@ENABLE_FIRMWARE_TRUE@INCLUDES_FIRMWARE = -I$(FIRMWARE_PATH)/include -I$(FIRMWARE_PATH)/src -I$(GNUARM_PATH)/arm-elf/include
@ENABLE_FIRMWARE_TRUE@AM_CFLAGS_FIRMWARE = -DLIBRFID_FIRMWARE -DLIBRFID_STATIC -D__MS_types__
@ENABLE_STATIC_TRUE@AM_CFLAGS_STATIC = -DLIBRFID_STATIC
noinst_HEADERS = rfid_iso14443_common.h rc632.h libusb_dyn.h usleep.h
CORE = rfid.c rfid_layer2.c rfid_protocol.c rfid_reader.c rfid_scan.c
L2 = rfid_layer2_iso14443a.c rfid_layer2_iso14443b.c rfid_layer2_iso15693.c rfid_iso14443_common.c
PROTO = rfid_proto_tcl.c rfid_proto_mifare_ul.c rfid_proto_mifare_classic.c
ASIC = rfid_asic_rc632.c
READER = rfid_reader_openpcd.c
MISC = rfid_access_mifare_classic.c
@ENABLE_WIN32_TRUE@WIN32 = usleep.c libusb_dyn.c
@ENABLE_WIN32_TRUE@AM_LDLAGS_WIN32 = -mno-cygwin -lwinmm
@ENABLE_WIN32_TRUE@AM_CFLAGS_WIN32 = -mno-cygwin
@ENABLE_CCID_TRUE@READER_CM5121 = rfid_reader_cm5121.c ccid/rfid_reader_cm5121_ccid_direct.c ccid/ccid-driver.c
@HAVE_OPENCT_TRUE@READER_CM5121 = rfid_reader_cm5121.c rfid_reader_cm5121_openct.c
@ENABLE_CCID_TRUE@AM_CFLAGS_CM5121 = -DENABLE_CM5121
@HAVE_OPENCT_TRUE@AM_CFLAGS_CM5121 = -DENABLE_CM5121
INCLUDES = $(all_includes) -I$(top_srcdir)/include $(INCLUDES_FIRMWARE) \
$(INCLUDES_STATIC) @OPENCT_CFLAGS@
AM_CFLAGS = -std=gnu99 -D__LIBRFID__ $(AM_CFLAGS_FIRMWARE) $(AM_CFLAGS_STATIC) \
$(AM_CFLAGS_CM5121) $(AM_CFLAGS_WIN32)
lib_LTLIBRARIES = librfid.la
librfid_la_LDFLAGS = -Wc,-nostartfiles -version-info $(LIBVERSION) $(AM_LDFLAGS_WIN32) @OPENCT_LIBS@
librfid_la_SOURCES = $(CORE) $(L2) $(PROTO) $(ASIC) $(MISC) \
$(READER) $(READER_CM5121) $(WIN32)
@ENABLE_WIN32_TRUE@librfid_la_LIBADD = -lwinmm
pkgconfigdir = $(libdir)/pkgconfig
pkgconfig_DATA = librfid.pc
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 ) \
&& { if test -f $@; then exit 0; else break; fi; }; \
exit 1;; \
esac; \
done; \
echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/Makefile'; \
$(am__cd) $(top_srcdir) && \
$(AUTOMAKE) --gnu src/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
$(am__aclocal_m4_deps):
librfid.pc: $(top_builddir)/config.status $(srcdir)/librfid.pc.in
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@
install-libLTLIBRARIES: $(lib_LTLIBRARIES)
@$(NORMAL_INSTALL)
test -z "$(libdir)" || $(MKDIR_P) "$(DESTDIR)$(libdir)"
@list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \
list2=; for p in $$list; do \
if test -f $$p; then \
list2="$$list2 $$p"; \
else :; fi; \
done; \
test -z "$$list2" || { \
echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(libdir)'"; \
$(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(libdir)"; \
}
uninstall-libLTLIBRARIES:
@$(NORMAL_UNINSTALL)
@list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \
for p in $$list; do \
$(am__strip_dir) \
echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(libdir)/$$f'"; \
$(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(libdir)/$$f"; \
done
clean-libLTLIBRARIES:
-test -z "$(lib_LTLIBRARIES)" || rm -f $(lib_LTLIBRARIES)
@list='$(lib_LTLIBRARIES)'; for p in $$list; do \
dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \
test "$$dir" != "$$p" || dir=.; \
echo "rm -f \"$${dir}/so_locations\""; \
rm -f "$${dir}/so_locations"; \
done
librfid.la: $(librfid_la_OBJECTS) $(librfid_la_DEPENDENCIES)
$(librfid_la_LINK) -rpath $(libdir) $(librfid_la_OBJECTS) $(librfid_la_LIBADD) $(LIBS)
mostlyclean-compile:
-rm -f *.$(OBJEXT)
distclean-compile:
-rm -f *.tab.c
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ccid-driver.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libusb_dyn.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rfid.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rfid_access_mifare_classic.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rfid_asic_rc632.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rfid_iso14443_common.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rfid_layer2.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rfid_layer2_iso14443a.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rfid_layer2_iso14443b.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rfid_layer2_iso15693.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rfid_proto_mifare_classic.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rfid_proto_mifare_ul.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rfid_proto_tcl.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rfid_protocol.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rfid_reader.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rfid_reader_cm5121.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rfid_reader_cm5121_ccid_direct.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rfid_reader_cm5121_openct.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rfid_reader_openpcd.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rfid_scan.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/usleep.Plo@am__quote@
.c.o:
@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
@am__fastdepCC_TRUE@ $(am__mv) $(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@ $(am__mv) $(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@ $(am__mv) $(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 $@ $<
rfid_reader_cm5121_ccid_direct.lo: ccid/rfid_reader_cm5121_ccid_direct.c
@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT rfid_reader_cm5121_ccid_direct.lo -MD -MP -MF $(DEPDIR)/rfid_reader_cm5121_ccid_direct.Tpo -c -o rfid_reader_cm5121_ccid_direct.lo `test -f 'ccid/rfid_reader_cm5121_ccid_direct.c' || echo '$(srcdir)/'`ccid/rfid_reader_cm5121_ccid_direct.c
@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/rfid_reader_cm5121_ccid_direct.Tpo $(DEPDIR)/rfid_reader_cm5121_ccid_direct.Plo
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='ccid/rfid_reader_cm5121_ccid_direct.c' object='rfid_reader_cm5121_ccid_direct.lo' libtool=yes @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o rfid_reader_cm5121_ccid_direct.lo `test -f 'ccid/rfid_reader_cm5121_ccid_direct.c' || echo '$(srcdir)/'`ccid/rfid_reader_cm5121_ccid_direct.c
ccid-driver.lo: ccid/ccid-driver.c
@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT ccid-driver.lo -MD -MP -MF $(DEPDIR)/ccid-driver.Tpo -c -o ccid-driver.lo `test -f 'ccid/ccid-driver.c' || echo '$(srcdir)/'`ccid/ccid-driver.c
@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/ccid-driver.Tpo $(DEPDIR)/ccid-driver.Plo
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='ccid/ccid-driver.c' object='ccid-driver.lo' libtool=yes @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o ccid-driver.lo `test -f 'ccid/ccid-driver.c' || echo '$(srcdir)/'`ccid/ccid-driver.c
mostlyclean-libtool:
-rm -f *.lo
clean-libtool:
-rm -rf .libs _libs
install-pkgconfigDATA: $(pkgconfig_DATA)
@$(NORMAL_INSTALL)
test -z "$(pkgconfigdir)" || $(MKDIR_P) "$(DESTDIR)$(pkgconfigdir)"
@list='$(pkgconfig_DATA)'; test -n "$(pkgconfigdir)" || list=; \
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|^.*/||'`; \
test -n "$$files" || exit 0; \
echo " ( cd '$(DESTDIR)$(pkgconfigdir)' && rm -f" $$files ")"; \
cd "$(DESTDIR)$(pkgconfigdir)" && rm -f $$files
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; nonempty = 1; } \
END { if (nonempty) { for (i in files) print i; }; }'`; \
mkid -fID $$unique
tags: TAGS
TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
$(TAGS_FILES) $(LISP)
set x; \
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; }; }'`; \
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
CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
$(TAGS_FILES) $(LISP)
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)$$unique" \
|| $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
$$unique
GTAGS:
here=`$(am__cd) $(top_builddir) && pwd` \
&& $(am__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 "$(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 $(LTLIBRARIES) $(DATA) $(HEADERS)
installdirs:
for dir in "$(DESTDIR)$(libdir)" "$(DESTDIR)$(pkgconfigdir)"; do \
test -z "$$dir" || $(MKDIR_P) "$$dir"; \
done
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)
-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-libLTLIBRARIES clean-libtool \
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-pkgconfigDATA
install-dvi: install-dvi-am
install-dvi-am:
install-exec-am: install-libLTLIBRARIES
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: uninstall-libLTLIBRARIES uninstall-pkgconfigDATA
.MAKE: install-am install-strip
.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \
clean-libLTLIBRARIES clean-libtool 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-libLTLIBRARIES install-man install-pdf install-pdf-am \
install-pkgconfigDATA 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 uninstall-libLTLIBRARIES \
uninstall-pkgconfigDATA
# 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:
File diff suppressed because it is too large Load Diff
+108
View File
@@ -0,0 +1,108 @@
/* ccid-driver.c - USB ChipCardInterfaceDevices driver
* Copyright (C) 2003 Free Software Foundation, Inc.
*
* This file is part of GnuPG.
*
* GnuPG 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 of the License, or
* (at your option) any later version.
*
* GnuPG 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, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
* USA.
*
* ALTERNATIVELY, this file may be distributed under the terms of the
* following license, in which case the provisions of this license are
* required INSTEAD OF the GNU General Public License. If you wish to
* allow use of your version of this file only under the terms of the
* GNU General Public License, and not to allow others to use your
* version of this file under the terms of the following license,
* indicate your decision by deleting this paragraph and the license
* below.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, and the entire permission notice in its entirety,
* including the disclaimer of warranties.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* 3. The name of the author may not be used to endorse or promote
* products derived from this software without specific prior
* written permission.
*
* THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT,
* INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
* STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
* OF THE POSSIBILITY OF SUCH DAMAGE.
*
* $Id: ccid-driver.h 3887 2005-09-09 11:18:08Z wk $
*/
#ifndef CCID_DRIVER_H
#define CCID_DRIVER_H
/* The CID driver returns the same error codes as the status words
used by GnuPG's apdu.h. For ease of maintenance they should always
match. */
#define CCID_DRIVER_ERR_OUT_OF_CORE 0x10001
#define CCID_DRIVER_ERR_INV_VALUE 0x10002
#define CCID_DRIVER_ERR_INCOMPLETE_CARD_RESPONSE = 0x10003
#define CCID_DRIVER_ERR_NO_DRIVER 0x10004
#define CCID_DRIVER_ERR_NOT_SUPPORTED 0x10005
#define CCID_DRIVER_ERR_LOCKING_FAILED 0x10006
#define CCID_DRIVER_ERR_BUSY 0x10007
#define CCID_DRIVER_ERR_NO_CARD 0x10008
#define CCID_DRIVER_ERR_CARD_INACTIVE 0x10009
#define CCID_DRIVER_ERR_CARD_IO_ERROR 0x1000a
#define CCID_DRIVER_ERR_GENERAL_ERROR 0x1000b
#define CCID_DRIVER_ERR_NO_READER 0x1000c
#define CCID_DRIVER_ERR_ABORTED 0x1000d
#define CCID_DRIVER_ERR_NO_KEYPAD 0x1000e
struct ccid_driver_s;
typedef struct ccid_driver_s *ccid_driver_t;
int ccid_set_debug_level (int level);
char *ccid_get_reader_list (void);
int ccid_open_reader (ccid_driver_t *handle, const char *readerid);
int ccid_shutdown_reader (ccid_driver_t handle);
int ccid_close_reader (ccid_driver_t handle);
int ccid_get_atr (ccid_driver_t handle,
unsigned char *atr, size_t maxatrlen, size_t *atrlen);
int ccid_slot_status (ccid_driver_t handle, int *statusbits);
int ccid_transceive (ccid_driver_t handle,
const unsigned char *apdu, size_t apdulen,
unsigned char *resp, size_t maxresplen, size_t *nresp);
int ccid_transceive_secure (ccid_driver_t handle,
const unsigned char *apdu, size_t apdulen,
int pin_mode,
int pinlen_min, int pinlen_max, int pin_padlen,
unsigned char *resp, size_t maxresplen, size_t *nresp);
int ccid_transceive_escape (ccid_driver_t handle,
const unsigned char *data, size_t datalen,
unsigned char *resp, size_t maxresplen,
size_t *nresp);
#endif /*CCID_DRIVER_H*/
@@ -0,0 +1,42 @@
/* CM5121 backend for 'internal' CCID driver */
#include <stdlib.h>
#include <unistd.h>
#include <stdio.h>
#include <librfid/rfid.h>
#ifndef LIBRFID_FIRMWARE
#include <librfid/rfid_asic.h>
#include "ccid-driver.h"
/* this is the sole function required by rfid_reader_cm5121.c */
int
PC_to_RDR_Escape(void *handle,
const unsigned char *tx_buf, size_t tx_len,
unsigned char *rx_buf, size_t *rx_len)
{
int rc;
ccid_driver_t ch = handle;
size_t maxrxlen = *rx_len;
rc = ccid_transceive_escape (ch, tx_buf, tx_len,
rx_buf, maxrxlen, rx_len);
return rc;
}
int cm5121_source_init(struct rfid_asic_transport_handle *rath)
{
int rc;
rc = ccid_open_reader(&rath->data, NULL);
if (rc) {
fprintf (stderr, "failed to open CCID reader: %#x\n", rc);
return -1;
}
return 0;
}
#endif /* LIBRFID_FIRMWARE */
+2
View File
@@ -0,0 +1,2 @@
extern int cm5121_source_init(struct rfid_asic_transport_handle *rath);
+11
View File
@@ -0,0 +1,11 @@
prefix=@prefix@
exec_prefix=@exec_prefix@
libdir=@libdir@
includedir=@includedir@
sysincludedir=@sysincludedir@
Name: librfid
Description: librfid
Version: @VERSION@
Libs: -L${libdir} @LIBS@ -lrfid
Cflags: -I${sysincludedir} -I${includedir}
+484
View File
@@ -0,0 +1,484 @@
/* LIBUSB-WIN32, Generic Windows USB Library
* Copyright (c) 2002-2005 Stephan Meyer <ste_meyer@web.de>
*
* 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 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#include <windows.h>
#include <errno.h>
#include "libusb_dyn.h"
#define LIBUSB_DLL_NAME "libusb0.dll"
typedef usb_dev_handle * (*usb_open_t)(struct usb_device *dev);
typedef int (*usb_close_t)(usb_dev_handle *dev);
typedef int (*usb_get_string_t)(usb_dev_handle *dev, int index, int langid,
char *buf, size_t buflen);
typedef int (*usb_get_string_simple_t)(usb_dev_handle *dev, int index,
char *buf, size_t buflen);
typedef int (*usb_get_descriptor_by_endpoint_t)(usb_dev_handle *udev, int ep,
unsigned char type,
unsigned char index,
void *buf, int size);
typedef int (*usb_get_descriptor_t)(usb_dev_handle *udev, unsigned char type,
unsigned char index, void *buf, int size);
typedef int (*usb_bulk_write_t)(usb_dev_handle *dev, int ep, char *bytes,
int size, int timeout);
typedef int (*usb_bulk_read_t)(usb_dev_handle *dev, int ep, char *bytes,
int size, int timeout);
typedef int (*usb_interrupt_write_t)(usb_dev_handle *dev, int ep, char *bytes,
int size, int timeout);
typedef int (*usb_interrupt_read_t)(usb_dev_handle *dev, int ep, char *bytes,
int size, int timeout);
typedef int (*usb_control_msg_t)(usb_dev_handle *dev, int requesttype,
int request, int value, int index,
char *bytes, int size, int timeout);
typedef int (*usb_set_configuration_t)(usb_dev_handle *dev, int configuration);
typedef int (*usb_claim_interface_t)(usb_dev_handle *dev, int interface);
typedef int (*usb_release_interface_t)(usb_dev_handle *dev, int interface);
typedef int (*usb_set_altinterface_t)(usb_dev_handle *dev, int alternate);
typedef int (*usb_resetep_t)(usb_dev_handle *dev, unsigned int ep);
typedef int (*usb_clear_halt_t)(usb_dev_handle *dev, unsigned int ep);
typedef int (*usb_reset_t)(usb_dev_handle *dev);
typedef char * (*usb_strerror_t)(void);
typedef void (*usb_init_t)(void);
typedef void (*usb_set_debug_t)(int level);
typedef int (*usb_find_busses_t)(void);
typedef int (*usb_find_devices_t)(void);
typedef struct usb_device * (*usb_device_t)(usb_dev_handle *dev);
typedef struct usb_bus * (*usb_get_busses_t)(void);
typedef int (*usb_install_service_np_t)(void);
typedef int (*usb_uninstall_service_np_t)(void);
typedef int (*usb_install_driver_np_t)(const char *inf_file);
typedef const struct usb_version * (*usb_get_version_t)(void);
typedef int (*usb_isochronous_setup_async_t)(usb_dev_handle *dev,
void **context,
unsigned char ep, int pktsize);
typedef int (*usb_bulk_setup_async_t)(usb_dev_handle *dev, void **context,
unsigned char ep);
typedef int (*usb_interrupt_setup_async_t)(usb_dev_handle *dev, void **context,
unsigned char ep);
typedef int (*usb_submit_async_t)(void *context, char *bytes, int size);
typedef int (*usb_reap_async_t)(void *context, int timeout);
typedef int (*usb_free_async_t)(void **context);
static usb_open_t _usb_open = NULL;
static usb_close_t _usb_close = NULL;
static usb_get_string_t _usb_get_string = NULL;
static usb_get_string_simple_t _usb_get_string_simple = NULL;
static usb_get_descriptor_by_endpoint_t _usb_get_descriptor_by_endpoint = NULL;
static usb_get_descriptor_t _usb_get_descriptor = NULL;
static usb_bulk_write_t _usb_bulk_write = NULL;
static usb_bulk_read_t _usb_bulk_read = NULL;
static usb_interrupt_write_t _usb_interrupt_write = NULL;
static usb_interrupt_read_t _usb_interrupt_read = NULL;
static usb_control_msg_t _usb_control_msg = NULL;
static usb_set_configuration_t _usb_set_configuration = NULL;
static usb_claim_interface_t _usb_claim_interface = NULL;
static usb_release_interface_t _usb_release_interface = NULL;
static usb_set_altinterface_t _usb_set_altinterface = NULL;
static usb_resetep_t _usb_resetep = NULL;
static usb_clear_halt_t _usb_clear_halt = NULL;
static usb_reset_t _usb_reset = NULL;
static usb_strerror_t _usb_strerror = NULL;
static usb_init_t _usb_init = NULL;
static usb_set_debug_t _usb_set_debug = NULL;
static usb_find_busses_t _usb_find_busses = NULL;
static usb_find_devices_t _usb_find_devices = NULL;
static usb_device_t _usb_device = NULL;
static usb_get_busses_t _usb_get_busses = NULL;
static usb_install_service_np_t _usb_install_service_np = NULL;
static usb_uninstall_service_np_t _usb_uninstall_service_np = NULL;
static usb_install_driver_np_t _usb_install_driver_np = NULL;
static usb_get_version_t _usb_get_version = NULL;
static usb_isochronous_setup_async_t _usb_isochronous_setup_async = NULL;
static usb_bulk_setup_async_t _usb_bulk_setup_async = NULL;
static usb_interrupt_setup_async_t _usb_interrupt_setup_async = NULL;
static usb_submit_async_t _usb_submit_async = NULL;
static usb_reap_async_t _usb_reap_async = NULL;
static usb_free_async_t _usb_free_async = NULL;
void usb_init(void)
{
HINSTANCE libusb_dll = LoadLibrary(LIBUSB_DLL_NAME);
if(!libusb_dll)
return;
timeBeginPeriod(1);
_usb_open = (usb_open_t)
GetProcAddress(libusb_dll, "usb_open");
_usb_close = (usb_close_t)
GetProcAddress(libusb_dll, "usb_close");
_usb_get_string = (usb_get_string_t)
GetProcAddress(libusb_dll, "usb_get_string");
_usb_get_string_simple = (usb_get_string_simple_t)
GetProcAddress(libusb_dll, "usb_get_string_simple");
_usb_get_descriptor_by_endpoint = (usb_get_descriptor_by_endpoint_t)
GetProcAddress(libusb_dll, "usb_get_descriptor_by_endpoint");
_usb_get_descriptor = (usb_get_descriptor_t)
GetProcAddress(libusb_dll, "usb_get_descriptor");
_usb_bulk_write = (usb_bulk_write_t)
GetProcAddress(libusb_dll, "usb_bulk_write");
_usb_bulk_read = (usb_bulk_read_t)
GetProcAddress(libusb_dll, "usb_bulk_read");
_usb_interrupt_write = (usb_interrupt_write_t)
GetProcAddress(libusb_dll, "usb_interrupt_write");
_usb_interrupt_read = (usb_interrupt_read_t)
GetProcAddress(libusb_dll, "usb_interrupt_read");
_usb_control_msg = (usb_control_msg_t)
GetProcAddress(libusb_dll, "usb_control_msg");
_usb_set_configuration = (usb_set_configuration_t)
GetProcAddress(libusb_dll, "usb_set_configuration");
_usb_claim_interface = (usb_claim_interface_t)
GetProcAddress(libusb_dll, "usb_claim_interface");
_usb_release_interface = (usb_release_interface_t)
GetProcAddress(libusb_dll, "usb_release_interface");
_usb_set_altinterface = (usb_set_altinterface_t)
GetProcAddress(libusb_dll, "usb_set_altinterface");
_usb_resetep = (usb_resetep_t)
GetProcAddress(libusb_dll, "usb_resetep");
_usb_clear_halt = (usb_clear_halt_t)
GetProcAddress(libusb_dll, "usb_clear_halt");
_usb_reset = (usb_reset_t)
GetProcAddress(libusb_dll, "usb_reset");
_usb_strerror = (usb_strerror_t)
GetProcAddress(libusb_dll, "usb_strerror");
_usb_init = (usb_init_t)
GetProcAddress(libusb_dll, "usb_init");
_usb_set_debug = (usb_set_debug_t)
GetProcAddress(libusb_dll, "usb_set_debug");
_usb_find_busses = (usb_find_busses_t)
GetProcAddress(libusb_dll, "usb_find_busses");
_usb_find_devices = (usb_find_devices_t)
GetProcAddress(libusb_dll, "usb_find_devices");
_usb_device = (usb_device_t)
GetProcAddress(libusb_dll, "usb_device");
_usb_get_busses = (usb_get_busses_t)
GetProcAddress(libusb_dll, "usb_get_busses");
_usb_install_service_np = (usb_install_service_np_t)
GetProcAddress(libusb_dll, "usb_install_service_np");
_usb_uninstall_service_np = (usb_uninstall_service_np_t)
GetProcAddress(libusb_dll, "usb_uninstall_service_np");
_usb_install_driver_np = (usb_install_driver_np_t)
GetProcAddress(libusb_dll, "usb_install_driver_np");
_usb_get_version = (usb_get_version_t)
GetProcAddress(libusb_dll, "usb_get_version");
_usb_isochronous_setup_async = (usb_isochronous_setup_async_t)
GetProcAddress(libusb_dll, "usb_isochronous_setup_async");
_usb_bulk_setup_async = (usb_bulk_setup_async_t)
GetProcAddress(libusb_dll, "usb_bulk_setup_async");
_usb_interrupt_setup_async = (usb_interrupt_setup_async_t)
GetProcAddress(libusb_dll, "usb_interrupt_setup_async");
_usb_submit_async = (usb_submit_async_t)
GetProcAddress(libusb_dll, "usb_submit_async");
_usb_reap_async = (usb_reap_async_t)
GetProcAddress(libusb_dll, "usb_reap_async");
_usb_free_async = (usb_free_async_t)
GetProcAddress(libusb_dll, "usb_free_async");
if(_usb_init)
_usb_init();
}
usb_dev_handle *usb_open(struct usb_device *dev)
{
if(_usb_open)
return _usb_open(dev);
else
return NULL;
}
int usb_close(usb_dev_handle *dev)
{
if(_usb_close)
return _usb_close(dev);
else
return -ENOFILE;
}
int usb_get_string(usb_dev_handle *dev, int index, int langid, char *buf,
size_t buflen)
{
if(_usb_get_string)
return _usb_get_string(dev, index, langid, buf, buflen);
else
return -ENOFILE;
}
int usb_get_string_simple(usb_dev_handle *dev, int index, char *buf,
size_t buflen)
{
if(_usb_get_string_simple)
return _usb_get_string_simple(dev, index, buf, buflen);
else
return -ENOFILE;
}
int usb_get_descriptor_by_endpoint(usb_dev_handle *udev, int ep,
unsigned char type, unsigned char index,
void *buf, int size)
{
if(_usb_get_descriptor_by_endpoint)
return _usb_get_descriptor_by_endpoint(udev, ep, type, index, buf, size);
else
return -ENOFILE;
}
int usb_get_descriptor(usb_dev_handle *udev, unsigned char type,
unsigned char index, void *buf, int size)
{
if(_usb_get_descriptor)
return _usb_get_descriptor(udev, type, index, buf, size);
else
return -ENOFILE;
}
int usb_bulk_write(usb_dev_handle *dev, int ep, char *bytes, int size,
int timeout)
{
if(_usb_bulk_write)
return _usb_bulk_write(dev, ep, bytes, size, timeout);
else
return -ENOFILE;
}
int usb_bulk_read(usb_dev_handle *dev, int ep, char *bytes, int size,
int timeout)
{
if(_usb_bulk_read)
return _usb_bulk_read(dev, ep, bytes, size, timeout);
else
return -ENOFILE;
}
int usb_interrupt_write(usb_dev_handle *dev, int ep, char *bytes, int size,
int timeout)
{
if(_usb_interrupt_write)
return _usb_interrupt_write(dev, ep, bytes, size, timeout);
else
return -ENOFILE;
}
int usb_interrupt_read(usb_dev_handle *dev, int ep, char *bytes, int size,
int timeout)
{
if(_usb_interrupt_read)
return _usb_interrupt_read(dev, ep, bytes, size, timeout);
else
return -ENOFILE;
}
int usb_control_msg(usb_dev_handle *dev, int requesttype, int request,
int value, int index, char *bytes, int size,
int timeout)
{
if(_usb_control_msg)
return _usb_control_msg(dev, requesttype, request, value, index, bytes,
size, timeout);
else
return -ENOFILE;
}
int usb_set_configuration(usb_dev_handle *dev, int configuration)
{
if(_usb_set_configuration)
return _usb_set_configuration(dev, configuration);
else
return -ENOFILE;
}
int usb_claim_interface(usb_dev_handle *dev, int interface)
{
if(_usb_claim_interface)
return _usb_claim_interface(dev, interface);
else
return -ENOFILE;
}
int usb_release_interface(usb_dev_handle *dev, int interface)
{
if(_usb_release_interface)
return _usb_release_interface(dev, interface);
else
return -ENOFILE;
}
int usb_set_altinterface(usb_dev_handle *dev, int alternate)
{
if(_usb_set_altinterface)
return _usb_set_altinterface(dev, alternate);
else
return -ENOFILE;
}
int usb_resetep(usb_dev_handle *dev, unsigned int ep)
{
if(_usb_resetep)
return _usb_resetep(dev, ep);
else
return -ENOFILE;
}
int usb_clear_halt(usb_dev_handle *dev, unsigned int ep)
{
if(_usb_clear_halt)
return _usb_clear_halt(dev, ep);
else
return -ENOFILE;
}
int usb_reset(usb_dev_handle *dev)
{
if(_usb_reset)
return _usb_reset(dev);
else
return -ENOFILE;
}
char *usb_strerror(void)
{
if(_usb_strerror)
return _usb_strerror();
else
return NULL;
}
void usb_set_debug(int level)
{
if(_usb_set_debug)
return _usb_set_debug(level);
}
int usb_find_busses(void)
{
if(_usb_find_busses)
return _usb_find_busses();
else
return -ENOFILE;
}
int usb_find_devices(void)
{
if(_usb_find_devices)
return _usb_find_devices();
else
return -ENOFILE;
}
struct usb_device *usb_device(usb_dev_handle *dev)
{
if(_usb_device)
return _usb_device(dev);
else
return NULL;
}
struct usb_bus *usb_get_busses(void)
{
if(_usb_get_busses)
return _usb_get_busses();
else
return NULL;
}
int usb_install_service_np(void)
{
if(_usb_install_service_np)
return _usb_install_service_np();
else
return -ENOFILE;
}
int usb_uninstall_service_np(void)
{
if(_usb_uninstall_service_np)
return _usb_uninstall_service_np();
else
return -ENOFILE;
}
int usb_install_driver_np(const char *inf_file)
{
if(_usb_install_driver_np)
return _usb_install_driver_np(inf_file);
else
return -ENOFILE;
}
const struct usb_version *usb_get_version(void)
{
if(_usb_get_version)
return _usb_get_version();
else
return NULL;
}
int usb_isochronous_setup_async(usb_dev_handle *dev, void **context,
unsigned char ep, int pktsize)
{
if(_usb_isochronous_setup_async)
return _usb_isochronous_setup_async(dev, context, ep, pktsize);
else
return -ENOFILE;
}
int usb_bulk_setup_async(usb_dev_handle *dev, void **context,
unsigned char ep)
{
if(_usb_bulk_setup_async)
return _usb_bulk_setup_async(dev, context, ep);
else
return -ENOFILE;
}
int usb_interrupt_setup_async(usb_dev_handle *dev, void **context,
unsigned char ep)
{
if(_usb_interrupt_setup_async)
return _usb_interrupt_setup_async(dev, context, ep);
else
return -ENOFILE;
}
int usb_submit_async(void *context, char *bytes, int size)
{
if(_usb_submit_async)
return _usb_submit_async(context, bytes, size);
else
return -ENOFILE;
}
int usb_reap_async(void *context, int timeout)
{
if(_usb_reap_async)
return _usb_reap_async(context, timeout);
else
return -ENOFILE;
}
int usb_free_async(void **context)
{
if(_usb_free_async)
return _usb_free_async(context);
else
return -ENOFILE;
}
+394
View File
@@ -0,0 +1,394 @@
#ifndef __USB_H__
#define __USB_H__
#include <stdlib.h>
#include <windows.h>
/*
* 'interface' is defined somewhere in the Windows header files. This macro
* is deleted here to avoid conflicts and compile errors.
*/
#ifdef interface
#undef interface
#endif
/*
* PATH_MAX from limits.h can't be used on Windows if the dll and
* import libraries are build/used by different compilers
*/
#define LIBUSB_PATH_MAX 512
/*
* USB spec information
*
* This is all stuff grabbed from various USB specs and is pretty much
* not subject to change
*/
/*
* Device and/or Interface Class codes
*/
#define USB_CLASS_PER_INTERFACE 0 /* for DeviceClass */
#define USB_CLASS_AUDIO 1
#define USB_CLASS_COMM 2
#define USB_CLASS_HID 3
#define USB_CLASS_PRINTER 7
#define USB_CLASS_MASS_STORAGE 8
#define USB_CLASS_HUB 9
#define USB_CLASS_DATA 10
#define USB_CLASS_VENDOR_SPEC 0xff
/*
* Descriptor types
*/
#define USB_DT_DEVICE 0x01
#define USB_DT_CONFIG 0x02
#define USB_DT_STRING 0x03
#define USB_DT_INTERFACE 0x04
#define USB_DT_ENDPOINT 0x05
#define USB_DT_HID 0x21
#define USB_DT_REPORT 0x22
#define USB_DT_PHYSICAL 0x23
#define USB_DT_HUB 0x29
/*
* Descriptor sizes per descriptor type
*/
#define USB_DT_DEVICE_SIZE 18
#define USB_DT_CONFIG_SIZE 9
#define USB_DT_INTERFACE_SIZE 9
#define USB_DT_ENDPOINT_SIZE 7
#define USB_DT_ENDPOINT_AUDIO_SIZE 9 /* Audio extension */
#define USB_DT_HUB_NONVAR_SIZE 7
/* ensure byte-packed structures */
#include <pshpack1.h>
/* All standard descriptors have these 2 fields in common */
struct usb_descriptor_header {
unsigned char bLength;
unsigned char bDescriptorType;
};
/* String descriptor */
struct usb_string_descriptor {
unsigned char bLength;
unsigned char bDescriptorType;
unsigned short wData[1];
};
/* HID descriptor */
struct usb_hid_descriptor {
unsigned char bLength;
unsigned char bDescriptorType;
unsigned short bcdHID;
unsigned char bCountryCode;
unsigned char bNumDescriptors;
};
/* Endpoint descriptor */
#define USB_MAXENDPOINTS 32
struct usb_endpoint_descriptor {
unsigned char bLength;
unsigned char bDescriptorType;
unsigned char bEndpointAddress;
unsigned char bmAttributes;
unsigned short wMaxPacketSize;
unsigned char bInterval;
unsigned char bRefresh;
unsigned char bSynchAddress;
unsigned char *extra; /* Extra descriptors */
int extralen;
};
#define USB_ENDPOINT_ADDRESS_MASK 0x0f /* in bEndpointAddress */
#define USB_ENDPOINT_DIR_MASK 0x80
#define USB_ENDPOINT_TYPE_MASK 0x03 /* in bmAttributes */
#define USB_ENDPOINT_TYPE_CONTROL 0
#define USB_ENDPOINT_TYPE_ISOCHRONOUS 1
#define USB_ENDPOINT_TYPE_BULK 2
#define USB_ENDPOINT_TYPE_INTERRUPT 3
/* Interface descriptor */
#define USB_MAXINTERFACES 32
struct usb_interface_descriptor {
unsigned char bLength;
unsigned char bDescriptorType;
unsigned char bInterfaceNumber;
unsigned char bAlternateSetting;
unsigned char bNumEndpoints;
unsigned char bInterfaceClass;
unsigned char bInterfaceSubClass;
unsigned char bInterfaceProtocol;
unsigned char iInterface;
struct usb_endpoint_descriptor *endpoint;
unsigned char *extra; /* Extra descriptors */
int extralen;
};
#define USB_MAXALTSETTING 128 /* Hard limit */
struct usb_interface {
struct usb_interface_descriptor *altsetting;
int num_altsetting;
};
/* Configuration descriptor information.. */
#define USB_MAXCONFIG 8
struct usb_config_descriptor {
unsigned char bLength;
unsigned char bDescriptorType;
unsigned short wTotalLength;
unsigned char bNumInterfaces;
unsigned char bConfigurationValue;
unsigned char iConfiguration;
unsigned char bmAttributes;
unsigned char MaxPower;
struct usb_interface *interface;
unsigned char *extra; /* Extra descriptors */
int extralen;
};
/* Device descriptor */
struct usb_device_descriptor {
unsigned char bLength;
unsigned char bDescriptorType;
unsigned short bcdUSB;
unsigned char bDeviceClass;
unsigned char bDeviceSubClass;
unsigned char bDeviceProtocol;
unsigned char bMaxPacketSize0;
unsigned short idVendor;
unsigned short idProduct;
unsigned short bcdDevice;
unsigned char iManufacturer;
unsigned char iProduct;
unsigned char iSerialNumber;
unsigned char bNumConfigurations;
};
struct usb_ctrl_setup {
unsigned char bRequestType;
unsigned char bRequest;
unsigned short wValue;
unsigned short wIndex;
unsigned short wLength;
};
/*
* Standard requests
*/
#define USB_REQ_GET_STATUS 0x00
#define USB_REQ_CLEAR_FEATURE 0x01
/* 0x02 is reserved */
#define USB_REQ_SET_FEATURE 0x03
/* 0x04 is reserved */
#define USB_REQ_SET_ADDRESS 0x05
#define USB_REQ_GET_DESCRIPTOR 0x06
#define USB_REQ_SET_DESCRIPTOR 0x07
#define USB_REQ_GET_CONFIGURATION 0x08
#define USB_REQ_SET_CONFIGURATION 0x09
#define USB_REQ_GET_INTERFACE 0x0A
#define USB_REQ_SET_INTERFACE 0x0B
#define USB_REQ_SYNCH_FRAME 0x0C
#define USB_TYPE_STANDARD (0x00 << 5)
#define USB_TYPE_CLASS (0x01 << 5)
#define USB_TYPE_VENDOR (0x02 << 5)
#define USB_TYPE_RESERVED (0x03 << 5)
#define USB_RECIP_DEVICE 0x00
#define USB_RECIP_INTERFACE 0x01
#define USB_RECIP_ENDPOINT 0x02
#define USB_RECIP_OTHER 0x03
/*
* Various libusb API related stuff
*/
#define USB_ENDPOINT_IN 0x80
#define USB_ENDPOINT_OUT 0x00
/* Error codes */
#define USB_ERROR_BEGIN 500000
/*
* This is supposed to look weird. This file is generated from autoconf
* and I didn't want to make this too complicated.
*/
#define USB_LE16_TO_CPU(x)
/* Data types */
/* struct usb_device; */
/* struct usb_bus; */
struct usb_device {
struct usb_device *next, *prev;
char filename[LIBUSB_PATH_MAX];
struct usb_bus *bus;
struct usb_device_descriptor descriptor;
struct usb_config_descriptor *config;
void *dev; /* Darwin support */
unsigned char devnum;
unsigned char num_children;
struct usb_device **children;
};
struct usb_bus {
struct usb_bus *next, *prev;
char dirname[LIBUSB_PATH_MAX];
struct usb_device *devices;
unsigned long location;
struct usb_device *root_dev;
};
/* Version information, Windows specific */
struct usb_version {
struct {
int major;
int minor;
int micro;
int nano;
} dll;
struct {
int major;
int minor;
int micro;
int nano;
} driver;
};
struct usb_dev_handle;
typedef struct usb_dev_handle usb_dev_handle;
/* Variables */
#ifndef __USB_C__
#define usb_busses usb_get_busses()
#endif
#include <poppack.h>
#ifdef __cplusplus
extern "C" {
#endif
/* Function prototypes */
/* usb.c */
usb_dev_handle *usb_open(struct usb_device *dev);
int usb_close(usb_dev_handle *dev);
int usb_get_string(usb_dev_handle *dev, int index, int langid, char *buf,
size_t buflen);
int usb_get_string_simple(usb_dev_handle *dev, int index, char *buf,
size_t buflen);
/* descriptors.c */
int usb_get_descriptor_by_endpoint(usb_dev_handle *udev, int ep,
unsigned char type, unsigned char index,
void *buf, int size);
int usb_get_descriptor(usb_dev_handle *udev, unsigned char type,
unsigned char index, void *buf, int size);
/* <arch>.c */
int usb_bulk_write(usb_dev_handle *dev, int ep, char *bytes, int size,
int timeout);
int usb_bulk_read(usb_dev_handle *dev, int ep, char *bytes, int size,
int timeout);
int usb_interrupt_write(usb_dev_handle *dev, int ep, char *bytes, int size,
int timeout);
int usb_interrupt_read(usb_dev_handle *dev, int ep, char *bytes, int size,
int timeout);
int usb_control_msg(usb_dev_handle *dev, int requesttype, int request,
int value, int index, char *bytes, int size,
int timeout);
int usb_set_configuration(usb_dev_handle *dev, int configuration);
int usb_claim_interface(usb_dev_handle *dev, int interface);
int usb_release_interface(usb_dev_handle *dev, int interface);
int usb_set_altinterface(usb_dev_handle *dev, int alternate);
int usb_resetep(usb_dev_handle *dev, unsigned int ep);
int usb_clear_halt(usb_dev_handle *dev, unsigned int ep);
int usb_reset(usb_dev_handle *dev);
char *usb_strerror(void);
void usb_init(void);
void usb_set_debug(int level);
int usb_find_busses(void);
int usb_find_devices(void);
struct usb_device *usb_device(usb_dev_handle *dev);
struct usb_bus *usb_get_busses(void);
/* Windows specific functions */
#define LIBUSB_HAS_INSTALL_SERVICE_NP 1
int usb_install_service_np(void);
void CALLBACK usb_install_service_np_rundll(HWND wnd, HINSTANCE instance,
LPSTR cmd_line, int cmd_show);
#define LIBUSB_HAS_UNINSTALL_SERVICE_NP 1
int usb_uninstall_service_np(void);
void CALLBACK usb_uninstall_service_np_rundll(HWND wnd, HINSTANCE instance,
LPSTR cmd_line, int cmd_show);
#define LIBUSB_HAS_INSTALL_DRIVER_NP 1
int usb_install_driver_np(const char *inf_file);
void CALLBACK usb_install_driver_np_rundll(HWND wnd, HINSTANCE instance,
LPSTR cmd_line, int cmd_show);
#define LIBUSB_HAS_TOUCH_INF_FILE_NP 1
int usb_touch_inf_file_np(const char *inf_file);
void CALLBACK usb_touch_inf_file_np_rundll(HWND wnd, HINSTANCE instance,
LPSTR cmd_line, int cmd_show);
#define LIBUSB_HAS_INSTALL_NEEDS_RESTART_NP 1
int usb_install_needs_restart_np(void);
const struct usb_version *usb_get_version(void);
int usb_isochronous_setup_async(usb_dev_handle *dev, void **context,
unsigned char ep, int pktsize);
int usb_bulk_setup_async(usb_dev_handle *dev, void **context,
unsigned char ep);
int usb_interrupt_setup_async(usb_dev_handle *dev, void **context,
unsigned char ep);
int usb_submit_async(void *context, char *bytes, int size);
int usb_reap_async(void *context, int timeout);
int usb_reap_async_nocancel(void *context, int timeout);
int usb_cancel_async(void *context);
int usb_free_async(void **context);
#ifdef __cplusplus
}
#endif
#endif /* __USB_H__ */
+247
View File
@@ -0,0 +1,247 @@
/* Register definitions for Philips CL RC632 RFID Reader IC
*
* (C) 2005 Harald Welte <laforge@gnumonks.org>
*
* Licensed under GNU General Public License, Version 2
*/
enum rc632_registers {
RC632_REG_PAGE0 = 0x00,
RC632_REG_COMMAND = 0x01,
RC632_REG_FIFO_DATA = 0x02,
RC632_REG_PRIMARY_STATUS = 0x03,
RC632_REG_FIFO_LENGTH = 0x04,
RC632_REG_SECONDARY_STATUS = 0x05,
RC632_REG_INTERRUPT_EN = 0x06,
RC632_REG_INTERRUPT_RQ = 0x07,
RC632_REG_PAGE1 = 0x08,
RC632_REG_CONTROL = 0x09,
RC632_REG_ERROR_FLAG = 0x0a,
RC632_REG_COLL_POS = 0x0b,
RC632_REG_TIMER_VALUE = 0x0c,
RC632_REG_CRC_RESULT_LSB = 0x0d,
RC632_REG_CRC_RESULT_MSB = 0x0e,
RC632_REG_BIT_FRAMING = 0x0f,
RC632_REG_PAGE2 = 0x10,
RC632_REG_TX_CONTROL = 0x11,
RC632_REG_CW_CONDUCTANCE = 0x12,
RC632_REG_MOD_CONDUCTANCE = 0x13,
RC632_REG_CODER_CONTROL = 0x14,
RC632_REG_MOD_WIDTH = 0x15,
RC632_REG_MOD_WIDTH_SOF = 0x16,
RC632_REG_TYPE_B_FRAMING = 0x17,
RC632_REG_PAGE3 = 0x18,
RC632_REG_RX_CONTROL1 = 0x19,
RC632_REG_DECODER_CONTROL = 0x1a,
RC632_REG_BIT_PHASE = 0x1b,
RC632_REG_RX_THRESHOLD = 0x1c,
RC632_REG_BPSK_DEM_CONTROL = 0x1d,
RC632_REG_RX_CONTROL2 = 0x1e,
RC632_REG_CLOCK_Q_CONTROL = 0x1f,
RC632_REG_PAGE4 = 0x20,
RC632_REG_RX_WAIT = 0x21,
RC632_REG_CHANNEL_REDUNDANCY = 0x22,
RC632_REG_CRC_PRESET_LSB = 0x23,
RC632_REG_CRC_PRESET_MSB = 0x24,
RC632_REG_TIME_SLOT_PERIOD = 0x25,
RC632_REG_MFOUT_SELECT = 0x26,
RC632_REG_PRESET_27 = 0x27,
RC632_REG_PAGE5 = 0x28,
RC632_REG_FIFO_LEVEL = 0x29,
RC632_REG_TIMER_CLOCK = 0x2a,
RC632_REG_TIMER_CONTROL = 0x2b,
RC632_REG_TIMER_RELOAD = 0x2c,
RC632_REG_IRQ_PIN_CONFIG = 0x2d,
RC632_REG_PRESET_2E = 0x2e,
RC632_REG_PRESET_2F = 0x2f,
RC632_REG_PAGE6 = 0x30,
RC632_REG_PAGE7 = 0x38,
RC632_REG_TEST_ANA_SELECT = 0x3a,
RC632_REG_TEST_DIGI_SELECT = 0x3d,
};
enum rc632_reg_command {
RC632_CMD_IDLE = 0x00,
RC632_CMD_WRITE_E2 = 0x01,
RC632_CMD_READ_E2 = 0x03,
RC632_CMD_LOAD_CONFIG = 0x07,
RC632_CMD_LOAD_KEY_E2 = 0x0b,
RC632_CMD_AUTHENT1 = 0x0c,
RC632_CMD_CALC_CRC = 0x12,
RC632_CMD_AUTHENT2 = 0x14,
RC632_CMD_RECEIVE = 0x16,
RC632_CMD_LOAD_KEY = 0x19,
RC632_CMD_TRANSMIT = 0x1a,
RC632_CMD_TRANSCEIVE = 0x1e,
RC632_CMD_STARTUP = 0x3f,
};
enum rc632_reg_interrupt {
RC632_INT_LOALERT = 0x01,
RC632_INT_HIALERT = 0x02,
RC632_INT_IDLE = 0x04,
RC632_INT_RX = 0x08,
RC632_INT_TX = 0x10,
RC632_INT_TIMER = 0x20,
RC632_INT_SET = 0x80,
};
enum rc632_reg_control {
RC632_CONTROL_FIFO_FLUSH = 0x01,
RC632_CONTROL_TIMER_START = 0x02,
RC632_CONTROL_TIMER_STOP = 0x04,
RC632_CONTROL_CRYPTO1_ON = 0x08,
RC632_CONTROL_POWERDOWN = 0x10,
RC632_CONTROL_STANDBY = 0x20,
};
enum rc632_reg_error_flag {
RC632_ERR_FLAG_COL_ERR = 0x01,
RC632_ERR_FLAG_PARITY_ERR = 0x02,
RC632_ERR_FLAG_FRAMING_ERR = 0x04,
RC632_ERR_FLAG_CRC_ERR = 0x08,
RC632_ERR_FLAG_FIFO_OVERFLOW = 0x10,
RC632_ERR_FLAG_ACCESS_ERR = 0x20,
RC632_ERR_FLAG_KEY_ERR = 0x40,
};
enum rc632_reg_tx_control {
RC632_TXCTRL_TX1_RF_EN = 0x01,
RC632_TXCTRL_TX2_RF_EN = 0x02,
RC632_TXCTRL_TX2_CW = 0x04,
RC632_TXCTRL_TX2_INV = 0x08,
RC632_TXCTRL_FORCE_100_ASK = 0x10,
RC632_TXCTRL_MOD_SRC_LOW = 0x00,
RC632_TXCTRL_MOD_SRC_HIGH = 0x20,
RC632_TXCTRL_MOD_SRC_INT = 0x40,
RC632_TXCTRL_MOD_SRC_MFIN = 0x60,
};
enum rc632_reg_coder_control {
RC632_CDRCTRL_TXCD_NRZ = 0x00,
RC632_CDRCTRL_TXCD_14443A = 0x01,
RC632_CDRCTRL_TXCD_ICODE_STD = 0x04,
#define RC632_CDRCTRL_RATE_MASK 0x38
RC632_CDRCTRL_RATE_848K = 0x00,
RC632_CDRCTRL_RATE_424K = 0x08,
RC632_CDRCTRL_RATE_212K = 0x10,
RC632_CDRCTRL_RATE_106K = 0x18,
RC632_CDRCTRL_RATE_14443B = 0x20,
RC632_CDRCTRL_RATE_15693 = 0x28,
RC632_CDRCTRL_RATE_ICODE_FAST = 0x30,
};
enum rc632_erg_type_b_framing {
RC632_TBFRAMING_SOF_10L_2H = 0x00,
RC632_TBFRAMING_SOF_10L_3H = 0x01,
RC632_TBFRAMING_SOF_11L_2H = 0x02,
RC632_TBFRAMING_SOF_11L_3H = 0x03,
RC632_TBFRAMING_EOF_10 = 0x00,
RC632_TBFRAMING_EOF_11 = 0x20,
RC632_TBFRAMING_NO_TX_SOF = 0x80,
RC632_TBFRAMING_NO_TX_EOF = 0x40,
};
#define RC632_TBFRAMING_SPACE_SHIFT 2
#define RC632_TBFRAMING_SPACE_MASK 7
enum rc632_reg_rx_control1 {
RC632_RXCTRL1_GAIN_20DB = 0x00,
RC632_RXCTRL1_GAIN_24DB = 0x01,
RC632_RXCTRL1_GAIN_31DB = 0x02,
RC632_RXCTRL1_GAIN_35DB = 0x03,
RC632_RXCTRL1_LP_OFF = 0x04,
RC632_RXCTRL1_ISO15693 = 0x08,
RC632_RXCTRL1_ISO14443 = 0x10,
#define RC632_RXCTRL1_SUBCP_MASK 0xe0
RC632_RXCTRL1_SUBCP_1 = 0x00,
RC632_RXCTRL1_SUBCP_2 = 0x20,
RC632_RXCTRL1_SUBCP_4 = 0x40,
RC632_RXCTRL1_SUBCP_8 = 0x60,
RC632_RXCTRL1_SUBCP_16 = 0x80,
};
enum rc632_reg_decoder_control {
RC632_DECCTRL_MANCHESTER = 0x00,
RC632_DECCTRL_BPSK = 0x01,
RC632_DECCTRL_RX_INVERT = 0x04,
RC632_DECCTRL_RXFR_ICODE = 0x00,
RC632_DECCTRL_RXFR_14443A = 0x08,
RC632_DECCTRL_RXFR_15693 = 0x10,
RC632_DECCTRL_RXFR_14443B = 0x18,
RC632_DECCTRL_ZEROAFTERCOL = 0x20,
RC632_DECCTRL_RX_MULTIPLE = 0x40,
};
enum rc632_reg_bpsk_dem_control {
RC632_BPSKD_TAUB_SHIFT = 0x00,
RC632_BPSKD_TAUB_MASK = 0x03,
RC632_BPSKD_TAUD_SHIFT = 0x02,
RC632_BPSKD_TAUD_MASK = 0x03,
RC632_BPSKD_FILTER_AMP_DETECT = 0x10,
RC632_BPSKD_NO_RX_EOF = 0x20,
RC632_BPSKD_NO_RX_EGT = 0x40,
RC632_BPSKD_NO_RX_SOF = 0x80,
};
enum rc632_reg_rx_control2 {
RC632_RXCTRL2_DECSRC_LOW = 0x00,
RC632_RXCTRL2_DECSRC_INT = 0x01,
RC632_RXCTRL2_DECSRC_SUBC_MFIN = 0x10,
RC632_RXCTRL2_DECSRC_BASE_MFIN = 0x11,
RC632_RXCTRL2_AUTO_PD = 0x40,
RC632_RXCTRL2_CLK_I = 0x80,
RC632_RXCTRL2_CLK_Q = 0x00,
};
enum rc632_reg_channel_redundancy {
RC632_CR_PARITY_ENABLE = 0x01,
RC632_CR_PARITY_ODD = 0x02,
RC632_CR_TX_CRC_ENABLE = 0x04,
RC632_CR_RX_CRC_ENABLE = 0x08,
RC632_CR_CRC8 = 0x10,
RC632_CR_CRC3309 = 0x20,
};
enum rc632_reg_timer_control {
RC632_TMR_START_TX_BEGIN = 0x01,
RC632_TMR_START_TX_END = 0x02,
RC632_TMR_STOP_RX_BEGIN = 0x04,
RC632_TMR_STOP_RX_END = 0x08,
};
enum rc632_reg_timer_irq {
RC632_IRQ_LO_ALERT = 0x01,
RC632_IRQ_HI_ALERT = 0x02,
RC632_IRQ_IDLE = 0x04,
RC632_IRQ_RX = 0x08,
RC632_IRQ_TX = 0x10,
RC632_IRQ_TIMER = 0x20,
RC632_IRQ_SET = 0x80,
};
enum rc632_reg_secondary_status {
RC632_SEC_ST_TMR_RUNNING = 0x80,
RC632_SEC_ST_E2_READY = 0x40,
RC632_SEC_ST_CRC_READY = 0x20,
};
+114
View File
@@ -0,0 +1,114 @@
/* librfid core
* (C) 2005-2006 by Harald Welte <laforge@gnumonks.org>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2
* as published by the Free Software Foundation
*
* 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, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#include <stdio.h>
#include <string.h>
#include <librfid/rfid.h>
#include <librfid/rfid_reader.h>
#include <librfid/rfid_protocol.h>
#include <librfid/rfid_protocol_tcl.h>
#include <librfid/rfid_protocol_mifare_ul.h>
#include <librfid/rfid_protocol_mifare_classic.h>
#ifdef LIBRFID_STATIC
struct rfid_asic_handle rfid_ah;
struct rfid_layer2_handle rfid_l2h;
struct rfid_protocol_handle rfid_ph;
struct rfid_asic_transport_handle rfid_ath;
struct rfid_reader_handle rfid_rh;
#endif
#ifndef LIBRFID_FIRMWARE
#ifdef LIBRFID_DEBUG
const char *
rfid_hexdump(const void *data, unsigned int len)
{
static char string[1024];
unsigned char *d = (unsigned char *) data;
unsigned int i, left;
string[0] = '\0';
left = sizeof(string);
for (i = 0; len--; i += 3) {
if (i >= sizeof(string) -4)
break;
snprintf(string+i, 4, " %02x", *d++);
}
return string;
}
#endif/*LIBRFID_DEBUG*/
#else
#define rfid_hexdump(x, y) hexdump(x, y)
#endif
#if 0
int rfid_setopt(struct rfid_handle *rh, unsigned int level,
unsigned int optname,
const void *opt, unsigned int *optlen)
{
switch (level) {
case RFID_LEVEL_ASIC:
case RFID_LEVEL_READER:
return -EINVAL;
break;
case RFID_LEVEL_LAYER2:
return rfid_layer2_setopt(optname, opt, optlen);
break;
case RFID_LEVEL_LAYER3:
return rfid_layer3_setopt(optname, opt, optlen);
break;
default:
return -EINVAL;
break;
}
return 0;
}
int rfid_getopt(struct rfid_handle *rh, unsigned int level,
unsigned int optname,
void *opt, unsigned int *optlen)
{
switch (level) {
case RFID_LEVEL_ASIC:
case RFID_LEVEL_READER:
return -EINVAL;
break;
case RFID_LEVEL_LAYER2:
return rfid_layer2_getopt(optname, opt, optlen);
break;
case RFID_LEVEL_LAYER3:
return rfid_layer3_getopt(optname, opt, optlen);
break;
default:
return -EINVAL;
break;
}
return 0;
}
#endif
int rfid_init()
{
return 0;
}
void rfid_fini()
{
/* FIXME: implementation */
}
@@ -0,0 +1,230 @@
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <librfid/rfid.h>
#include <librfid/rfid_access_mifare_classic.h>
/* parse encoded data structure into c1/c2/c3 */
int mfcl_compile_access(u_int8_t *encoded,
const struct mfcl_access_sect *ac)
{
int b;
u_int8_t c1, c2, c3;
c1 = c2 = c3 = 0;
for (b = 0; b < 4; b++) {
if (ac->block[b] & 0x01)
c1 |= (1 << b);
if (ac->block[b] & 0x02)
c2 |= (1 << b);
if (ac->block[b] & 0x04)
c3 |= (1 << b);
}
DEBUGP("compile: c1=%u c2=%u c3=%u\n", c1, c2, c3);
encoded[3] = 0x00;
encoded[2] = c2 | (c3 << 4);
encoded[1] = (~c3 & 0xf) | (c1 << 4);
encoded[0] = (~c1 & 0xf) | ((~c2 & 0xf) << 4);
return 0;
}
/* parse mifare classic access conditions from card */
int mfcl_parse_access(struct mfcl_access_sect *ac, u_int8_t *encoded)
{
int b;
u_int8_t c1, c2, c3;
DEBUGP("encoded: %s\n", rfid_hexdump(encoded, 4));
c1 = encoded[1] >> 4;
c2 = encoded[2] & 0xf;
c3 = encoded[2] >> 4;
DEBUGP("c1=0x%x, c2=0x%x, c3=0x%x\n", c1, c2, c3);
memset(ac, 0, sizeof(*ac));
for (b = 0; b < 4; b++) {
if (c1 & (1 << b))
ac->block[b] = 0x1;
if (c2 & (1 << b))
ac->block[b] |= 0x2;
if (c3 & (1 << b))
ac->block[b] |= 0x4;
};
/* FIXME: verify the inverted access bits */
return 0;
}
/* functions below here are for our own internal decoded (orthogonal)
* format of access bits */
/* In the order of the table 3.7.3 in MFCL Product Specification Rev. 5.1 */
static const struct mfcl_access_exp_block mfcl_exp_data[] = {
[0] = {
.read = MFCL_ACCESS_KEY_A | MFCL_ACCESS_KEY_B,
.write = MFCL_ACCESS_KEY_A | MFCL_ACCESS_KEY_B,
.inc = MFCL_ACCESS_KEY_A | MFCL_ACCESS_KEY_B,
.dec = MFCL_ACCESS_KEY_A | MFCL_ACCESS_KEY_B,
},
[2] = {
.read = MFCL_ACCESS_KEY_A | MFCL_ACCESS_KEY_B,
.write = MFCL_ACCESS_NEVER,
.inc = MFCL_ACCESS_NEVER,
.dec = MFCL_ACCESS_NEVER,
},
[1] = {
.read = MFCL_ACCESS_KEY_A | MFCL_ACCESS_KEY_B,
.write = MFCL_ACCESS_KEY_B,
.inc = MFCL_ACCESS_NEVER,
.dec = MFCL_ACCESS_NEVER,
},
[3] = {
.read = MFCL_ACCESS_KEY_A | MFCL_ACCESS_KEY_B,
.write = MFCL_ACCESS_KEY_B,
.inc = MFCL_ACCESS_KEY_B,
.dec = MFCL_ACCESS_KEY_A | MFCL_ACCESS_KEY_B,
},
[4] = {
.read = MFCL_ACCESS_KEY_A | MFCL_ACCESS_KEY_B,
.write = MFCL_ACCESS_NEVER,
.inc = MFCL_ACCESS_NEVER,
.dec = MFCL_ACCESS_KEY_A | MFCL_ACCESS_KEY_B,
},
[6] = {
.read = MFCL_ACCESS_KEY_B,
.write = MFCL_ACCESS_KEY_B,
.inc = MFCL_ACCESS_NEVER,
.dec = MFCL_ACCESS_NEVER,
},
[5] = {
.read = MFCL_ACCESS_KEY_B,
.write = MFCL_ACCESS_NEVER,
.inc = MFCL_ACCESS_NEVER,
.dec = MFCL_ACCESS_NEVER,
},
[7] = {
.read = MFCL_ACCESS_NEVER,
.write = MFCL_ACCESS_NEVER,
.inc = MFCL_ACCESS_NEVER,
.dec = MFCL_ACCESS_NEVER,
},
};
static const struct mfcl_access_exp_acc mfcl_exp_trailer[] = {
[0] = {
.key_a_rd = MFCL_ACCESS_NEVER,
.key_a_wr = MFCL_ACCESS_KEY_A,
.acc_rd = MFCL_ACCESS_KEY_A,
.acc_wr = MFCL_ACCESS_NEVER,
.key_b_rd = MFCL_ACCESS_KEY_A,
.key_b_wr = MFCL_ACCESS_KEY_A,
},
[2] = {
.key_a_rd = MFCL_ACCESS_NEVER,
.key_a_wr = MFCL_ACCESS_NEVER,
.acc_rd = MFCL_ACCESS_KEY_A,
.acc_wr = MFCL_ACCESS_NEVER,
.key_b_rd = MFCL_ACCESS_KEY_A,
.key_b_wr = MFCL_ACCESS_NEVER,
},
[1] = {
.key_a_rd = MFCL_ACCESS_NEVER,
.key_a_wr = MFCL_ACCESS_KEY_B,
.acc_rd = MFCL_ACCESS_KEY_A | MFCL_ACCESS_KEY_B,
.acc_wr = MFCL_ACCESS_NEVER,
.key_b_rd = MFCL_ACCESS_NEVER,
.key_b_wr = MFCL_ACCESS_KEY_B,
},
[3] = {
.key_a_rd = MFCL_ACCESS_NEVER,
.key_a_wr = MFCL_ACCESS_NEVER,
.acc_rd = MFCL_ACCESS_KEY_A | MFCL_ACCESS_KEY_B,
.acc_wr = MFCL_ACCESS_NEVER,
.key_b_rd = MFCL_ACCESS_NEVER,
.key_b_wr = MFCL_ACCESS_NEVER,
},
[4] = {
.key_a_rd = MFCL_ACCESS_NEVER,
.key_a_wr = MFCL_ACCESS_KEY_A,
.acc_rd = MFCL_ACCESS_KEY_A,
.acc_wr = MFCL_ACCESS_KEY_A,
.key_b_rd = MFCL_ACCESS_KEY_A,
.key_b_wr = MFCL_ACCESS_KEY_A,
},
[6] = {
.key_a_rd = MFCL_ACCESS_NEVER,
.key_a_wr = MFCL_ACCESS_KEY_B,
.acc_rd = MFCL_ACCESS_KEY_A | MFCL_ACCESS_KEY_B,
.acc_wr = MFCL_ACCESS_KEY_B,
.key_b_rd = MFCL_ACCESS_NEVER,
.key_b_wr = MFCL_ACCESS_KEY_B,
},
[5] = {
.key_a_rd = MFCL_ACCESS_NEVER,
.key_a_wr = MFCL_ACCESS_NEVER,
.acc_rd = MFCL_ACCESS_KEY_A | MFCL_ACCESS_KEY_B,
.acc_wr = MFCL_ACCESS_KEY_B,
.key_b_rd = MFCL_ACCESS_NEVER,
.key_b_wr = MFCL_ACCESS_NEVER,
},
[7] = {
.key_a_rd = MFCL_ACCESS_NEVER,
.key_a_wr = MFCL_ACCESS_NEVER,
.acc_rd = MFCL_ACCESS_KEY_A | MFCL_ACCESS_KEY_B,
.acc_wr = MFCL_ACCESS_NEVER,
.key_b_rd = MFCL_ACCESS_NEVER,
.key_b_wr = MFCL_ACCESS_NEVER,
},
};
const char *mfcl_access_str[] = {
[MFCL_ACCESS_NEVER] = "NEVER",
[MFCL_ACCESS_KEY_A] = "A",
[MFCL_ACCESS_KEY_B] = "B",
[MFCL_ACCESS_KEY_A|MFCL_ACCESS_KEY_B] = "A|B",
};
void mfcl_access_to_exp(struct mfcl_access_exp_sect *exp,
const struct mfcl_access_sect *sect)
{
int b;
for (b = 0; b < 3; b++)
exp->block[b] = mfcl_exp_data[sect->block[b]];
exp->acc = mfcl_exp_trailer[sect->block[3]];
}
char *mfcl_access_exp_stringify(const struct mfcl_access_exp_block *exp)
{
static char buf[80];
sprintf(buf, "READ: %s, WRITE: %s, INC: %s, DEC: %s",
mfcl_access_str[exp->read],
mfcl_access_str[exp->write],
mfcl_access_str[exp->inc],
mfcl_access_str[exp->dec]);
return buf;
}
char *mfcl_access_exp_acc_stringify(const struct mfcl_access_exp_acc *acc)
{
static char buf[80];
sprintf(buf, "KEY_A_RD: %s, KEY_A_WR: %s, ACC_RD: %s, ACC_WR: %s, "
"KEY_B_RD: %s, KEY_B_WR: %s",
mfcl_access_str[acc->key_a_rd],
mfcl_access_str[acc->key_a_wr],
mfcl_access_str[acc->acc_rd],
mfcl_access_str[acc->acc_wr],
mfcl_access_str[acc->key_b_rd],
mfcl_access_str[acc->key_b_wr]);
return buf;
}
File diff suppressed because it is too large Load Diff
+58
View File
@@ -0,0 +1,58 @@
/*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2
* as published by the Free Software Foundation
*
* 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, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
static unsigned int fsdi_table[] = { 16, 24, 32, 40, 48, 64, 96, 128, 256 };
int iso14443_fsdi_to_fsd(unsigned int *fsd, unsigned char fsdi)
{
/* ISO 14443-4:2000(E) Section 5.1. */
if (fsdi > sizeof(fsdi_table)/sizeof(unsigned int))
return -1;
*fsd = fsdi_table[fsdi];
return 0;
}
int iso14443_fsd_to_fsdi(unsigned char *fsdi, unsigned int fsd)
{
int i;
for (i = 0; i < sizeof(fsdi_table)/sizeof(unsigned int); i++) {
if (fsdi_table[i] == fsd) {
*fsdi = i;
return 0;
}
}
return -1;
}
/* calculate the fsd that is equal or the closest smaller value
* that can be coded as fsd */
unsigned int iso14443_fsd_approx(unsigned int fsd)
{
unsigned int tbl_size = sizeof(fsdi_table)/sizeof(unsigned int);
int i;
for (i = tbl_size-1; i >= 0; i--) {
if (fsdi_table[i] <= fsd)
return fsdi_table[i];
}
/* not reached: return smallest possible FSD */
return fsdi_table[0];
}
+11
View File
@@ -0,0 +1,11 @@
#ifndef __RFID_ISO14443_COMMON_H
#define __RFID_ISO14443_COMMON_H
int iso14443_fsdi_to_fsd(unsigned int *fsd, unsigned char fsdi);
int iso14443_fsd_to_fsdi(unsigned char *fsdi, unsigned int fsd);
unsigned int iso14443_fsd_approx(unsigned int fsd);
#define ISO14443_FREQ_CARRIER 13560000
#define ISO14443_FREQ_SUBCARRIER (ISO14443_FREQ_CARRIER/16)
#endif
+136
View File
@@ -0,0 +1,136 @@
/* librfid - layer 2 protocol handler
* (C) 2005-2006 by Harald Welte <laforge@gnumonks.org>
*/
/*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2
* as published by the Free Software Foundation
*
* 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, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#include <stdlib.h>
#include <stdio.h>
#include <errno.h>
#include <string.h> /* for memcpy */
#include <librfid/rfid.h>
#include <librfid/rfid_layer2.h>
static const struct rfid_layer2 *rfid_layer2s[] = {
[RFID_LAYER2_ISO14443A] = &rfid_layer2_iso14443a,
[RFID_LAYER2_ISO14443B] = &rfid_layer2_iso14443b,
[RFID_LAYER2_ISO15693] = &rfid_layer2_iso15693,
};
struct rfid_layer2_handle *
rfid_layer2_init(struct rfid_reader_handle *rh, unsigned int id)
{
struct rfid_layer2 *p;
if (id >= ARRAY_SIZE(rfid_layer2s)) {
DEBUGP("unable to find matching layer2 protocol\n");
return NULL;
}
p = rfid_layer2s[id];
return p->fn.init(rh);
}
int
rfid_layer2_open(struct rfid_layer2_handle *ph)
{
if (!ph->l2->fn.open)
return 0;
return ph->l2->fn.open(ph);
}
int
rfid_layer2_transceive(struct rfid_layer2_handle *ph,
enum rfid_frametype frametype,
const unsigned char *tx_buf, unsigned int len,
unsigned char *rx_buf, unsigned int *rx_len,
u_int64_t timeout, unsigned int flags)
{
if (!ph->l2->fn.transceive)
return -EIO;
return ph->l2->fn.transceive(ph, frametype, tx_buf, len, rx_buf,
rx_len, timeout, flags);
}
int rfid_layer2_fini(struct rfid_layer2_handle *ph)
{
if (!ph->l2->fn.fini)
return 0;
return ph->l2->fn.fini(ph);
}
int
rfid_layer2_close(struct rfid_layer2_handle *ph)
{
if (!ph->l2->fn.close)
return 0;
return ph->l2->fn.close(ph);
}
int
rfid_layer2_getopt(struct rfid_layer2_handle *ph, int optname,
void *optval, unsigned int *optlen)
{
if (optname >> 16 == 0) {
unsigned char *optchar = optval;
switch (optname) {
case RFID_OPT_LAYER2_UID:
if (ph->uid_len < *optlen)
*optlen = ph->uid_len;
memcpy(optchar, ph->uid, *optlen);
break;
default:
return -EINVAL;
break;
}
} else {
if (!ph->l2->fn.getopt)
return -EINVAL;
return ph->l2->fn.getopt(ph, optname, optval, optlen);
}
return 0;
}
int
rfid_layer2_setopt(struct rfid_layer2_handle *ph, int optname,
const void *optval, unsigned int optlen)
{
if (optname >> 16 == 0) {
switch (optname) {
default:
return -EINVAL;
break;
}
} else {
if (!ph->l2->fn.setopt)
return -EINVAL;
return ph->l2->fn.setopt(ph, optname, optval, optlen);
}
return 0;
}
char *rfid_layer2_name(struct rfid_layer2_handle *l2h)
{
return l2h->l2->name;
}
+395
View File
@@ -0,0 +1,395 @@
/* ISO 14443-3 A anticollision implementation
*
* (C) 2005-2006 by Harald Welte <laforge@gnumonks.org>
*
*/
/*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2
* as published by the Free Software Foundation
*
* 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, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#include <stdlib.h>
#include <unistd.h>
#include <string.h>
#include <errno.h>
#ifdef __MINGW32__
#include <windows.h>
#endif/*__MINGW32__*/
#include <librfid/rfid.h>
#include <librfid/rfid_layer2.h>
#include <librfid/rfid_reader.h>
#include <librfid/rfid_layer2_iso14443a.h>
#include <librfid/rfid_protocol.h>
#define TIMEOUT 1236
unsigned long randctx[4]={0x22d4a017,0x773a1f44,0xc39e1460,0x9cde8801};
/* Transceive a 7-bit short frame */
int
iso14443a_transceive_sf(struct rfid_layer2_handle *handle,
unsigned char cmd,
struct iso14443a_atqa *atqa)
{
struct rfid_reader *rdr = handle->rh->reader;
return rdr->iso14443a.transceive_sf(handle->rh, cmd, atqa);
}
/* Transmit an anticollission bit frame */
static int
iso14443a_transceive_acf(struct rfid_layer2_handle *handle,
struct iso14443a_anticol_cmd *acf,
unsigned int *bit_of_col)
{
struct rfid_reader *rdr = handle->rh->reader;
return rdr->iso14443a.transceive_acf(handle->rh, acf, bit_of_col);
}
/* Transmit a regular frame */
static int
iso14443a_transceive(struct rfid_layer2_handle *handle,
enum rfid_frametype frametype,
const unsigned char *tx_buf, unsigned int tx_len,
unsigned char *rx_buf, unsigned int *rx_len,
u_int64_t timeout, unsigned int flags)
{
return handle->rh->reader->transceive(handle->rh, frametype, tx_buf,
tx_len, rx_buf, rx_len, timeout, flags);
}
static int
iso14443a_code_nvb_bits(unsigned char *nvb, unsigned int bits)
{
unsigned int byte_count = bits / 8;
unsigned int bit_count = bits % 8;
if (byte_count < 2 || byte_count > 7)
return -1;
*nvb = ((byte_count & 0xf) << 4) | bit_count;
return 0;
}
int random_bit(void)
{
unsigned long e;
e = randctx[0];
randctx[0]=randctx[1];
randctx[1]=(randctx[2]<<19) + (randctx[2]>>13) + randctx[3];
randctx[2]=randctx[3] ^ randctx[0];
randctx[3]=e+randctx[1];
return randctx[1]&1;
}
/* first bit is '1', second bit '2' */
static void
rnd_toggle_bit_in_field(unsigned char *bitfield, unsigned int size, unsigned int bit)
{
unsigned int byte,rnd;
if(bit && (bit <= (size*8)) )
{
rnd=random_bit();
DEBUGP("xor'ing bit %u with %u\n",bit,rnd);
bit--;
byte=bit/8;
bit=rnd<<(bit%8);
bitfield[byte] ^= bit;
}
}
static int
iso14443a_anticol(struct rfid_layer2_handle *handle)
{
int ret;
unsigned int uid_size;
struct iso14443a_handle *h = &handle->priv.iso14443a;
struct iso14443a_atqa *atqa = &h->atqa;
struct iso14443a_anticol_cmd acf;
unsigned int bit_of_col;
unsigned char sak[3];
unsigned int rx_len = sizeof(sak);
char *aqptr = (char *) atqa;
memset(handle->uid, 0, sizeof(handle->uid));
memset(sak, 0, sizeof(sak));
memset(atqa, 0, sizeof(&atqa));
memset(&acf, 0, sizeof(acf));
if (handle->flags & RFID_OPT_LAYER2_WUP)
ret = iso14443a_transceive_sf(handle, ISO14443A_SF_CMD_WUPA, atqa);
else
ret = iso14443a_transceive_sf(handle, ISO14443A_SF_CMD_REQA, atqa);
if (ret < 0) {
h->state = ISO14443A_STATE_REQA_SENT;
DEBUGP("error during transceive_sf: %d\n", ret);
return ret;
}
h->state = ISO14443A_STATE_ATQA_RCVD;
DEBUGP("ATQA: 0x%02x 0x%02x\n", *aqptr, *(aqptr+1));
if (!atqa->bf_anticol) {
h->state = ISO14443A_STATE_NO_BITFRAME_ANTICOL;
DEBUGP("no bitframe anticollission bits set, aborting\n");
return -1;
}
if (atqa->uid_size == 2 || atqa->uid_size == 3)
uid_size = 3;
else if (atqa->uid_size == 1)
uid_size = 2;
else
uid_size = 1;
acf.sel_code = ISO14443A_AC_SEL_CODE_CL1;
h->state = ISO14443A_STATE_ANTICOL_RUNNING;
h->level = ISO14443A_LEVEL_CL1;
cascade:
rx_len = sizeof(sak);
iso14443a_code_nvb_bits(&acf.nvb, 16);
ret = iso14443a_transceive_acf(handle, &acf, &bit_of_col);
if (ret < 0)
return ret;
while (bit_of_col != ISO14443A_BITOFCOL_NONE) {
DEBUGP("collision at pos %u\n", bit_of_col);
iso14443a_code_nvb_bits(&acf.nvb, bit_of_col);
rnd_toggle_bit_in_field(acf.uid_bits, sizeof(acf.uid_bits), bit_of_col);
DEBUGP("acf: nvb=0x%02X uid_bits=%s\n",acf.nvb,rfid_hexdump(acf.uid_bits,sizeof(acf.uid_bits)));
ret = iso14443a_transceive_acf(handle, &acf, &bit_of_col);
if (ret < 0)
return ret;
}
iso14443a_code_nvb_bits(&acf.nvb, 7*8);
ret = iso14443a_transceive(handle, RFID_14443A_FRAME_REGULAR,
(unsigned char *)&acf, 7,
(unsigned char *) &sak, &rx_len,
TIMEOUT, 0);
if (ret < 0)
return ret;
if (sak[0] & 0x04) {
/* Cascade bit set, UID not complete */
switch (acf.sel_code) {
case ISO14443A_AC_SEL_CODE_CL1:
/* cascading from CL1 to CL2 */
if (acf.uid_bits[0] != 0x88) {
DEBUGP("Cascade bit set, but UID0 != 0x88\n");
return -1;
}
memcpy(&handle->uid[0], &acf.uid_bits[1], 3);
acf.sel_code = ISO14443A_AC_SEL_CODE_CL2;
h->level = ISO14443A_LEVEL_CL2;
break;
case ISO14443A_AC_SEL_CODE_CL2:
/* cascading from CL2 to CL3 */
memcpy(&handle->uid[3], &acf.uid_bits[1], 3);
acf.sel_code = ISO14443A_AC_SEL_CODE_CL3;
h->level = ISO14443A_LEVEL_CL3;
break;
default:
DEBUGP("cannot cascade any further than CL3\n");
h->state = ISO14443A_STATE_ERROR;
return -1;
break;
}
goto cascade;
} else {
switch (acf.sel_code) {
case ISO14443A_AC_SEL_CODE_CL1:
/* single size UID (4 bytes) */
memcpy(&handle->uid[0], &acf.uid_bits[0], 4);
break;
case ISO14443A_AC_SEL_CODE_CL2:
/* double size UID (7 bytes) */
memcpy(&handle->uid[3], &acf.uid_bits[0], 4);
break;
case ISO14443A_AC_SEL_CODE_CL3:
/* triple size UID (10 bytes) */
memcpy(&handle->uid[6], &acf.uid_bits[0], 4);
break;
}
}
h->level = ISO14443A_LEVEL_NONE;
h->state = ISO14443A_STATE_SELECTED;
{
if (uid_size == 1)
handle->uid_len = 4;
else if (uid_size == 2)
handle->uid_len = 7;
else
handle->uid_len = 10;
DEBUGP("UID %s\n", rfid_hexdump(handle->uid, handle->uid_len));
}
if (sak[0] & 0x20) {
DEBUGP("we have a T=CL compliant PICC\n");
handle->proto_supported = 1 << RFID_PROTOCOL_TCL;
h->tcl_capable = 1;
} else {
DEBUGP("we have a T!=CL PICC\n");
handle->proto_supported = (1 << RFID_PROTOCOL_MIFARE_UL)|
(1 << RFID_PROTOCOL_MIFARE_CLASSIC);
h->tcl_capable = 0;
}
return 0;
}
static int
iso14443a_hlta(struct rfid_layer2_handle *handle)
{
int ret;
unsigned char tx_buf[2] = { 0x50, 0x00 };
unsigned char rx_buf[10];
unsigned int rx_len = sizeof(rx_buf);
ret = iso14443a_transceive(handle, RFID_14443A_FRAME_REGULAR,
tx_buf, sizeof(tx_buf),
rx_buf, &rx_len, 1000 /* 1ms */, 0);
if (ret < 0) {
/* "error" case: we don't get somethng back from the card */
return 0;
}
return -1;
}
static int
iso14443a_setopt(struct rfid_layer2_handle *handle, int optname,
const void *optval, unsigned int optlen)
{
int ret = -EINVAL;
struct rfid_reader *rdr = handle->rh->reader;
unsigned int speed;
switch (optname) {
case RFID_OPT_14443A_SPEED_RX:
if (!rdr->iso14443a.set_speed)
return -ENOTSUP;
speed = *(unsigned int *)optval;
ret = rdr->iso14443a.set_speed(handle->rh, 0, speed);
break;
case RFID_OPT_14443A_SPEED_TX:
if (!rdr->iso14443a.set_speed)
return -ENOTSUP;
speed = *(unsigned int *)optval;
ret = rdr->iso14443a.set_speed(handle->rh, 1, speed);
break;
case RFID_OPT_14443A_WUPA:
if((unsigned int*)optval)
handle->flags |= RFID_OPT_LAYER2_WUP;
else
handle->flags &= ~RFID_OPT_LAYER2_WUP;
ret = 0;
break;
};
return ret;
}
static int
iso14443a_getopt(struct rfid_layer2_handle *handle, int optname,
void *optval, unsigned int *optlen)
{
int ret = -EINVAL;
struct iso14443a_handle *h = &handle->priv.iso14443a;
struct iso14443a_atqa *atqa = optval;
int *wupa = optval;
switch (optname) {
case RFID_OPT_14443A_ATQA:
*atqa = h->atqa;
ret = 0;
break;
case RFID_OPT_14443A_WUPA:
*wupa = ((handle->flags & RFID_OPT_LAYER2_WUP) != 0);
ret = 0;
break;
};
return ret;
}
static struct rfid_layer2_handle *
iso14443a_init(struct rfid_reader_handle *rh)
{
int ret;
struct rfid_layer2_handle *h = malloc_layer2_handle(sizeof(*h));
if (!h)
return NULL;
memset(h, 0, sizeof(*h));
#ifdef __MINGW32__
randctx[0] ^= GetTickCount();
#endif/*__MINGW32__*/
for(ret=0;ret<23;ret++)
random_bit();
h->l2 = &rfid_layer2_iso14443a;
h->rh = rh;
h->priv.iso14443a.state = ISO14443A_STATE_NONE;
h->priv.iso14443a.level = ISO14443A_LEVEL_NONE;
ret = h->rh->reader->iso14443a.init(h->rh);
if (ret < 0) {
free_layer2_handle(h);
return NULL;
}
return h;
}
static int
iso14443a_fini(struct rfid_layer2_handle *handle)
{
free_layer2_handle(handle);
return 0;
}
const struct rfid_layer2 rfid_layer2_iso14443a = {
.id = RFID_LAYER2_ISO14443A,
.name = "ISO 14443-3 A",
.fn = {
.init = &iso14443a_init,
.open = &iso14443a_anticol,
.transceive = &iso14443a_transceive,
.close = &iso14443a_hlta,
.fini = &iso14443a_fini,
.setopt = &iso14443a_setopt,
.getopt = &iso14443a_getopt,
},
};
+400
View File
@@ -0,0 +1,400 @@
/* ISO 14443-3 B anticollision implementation
*
* (C) 2005-2006 by Harald Welte <laforge@gnumonks.org>
*
*/
/*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2
* as published by the Free Software Foundation
*
* 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, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#include <stdlib.h>
#include <unistd.h>
#include <string.h>
#include <errno.h>
#include <librfid/rfid.h>
#include <librfid/rfid_layer2.h>
#include <librfid/rfid_reader.h>
#include <librfid/rfid_layer2_iso14443b.h>
#include <librfid/rfid_protocol.h>
#include "rfid_iso14443_common.h"
#define ATQB_TIMEOUT ((256*10e6/ISO14443_FREQ_SUBCARRIER) \
+(200*10e6/ISO14443_FREQ_SUBCARRIER))
#undef ATQB_TIMEOUT
#define ATQB_TIMEOUT 1
static inline int
fwi_to_fwt(struct rfid_layer2_handle *h, unsigned int *fwt, unsigned int fwi)
{
unsigned int multiplier, tmp;
/* 15 is RFU */
if (fwi > 14)
return -1;
/* According to ISO 14443-3:200(E), Chapter 7.9.4.3, the forumala is
* (256 * 16 / fC) * 2^fwi We avoid floating point computations by
* shifting everything into the microsecond range. In integer
* calculations 1000000*256*16/13560000 evaluates to 302 (instead of
* 302.064897), which provides sufficient precision, IMHO. The max
* result is 302 * 16384 (4947968), which fits well within the 31/32
* bit range of an integer */
multiplier = 1 << fwi; /* 2 to the power of fwi */
tmp = (unsigned int) 1000000 * 256 * 16;
return (tmp / h->rh->ah->asic->fc) * multiplier;
}
static int
parse_atqb(struct rfid_layer2_handle *h, struct iso14443b_atqb *atqb)
{
int ret;
if (atqb->fifty != 0x50)
return -1;
if (atqb->protocol_info.fo & 0x01)
h->priv.iso14443b.flags |= ISO14443B_CID_SUPPORTED;
if (atqb->protocol_info.fo & 0x02)
h->priv.iso14443b.flags |= ISO14443B_NAD_SUPPORTED;
ret = fwi_to_fwt(h, &h->priv.iso14443b.fwt, atqb->protocol_info.fwi);
if (ret < 0) {
DEBUGP("invalid fwi %u\n", atqb->protocol_info.fwi);
return ret;
}
if (atqb->protocol_info.protocol_type == 0x1) {
DEBUGP("we have a T=CL compliant PICC\n");
h->priv.iso14443b.tcl_capable = 1;
h->proto_supported = (1 << RFID_PROTOCOL_TCL);
} else {
DEBUGP("we have a T!=CL PICC\n");
h->priv.iso14443b.tcl_capable = 0;
/* FIXME: what protocols do we support? */
}
iso14443_fsdi_to_fsd(&h->priv.iso14443b.fsc,
atqb->protocol_info.max_frame_size);
/* FIXME: speed capability */
memcpy(h->uid, atqb->pupi, sizeof(atqb->pupi));
h->uid_len = sizeof(atqb->pupi);
return 0;
}
static int
send_reqb(struct rfid_layer2_handle *h, unsigned char afi,
unsigned int is_wup, unsigned int num_initial_slots)
{
int ret;
unsigned char reqb[3];
struct iso14443b_atqb atqb;
unsigned int atqb_len = sizeof(atqb);
unsigned int num_slot_idx = num_initial_slots;
reqb[0] = 0x05;
reqb[1] = afi;
for (num_slot_idx = num_initial_slots; num_slot_idx <= 4;
num_slot_idx++) {
reqb[2] = num_slot_idx & 0x07;
if (is_wup)
reqb[2] |= 0x08;
ret = h->rh->reader->transceive(h->rh, RFID_14443B_FRAME_REGULAR,
reqb, sizeof(reqb),
(unsigned char *)&atqb,
&atqb_len, ATQB_TIMEOUT, 0);
h->priv.iso14443b.state = ISO14443B_STATE_REQB_SENT;
if (ret < 0) {
DEBUGP("error during transceive of REQB/WUBP\n");
continue;
}
/* FIXME: send N-1 slot marker frames */
if (atqb_len != sizeof(atqb)) {
DEBUGP("error: atqb_len = %u instead of %Zu\n",
atqb_len, sizeof(atqb));
continue;
}
/* FIXME: how to detect a collission at 14443B ? I guess we
* can only rely on the CRC checking (CRCErr in ErrorFlag
* register?) */
if (parse_atqb(h, &atqb) >= 0) {
h->priv.iso14443b.state = ISO14443B_STATE_ATQB_RCVD;
return 0;
}
}
return -1;
}
static inline unsigned int mbli_to_mbl(struct rfid_layer2_handle *h,
unsigned int mbli)
{
return (h->priv.iso14443b.fsc * 2 ^ (mbli-1));
}
static int
transceive_attrib(struct rfid_layer2_handle *h, const unsigned char *inf,
unsigned int inf_len, unsigned char *rx_data, unsigned int *rx_len)
{
struct {
struct iso14443b_attrib_hdr attrib;
char buf[256-3];
} _attrib_buf;
struct iso14443b_attrib_hdr *attrib = &_attrib_buf.attrib;
unsigned char rx_buf[256];
unsigned char fsdi;
int ret = 0;
DEBUGP("fsd is %u\n", h->priv.iso14443b.fsd);
if (rx_len >= rx_len-1)
return -EINVAL;
/* initialize attrib frame */
memset(&_attrib_buf, 0, sizeof(_attrib_buf));
if (inf_len)
memcpy((unsigned char *)attrib+sizeof(*attrib), inf, inf_len);
attrib->one_d = 0x1d;
memcpy(attrib->identifier, h->uid, 4);
/* FIXME: do we want to change TR0/TR1 from its default ? */
/* FIXME: do we want to change SOF/EOF from its default ? */
ret = iso14443_fsd_to_fsdi(&fsdi, h->priv.iso14443b.fsd);
if (ret < 0) {
DEBUGP("unable to map FSD(%u) to FSDI\n",
h->priv.iso14443b.fsd);
goto out_rx;
}
attrib->param2.fsdi = fsdi;
/* FIXME: spd_in / spd_out */
if (h->priv.iso14443b.tcl_capable == 1)
attrib->param3.protocol_type = 0x1;
attrib->param4.cid = h->priv.iso14443b.cid & 0xf;
*rx_len = *rx_len + 1;
ret = h->rh->reader->transceive(h->rh, RFID_14443B_FRAME_REGULAR,
(unsigned char *) attrib,
sizeof(*attrib)+inf_len,
rx_buf, rx_len, h->priv.iso14443b.fwt,
0);
h->priv.iso14443b.state = ISO14443B_STATE_ATTRIB_SENT;
if (ret < 0) {
DEBUGP("transceive problem\n");
goto out_rx;
}
if ((rx_buf[0] & 0x0f) != h->priv.iso14443b.cid) {
DEBUGP("ATTRIB response with invalid CID %u (should be %u)\n",
rx_buf[0] & 0x0f, h->priv.iso14443b.cid);
ret = -1;
goto out_rx;
}
h->priv.iso14443b.state = ISO14443B_STATE_SELECTED;
h->priv.iso14443b.mbl = mbli_to_mbl(h, (rx_data[0] & 0xf0) >> 4);
*rx_len = *rx_len - 1;
memcpy(rx_data, rx_buf+1, *rx_len);
out_rx:
out_attrib:
return ret;
}
static int
iso14443b_hltb(struct rfid_layer2_handle *h)
{
int ret;
unsigned char hltb[5];
unsigned char hltb_resp[1];
unsigned int hltb_len = 1;
hltb[0] = 0x50;
memcpy(hltb+1, h->uid, 4);
ret = h->rh->reader->transceive(h->rh, RFID_14443B_FRAME_REGULAR,
hltb, 5,
hltb_resp, &hltb_len,
h->priv.iso14443b.fwt, 0);
h->priv.iso14443b.state = ISO14443B_STATE_HLTB_SENT;
if (ret < 0) {
DEBUGP("transceive problem\n");
return ret;
}
if (hltb_len != 1 || hltb_resp[0] != 0x00) {
DEBUGP("bad HLTB response\n");
return -1;
}
h->priv.iso14443b.state = ISO14443B_STATE_HALTED;
return 0;
}
static int
iso14443b_anticol(struct rfid_layer2_handle *handle)
{
unsigned char afi = 0; /* FIXME */
int ret;
unsigned char buf[255];
unsigned int buf_len = sizeof(buf);
ret = send_reqb(handle, afi, 0, 0);
if (ret < 0)
return ret;
ret = transceive_attrib(handle, NULL, 0, buf, &buf_len);
if (ret < 0)
return ret;
return 0;
}
static struct rfid_layer2_handle *
iso14443b_init(struct rfid_reader_handle *rh)
{
int ret;
struct rfid_layer2_handle *h = malloc_layer2_handle(sizeof(*h));
if (!h)
return NULL;
h->l2 = &rfid_layer2_iso14443b;
h->rh = rh;
h->priv.iso14443b.state = ISO14443B_STATE_NONE;
/* FIXME: if we want to support multiple PICC's, we need some
* fancy allocation scheme for CID's */
h->priv.iso14443b.cid = 0;
h->priv.iso14443b.fsd = iso14443_fsd_approx(rh->ah->mru);
DEBUGP("fsd is %u\n", h->priv.iso14443b.fsd);
/* 14443-3 Section 7.1.6 */
h->priv.iso14443b.tr0 = (256/ISO14443_FREQ_SUBCARRIER)*10e6;
h->priv.iso14443b.tr1 = (200/ISO14443_FREQ_SUBCARRIER)*10e6;
ret = h->rh->reader->iso14443b.init(h->rh);
if (ret < 0) {
DEBUGP("error during reader 14443b init\n");
free_layer2_handle(h);
return NULL;
}
return h;
}
static int
iso14443b_fini(struct rfid_layer2_handle *handle)
{
free_layer2_handle(handle);
return 0;
}
static int
iso14443b_transceive(struct rfid_layer2_handle *handle,
enum rfid_frametype frametype,
const unsigned char *tx_buf, unsigned int tx_len,
unsigned char *rx_buf, unsigned int *rx_len,
u_int64_t timeout, unsigned int flags)
{
DEBUGP("transcieving %u bytes, expecting max %u\n", tx_len, *rx_len);
return handle->rh->reader->transceive(handle->rh, frametype,
tx_buf, tx_len,
rx_buf, rx_len, timeout, flags);
}
static int
iso14443b_getopt(struct rfid_layer2_handle *handle,
int optname, void *optval, unsigned int *optlen)
{
unsigned int *opt_ui = optval;
switch (optname) {
case RFID_OPT_14443B_CID:
*opt_ui = handle->priv.iso14443b.cid;
break;
case RFID_OPT_14443B_FSC:
*opt_ui = handle->priv.iso14443b.fsc;
break;
case RFID_OPT_14443B_FSD:
*opt_ui = handle->priv.iso14443b.fsd;
break;
case RFID_OPT_14443B_FWT:
*opt_ui = handle->priv.iso14443b.fwt;
break;
case RFID_OPT_14443B_TR0:
*opt_ui = handle->priv.iso14443b.tr0;
break;
case RFID_OPT_14443B_TR1:
*opt_ui = handle->priv.iso14443b.tr1;
break;
default:
return -EINVAL;
break;
}
return 0;
}
static int
iso14443b_setopt(struct rfid_layer2_handle *handle,
int optname, const void *optval, unsigned int optlen)
{
const unsigned int *opt_ui = optval;
switch (optname) {
case RFID_OPT_14443B_CID:
handle->priv.iso14443b.cid = (*opt_ui & 0xf);
break;
defaukt:
return -EINVAL;
break;
}
return 0;
}
const struct rfid_layer2 rfid_layer2_iso14443b = {
.id = RFID_LAYER2_ISO14443B,
.name = "ISO 14443-3 B",
.fn = {
.init = &iso14443b_init,
.open = &iso14443b_anticol,
.transceive = &iso14443b_transceive,
.close = &iso14443b_hltb,
.fini = &iso14443b_fini,
.getopt = &iso14443b_getopt,
.setopt = &iso14443b_setopt,
},
};
+173
View File
@@ -0,0 +1,173 @@
/* ISO 15693 anticollision implementation
*
* (C) 2005-2006 by Harald Welte <laforge@gnumonks.org>
*
*/
/*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2
* as published by the Free Software Foundation
*
* 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, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#include <stdlib.h>
#include <unistd.h>
#include <string.h>
#include <errno.h>
#include <librfid/rfid.h>
#include <librfid/rfid_layer2.h>
#include <librfid/rfid_reader.h>
#include <librfid/rfid_layer2_iso15693.h>
struct iso15693_request_read {
struct iso15693_request req;
u_int64_t uid;
u_int8_t blocknum;
} __attribute__ ((packed));
#define ISO15693_BLOCK_SIZE_MAX (256/8)
#define ISO15693_RESP_SIZE_MAX (4+ISO15693_BLOCK_SIZE_MAX)
#if 0
static int
iso15693_read_block(struct rfid_layer2_handle *handle,
u_int8_t blocknr, u_int32_t *data)
{
int rc;
struct iso15693_request_read req;
u_int8_t resp[ISO15693_RESP_SIZE_MAX];
req.req.flags = 0;
req.command = ISO15693_CMD_READ_BLOCK_SINGLE;
memcpy(&req.uid, handle->..., ISO15693_UID_LEN);
req.blocknum = blocknr;
/* FIXME: fill CRC if required */
rc = iso15693_transceive(... &req, ..., );
if (rc < 0)
return rc;
memcpy(data, resp+1, rc-1); /* FIXME rc-3 in case of CRC */
return rc-1;
}
static int
iso15693_write_block()
{
struct iso16593_request_read *rreq;
u_int32_t buf[sizeof(req)+ISO15693_BLOCK_SIZE_MAX];
rreq = (struct iso15693_request_read *) req;
rreq->req.flags = ;
rreq->req.command = ISO15693_CMD_WRITE_BLOCK_SINGLE;
memcpy(rreq->uid, handle->, ISO15693_UID_LEN);
rreq->blocknum = blocknr;
memcpy(rreq->);
}
static int
iso15693_lock_block()
{
}
#endif
static int
iso15693_anticol(struct rfid_layer2_handle *handle)
{
return -1;
}
static int
iso15693_getopt(struct rfid_layer2_handle *handle,
int optname, void *optval, unsigned int optlen)
{
switch (optname) {
case RFID_OPT_15693_MOD_DEPTH:
case RFID_OPT_15693_VCD_CODING:
case RFID_OPT_15693_VICC_SUBC:
case RFID_OPT_15693_VICC_SPEED:
default:
return -EINVAL;
break;
}
return 0;
}
static int
iso15693_setopt(struct rfid_layer2_handle *handle, int optname,
const void *optval, unsigned int optlen)
{
switch (optname) {
case RFID_OPT_15693_MOD_DEPTH:
case RFID_OPT_15693_VCD_CODING:
case RFID_OPT_15693_VICC_SUBC:
case RFID_OPT_15693_VICC_SPEED:
default:
return -EINVAL;
break;
}
return 0;
}
static int transceive_inventory(struct rfid_layer2_handle *l2h)
{
}
static struct rfid_layer2_handle *
iso15693_init(struct rfid_reader_handle *rh)
{
int ret;
struct rfid_layer2_handle *h = malloc_layer2_handle(sizeof(*h));
if (!h)
return NULL;
h->l2 = &rfid_layer2_iso15693;
h->rh = rh;
h->priv.iso15693.state = ISO15693_STATE_NONE;
ret = h->rh->reader->iso15693.init(h->rh);
if (ret < 0) {
free_layer2_handle(h);
return NULL;
}
return h;
}
static int
iso15693_fini(struct rfid_layer2_handle *handle)
{
free_layer2_handle(handle);
return 0;
}
const struct rfid_layer2 rfid_layer2_iso15693 = {
.id = RFID_LAYER2_ISO15693,
.name = "ISO 15693",
.fn = {
.init = &iso15693_init,
.open = &iso15693_anticol,
//.transceive = &iso15693_transceive,
//.close = &iso14443a_hlta,
.fini = &iso15693_fini,
.setopt = &iso15693_setopt,
.getopt = &iso15693_getopt,
},
};
@@ -0,0 +1,222 @@
/* Mifare Classic implementation, PCD side.
*
* (C) 2005-2006 by Harald Welte <laforge@gnumonks.org>
*
*/
/*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2
* as published by the Free Software Foundation
*
* 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, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <string.h>
#include <errno.h>
#include <librfid/rfid.h>
#include <librfid/rfid_protocol.h>
#include <librfid/rfid_layer2.h>
#include <librfid/rfid_protocol_mifare_classic.h>
#include <librfid/rfid_reader.h>
#include "rfid_iso14443_common.h"
#define MIFARE_UL_CMD_WRITE 0xA2
#define MIFARE_UL_CMD_READ 0x30
/* FIXME */
#define MIFARE_CL_READ_FWT 100
#define MIFARE_CL_WRITE_FWT 100
static int
mfcl_read(struct rfid_protocol_handle *ph, unsigned int page,
unsigned char *rx_data, unsigned int *rx_len)
{
unsigned char rx_buf[16];
unsigned int real_rx_len = sizeof(rx_buf);
unsigned char tx[2];
int ret;
if (page > MIFARE_CL_PAGE_MAX)
return -EINVAL;
tx[0] = MIFARE_CL_CMD_READ;
tx[1] = page & 0xff;
ret = rfid_layer2_transceive(ph->l2h, RFID_MIFARE_FRAME, tx,
sizeof(tx), rx_buf, &real_rx_len,
MIFARE_CL_READ_FWT, 0);
if (ret < 0)
return ret;
if (real_rx_len == 1 && *rx_buf == 0x04)
return -EPERM;
if (real_rx_len < *rx_len)
*rx_len = real_rx_len;
memcpy(rx_data, rx_buf, *rx_len);
return ret;
}
static int
mfcl_write(struct rfid_protocol_handle *ph, unsigned int page,
unsigned char *tx_data, unsigned int tx_len)
{
unsigned int i;
unsigned char tx[18];
unsigned char rx[1];
unsigned int rx_len = sizeof(rx);
int ret;
if (page > MIFARE_CL_PAGE_MAX)
return -EINVAL;
if (tx_len != 16 && tx_len != 4)
return -EINVAL;
if (tx_len == 16) {
tx[0] = MIFARE_CL_CMD_WRITE16;
tx[1] = page & 0xff;
ret = rfid_layer2_transceive(ph->l2h, RFID_MIFARE_FRAME, tx,
2, rx, &rx_len,
MIFARE_CL_WRITE_FWT, 0);
if (ret < 0)
return ret;
ret = rfid_layer2_transceive(ph->l2h, RFID_MIFARE_FRAME, tx_data,
tx_len, rx, &rx_len,
MIFARE_CL_WRITE_FWT, 0);
if (ret < 0)
return ret;
if (rx[0] != MIFARE_UL_RESP_ACK)
return -EIO;
ret = rfid_layer2_transceive(ph->l2h, RFID_MIFARE_FRAME, tx,
sizeof(tx), rx, &rx_len,
MIFARE_CL_WRITE_FWT, 0);
if (ret < 0)
return ret;
if (rx[0] != MIFARE_UL_RESP_ACK)
return -EIO;
} else if (tx_len == 4) {
tx[0] = MIFARE_CL_CMD_WRITE4;
tx[1] = page & 0xff;
memcpy(tx+2, tx_data, 4);
ret = rfid_layer2_transceive(ph->l2h, RFID_MIFARE_FRAME, tx,
2+4, rx, &rx_len,
MIFARE_CL_WRITE_FWT, 0);
if (ret < 0)
return ret;
if (rx[0] != MIFARE_UL_RESP_ACK)
return -EIO;
}
return ret;
}
static int
mfcl_getopt(struct rfid_protocol_handle *ph, int optname, void *optval,
unsigned int *optlen)
{
int ret = -EINVAL;
u_int16_t atqa;
unsigned int atqa_size = sizeof(atqa);
unsigned int *size = optval;
switch (optname) {
case RFID_OPT_PROTO_SIZE:
if (*optlen < sizeof(*size))
return -EINVAL;
*optlen = sizeof(*size);
ret = 0;
rfid_layer2_getopt(ph->l2h, RFID_OPT_14443A_ATQA,
(void *) &atqa, &atqa_size);
if (atqa == 0x0004)
*size = 1024;
else if (atqa == 0x0002)
*size = 4096;
else
ret = -EIO;
break;
}
return ret;
}
static struct rfid_protocol_handle *
mfcl_init(struct rfid_layer2_handle *l2h)
{
struct rfid_protocol_handle *ph;
if (l2h->l2->id != RFID_LAYER2_ISO14443A)
return NULL;
if (l2h->uid_len != 4)
return NULL;
ph = malloc_protocol_handle(sizeof(struct rfid_protocol_handle));
return ph;
}
static int mfcl_fini(struct rfid_protocol_handle *ph)
{
free_protocol_handle(ph);
return 0;
}
const struct rfid_protocol rfid_protocol_mfcl = {
.id = RFID_PROTOCOL_MIFARE_CLASSIC,
.name = "Mifare Classic",
.fn = {
.init = &mfcl_init,
.read = &mfcl_read,
.write = &mfcl_write,
.fini = &mfcl_fini,
.getopt = &mfcl_getopt,
},
};
int mfcl_set_key(struct rfid_protocol_handle *ph, unsigned char *key)
{
if (!ph->l2h->rh->reader->mifare_classic.setkey)
return -ENODEV;
return ph->l2h->rh->reader->mifare_classic.setkey(ph->l2h->rh, key);
}
int mfcl_auth(struct rfid_protocol_handle *ph, u_int8_t cmd, u_int8_t block)
{
u_int32_t serno = *((u_int32_t *)ph->l2h->uid);
if (!ph->l2h->rh->reader->mifare_classic.auth)
return -ENODEV;
return ph->l2h->rh->reader->mifare_classic.auth(ph->l2h->rh, cmd,
serno, block);
}
+198
View File
@@ -0,0 +1,198 @@
/* Mifare Ultralight implementation, PCD side.
*
* (C) 2005-2006 by Harald Welte <laforge@gnumonks.org>
*
*/
/*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2
* as published by the Free Software Foundation
*
* 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, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <string.h>
#include <errno.h>
#include <librfid/rfid.h>
#include <librfid/rfid_protocol.h>
#include <librfid/rfid_layer2.h>
#include <librfid/rfid_protocol_mifare_ul.h>
#include "rfid_iso14443_common.h"
/* FIXME */
#define MIFARE_UL_READ_FWT 100
#define MIFARE_UL_WRITE_FWT 100
static int
mful_read(struct rfid_protocol_handle *ph, unsigned int page,
unsigned char *rx_data, unsigned int *rx_len)
{
unsigned char rx_buf[16];
unsigned int real_rx_len = sizeof(rx_buf);
unsigned char tx[2];
int ret;
if (page > MIFARE_UL_PAGE_MAX)
return -EINVAL;
tx[0] = MIFARE_UL_CMD_READ;
tx[1] = page & 0xff;
ret = rfid_layer2_transceive(ph->l2h, RFID_14443A_FRAME_REGULAR,
tx, sizeof(tx), rx_buf,
&real_rx_len, MIFARE_UL_READ_FWT, 0);
if (ret < 0)
return ret;
if (real_rx_len < *rx_len)
*rx_len = real_rx_len;
memcpy(rx_data, rx_buf, *rx_len);
return ret;
}
static int
mful_write(struct rfid_protocol_handle *ph, unsigned int page,
unsigned char *tx_data, unsigned int tx_len)
{
unsigned int i;
unsigned char tx[6];
unsigned char rx[10];
unsigned int rx_len = sizeof(rx);
int ret;
if (tx_len != 4 || page > MIFARE_UL_PAGE_MAX)
return -EINVAL;
tx[0] = MIFARE_UL_CMD_WRITE;
tx[1] = page & 0xff;
for (i = 0; i < 4; i++)
tx[2+i] = tx_data[i];
ret = rfid_layer2_transceive(ph->l2h, RFID_14443A_FRAME_REGULAR,
tx, sizeof(tx), rx, &rx_len,
MIFARE_UL_WRITE_FWT, 0);
if (ret < 0)
return ret;
if (rx[0] != MIFARE_UL_RESP_ACK)
return -EIO;
return ret;
}
static int
mful_transceive(struct rfid_protocol_handle *ph,
const unsigned char *tx_data, unsigned int tx_len,
unsigned char *rx_data, unsigned int *rx_len,
unsigned int timeout, unsigned int flags)
{
return -EINVAL;
}
static int
mful_getopt(struct rfid_protocol_handle *ph, int optname, void *optval,
unsigned int *optlen)
{
int ret = -EINVAL;
u_int16_t atqa;
unsigned int *size = optval;
switch (optname) {
case RFID_OPT_PROTO_SIZE:
ret = 0;
*size = 512;
break;
}
return ret;
}
static struct rfid_protocol_handle *
mful_init(struct rfid_layer2_handle *l2h)
{
struct rfid_protocol_handle *ph;
u_int16_t atqa;
unsigned int atqa_len = sizeof(atqa);
if (l2h->l2->id != RFID_LAYER2_ISO14443A)
return NULL;
/* According to "Type Identification Procedure Rev. 1.3" */
rfid_layer2_getopt(l2h, RFID_OPT_14443A_ATQA,
&atqa, &atqa_len);
if (atqa != 0x0044)
return NULL;
/* according to "Functional Specification Rev. 3.0 */
if (l2h->uid_len != 7)
return NULL;
ph = malloc_protocol_handle(sizeof(struct rfid_protocol_handle));
return ph;
}
static int mful_fini(struct rfid_protocol_handle *ph)
{
free_protocol_handle(ph);
return 0;
}
const struct rfid_protocol rfid_protocol_mful = {
.id = RFID_PROTOCOL_MIFARE_UL,
.name = "Mifare Ultralight",
.fn = {
.init = &mful_init,
.read = &mful_read,
.write = &mful_write,
.fini = &mful_fini,
.getopt = &mful_getopt,
},
};
/* Functions below are not (yet? covered in the generic librfid api */
/* lock a certain page */
int rfid_mful_lock_page(struct rfid_protocol_handle *ph, unsigned int page)
{
unsigned char buf[4] = { 0x00, 0x00, 0x00, 0x00 };
if (ph->proto != &rfid_protocol_mful)
return -EINVAL;
if (page < 3 || page > 15)
return -EINVAL;
if (page > 8)
buf[2] = (1 << page);
else
buf[3] = (1 << (page - 8));
return mful_write(ph, MIFARE_UL_PAGE_LOCK, buf, sizeof(buf));
}
/* convenience wrapper to lock the otp page */
int rfid_mful_lock_otp(struct rfid_protocol_handle *ph)
{
return rfid_mful_lock_page(ph, MIFARE_UL_PAGE_OTP);
}
+817
View File
@@ -0,0 +1,817 @@
/* ISO 14443-4 (T=CL) implementation, PCD side.
*
* (C) 2005-2006 by Harald Welte <laforge@gnumonks.org>
*
*/
/*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2
* as published by the Free Software Foundation
*
* 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, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <string.h>
#include <errno.h>
#include <librfid/rfid.h>
#include <librfid/rfid_protocol_tcl.h>
#include <librfid/rfid_protocol.h>
#include <librfid/rfid_layer2.h>
#include <librfid/rfid_layer2_iso14443b.h>
#include <librfid/rfid_asic.h>
#include <librfid/rfid_reader.h>
#include "rfid_iso14443_common.h"
#define RFID_MAX_FRAMELEN 256
#define is_s_block(x) ((x & 0xc0) == 0xc0)
#define is_r_block(x) ((x & 0xc0) == 0x80)
#define is_i_block(x) ((x & 0xc0) == 0x00)
static enum rfid_frametype l2_to_frame(unsigned int layer2)
{
switch (layer2) {
case RFID_LAYER2_ISO14443A:
return RFID_14443A_FRAME_REGULAR;
break;
case RFID_LAYER2_ISO14443B:
return RFID_14443B_FRAME_REGULAR;
break;
}
return 0;
}
static unsigned int sfgi_to_sfgt(struct rfid_protocol_handle *h,
unsigned char sfgi)
{
unsigned int multiplier;
unsigned int tmp;
if (sfgi > 14)
sfgi = 14;
multiplier = 1 << sfgi; /* 2 to the power of sfgi */
/* ISO 14443-4:2000(E) Section 5.2.5:
* (256 * 16 / h->l2h->rh->ah->fc) * (2 ^ sfgi) */
tmp = (unsigned int) 1000000 * 256 * 16;
return (tmp / h->l2h->rh->ah->fc) * multiplier;
}
static unsigned int fwi_to_fwt(struct rfid_protocol_handle *h,
unsigned char fwi)
{
unsigned int multiplier, tmp;
if (fwi > 14)
fwi = 14;
multiplier = 1 << fwi; /* 2 to the power of fwi */
/* ISO 14443-4:2000(E) Section 7.2.:
* (256*16 / h->l2h->rh->ah->fc) * (2 ^ fwi) */
tmp = (unsigned int) 1000000 * 256 * 16;
return (tmp / h->l2h->rh->ah->fc) * multiplier;
}
/* 4.9seconds as microseconds (4.9 billion seconds) exceeds 2^32 */
#define activation_fwt(x) (((u_int64_t)1000000 * 65536 / x->l2h->rh->ah->fc))
#define deactivation_fwt(x) activation_fwt(x)
static int
tcl_parse_ats(struct rfid_protocol_handle *h,
unsigned char *ats, unsigned int size)
{
unsigned char len = ats[0];
unsigned char t0;
unsigned char *cur;
if (len == 0 || size == 0)
return -1;
if (size < len)
len = size;
h->priv.tcl.ta = 0;
if (len == 1) {
/* FIXME: assume some default values */
h->priv.tcl.fsc = 32;
h->priv.tcl.ta = 0x80; /* 0x80 (same d for both dirs) */
h->priv.tcl.sfgt = sfgi_to_sfgt(h, 0);
if (h->l2h->l2->id == RFID_LAYER2_ISO14443A) {
/* Section 7.2: fwi default for type A is 4 */
h->priv.tcl.fwt = fwi_to_fwt(h, 4);
} else {
/* Section 7.2: fwi for type B is always in ATQB */
/* Value is assigned in tcl_connect() */
/* This function is never called for Type B,
* since Type B has no (R)ATS */
}
return 0;
}
/* guarateed to be at least 2 bytes in size */
t0 = ats[1];
cur = &ats[2];
iso14443_fsdi_to_fsd(&h->priv.tcl.fsc, t0 & 0x0f);
if (h->priv.tcl.fsc > h->l2h->rh->ah->mtu)
h->priv.tcl.fsc = h->l2h->rh->ah->mtu;
if (t0 & (1 << 4)) {
/* TA is transmitted */
h->priv.tcl.ta = *cur++;
}
if (t0 & (1 << 5)) {
/* TB is transmitted */
h->priv.tcl.sfgt = sfgi_to_sfgt(h, *cur & 0x0f);
h->priv.tcl.fwt = fwi_to_fwt(h, (*cur & 0xf0) >> 4);
cur++;
}
if (t0 & (1 << 6)) {
/* TC is transmitted */
if (*cur & 0x01) {
h->priv.tcl.flags |= TCL_HANDLE_F_NAD_SUPPORTED;
DEBUGP("This PICC supports NAD\n");
}
if (*cur & 0x02) {
h->priv.tcl.flags |= TCL_HANDLE_F_CID_SUPPORTED;
DEBUGP("This PICC supports CID\n");
}
cur++;
}
h->priv.tcl.historical_len = (ats+len) - cur;
h->priv.tcl.historical_bytes = cur;
return 0;
}
/* request an ATS from the PICC */
static int
tcl_request_ats(struct rfid_protocol_handle *h)
{
int ret;
unsigned char rats[2];
unsigned char fsdi;
if (h->priv.tcl.state != TCL_STATE_INITIAL)
return -1;
ret = iso14443_fsd_to_fsdi(&fsdi, h->priv.tcl.fsd);
if (ret < 0) {
DEBUGP("unable to encode FSD of %u as FSDI\n", h->priv.tcl.fsd);
return ret;
}
rats[0] = 0xe0;
rats[1] = (h->priv.tcl.cid & 0x0f) | ((fsdi << 4) & 0xf0);
/* transceive (with CRC) */
ret = rfid_layer2_transceive(h->l2h, RFID_14443A_FRAME_REGULAR,
rats, 2, h->priv.tcl.ats,
&h->priv.tcl.ats_len, activation_fwt(h),
TCL_TRANSP_F_TX_CRC);
if (ret < 0) {
DEBUGP("transceive of rats failed\n");
h->priv.tcl.state = TCL_STATE_RATS_SENT;
/* FIXME: retransmit */
return ret;
}
h->priv.tcl.state = TCL_STATE_ATS_RCVD;
ret = tcl_parse_ats(h, h->priv.tcl.ats, h->priv.tcl.ats_len);
if (ret < 0) {
DEBUGP("parsing of ats failed\n");
return ret;
}
return 0;
}
#define ATS_TA_DIV_2 1
#define ATS_TA_DIV_4 2
#define ATS_TA_DIV_8 4
#define PPS_DIV_8 3
#define PPS_DIV_4 2
#define PPS_DIV_2 1
#define PPS_DIV_1 0
static unsigned char d_to_di(struct rfid_protocol_handle *h, unsigned char D)
{
static char DI;
unsigned int speed = h->l2h->rh->reader->iso14443a.speed;
if ((D & ATS_TA_DIV_8) && (speed & RFID_14443A_SPEED_848K))
DI = PPS_DIV_8;
else if ((D & ATS_TA_DIV_4) && (speed & RFID_14443A_SPEED_424K))
DI = PPS_DIV_4;
else if ((D & ATS_TA_DIV_2) && (speed & RFID_14443A_SPEED_212K))
DI = PPS_DIV_2;
else
DI = PPS_DIV_1;
return DI;
}
static unsigned int di_to_speed(unsigned char DI)
{
switch (DI) {
case PPS_DIV_8:
return RFID_14443A_SPEED_848K;
break;
case PPS_DIV_4:
return RFID_14443A_SPEED_424K;
break;
case PPS_DIV_2:
return RFID_14443A_SPEED_212K;
break;
case PPS_DIV_1:
return RFID_14443A_SPEED_106K;
break;
}
}
/* start a PPS run (autimatically configure highest possible speed */
static int
tcl_do_pps(struct rfid_protocol_handle *h)
{
int ret;
unsigned char ppss[3];
/* FIXME: this stinks like hell. IF we reduce pps_response size to one,
we'll get stack corruption! */
unsigned char pps_response[10];
unsigned int rx_len = 1;
unsigned char Dr, Ds, DrI, DsI;
unsigned int speed;
if (h->priv.tcl.state != TCL_STATE_ATS_RCVD)
return -1;
Dr = h->priv.tcl.ta & 0x07;
Ds = h->priv.tcl.ta & 0x70 >> 4;
DEBUGP("Dr = 0x%x, Ds = 0x%x\n", Dr, Ds);
if (Dr != Ds && !(h->priv.tcl.ta & 0x80)) {
/* device supports different divisors for rx and tx, but not
* really ?!? */
DEBUGP("PICC has contradictory TA, aborting PPS\n");
return -1;
};
/* ISO 14443-4:2000(E) Section 5.3. */
ppss[0] = 0xd0 | (h->priv.tcl.cid & 0x0f);
ppss[1] = 0x11;
ppss[2] = 0x00;
/* FIXME: deal with different speed for each direction */
DrI = d_to_di(h, Dr);
DsI = d_to_di(h, Ds);
DEBUGP("DrI = 0x%x, DsI = 0x%x\n", DrI, DsI);
ppss[2] = (ppss[2] & 0xf0) | (DrI | DsI << 2);
ret = rfid_layer2_transceive(h->l2h, RFID_14443A_FRAME_REGULAR,
ppss, 3, pps_response, &rx_len,
h->priv.tcl.fwt, TCL_TRANSP_F_TX_CRC);
if (ret < 0)
return ret;
if (pps_response[0] != ppss[0]) {
DEBUGP("PPS Response != PPSS\n");
return -1;
}
speed = di_to_speed(DrI);
ret = rfid_layer2_setopt(h->l2h, RFID_OPT_14443A_SPEED_RX,
&speed, sizeof(speed));
if (ret < 0)
return ret;
ret = rfid_layer2_setopt(h->l2h, RFID_OPT_14443A_SPEED_TX,
&speed, sizeof(speed));
if (ret < 0)
return ret;
return 0;
}
static int
tcl_build_prologue2(struct tcl_handle *th,
unsigned char *prlg, unsigned int *prlg_len,
unsigned char pcb)
{
*prlg_len = 1;
*prlg = pcb;
if (!is_s_block(pcb)) {
if (th->toggle) {
/* we've sent a toggle bit last time */
th->toggle = 0;
} else {
/* we've not sent a toggle last time: send one */
th->toggle = 1;
*prlg |= 0x01;
}
}
if (th->flags & TCL_HANDLE_F_CID_USED) {
/* ISO 14443-4:2000(E) Section 7.1.1.2 */
*prlg |= TCL_PCB_CID_FOLLOWING;
(*prlg_len)++;
prlg[*prlg_len] = th->cid & 0x0f;
}
/* nad only for I-block */
if ((th->flags & TCL_HANDLE_F_NAD_USED) && is_i_block(pcb)) {
/* ISO 14443-4:2000(E) Section 7.1.1.3 */
/* FIXME: in case of chaining only for first frame */
*prlg |= TCL_PCB_NAD_FOLLOWING;
prlg[*prlg_len] = th->nad;
(*prlg_len)++;
}
return 0;
}
static int
tcl_build_prologue_i(struct tcl_handle *th,
unsigned char *prlg, unsigned int *prlg_len)
{
/* ISO 14443-4:2000(E) Section 7.1.1.1 */
return tcl_build_prologue2(th, prlg, prlg_len, 0x02);
}
static int
tcl_build_prologue_r(struct tcl_handle *th,
unsigned char *prlg, unsigned int *prlg_len,
unsigned int nak)
{
unsigned char pcb = 0xa2;
/* ISO 14443-4:2000(E) Section 7.1.1.1 */
if (nak)
pcb |= 0x10;
return tcl_build_prologue2(th, prlg, prlg_len, pcb);
}
static int
tcl_build_prologue_s(struct tcl_handle *th,
unsigned char *prlg, unsigned int *prlg_len)
{
/* ISO 14443-4:2000(E) Section 7.1.1.1 */
/* the only S-block from PCD->PICC is DESELECT,
* well, actually there is the S(WTX) response. */
return tcl_build_prologue2(th, prlg, prlg_len, 0xc2);
}
/* FIXME: WTXM implementation */
static int tcl_prlg_len(struct tcl_handle *th)
{
int prlg_len = 1;
if (th->flags & TCL_HANDLE_F_CID_USED)
prlg_len++;
if (th->flags & TCL_HANDLE_F_NAD_USED)
prlg_len++;
return prlg_len;
}
#define max_net_tx_framesize(x) (x->fsc - tcl_prlg_len(x))
static int
tcl_connect(struct rfid_protocol_handle *h)
{
int ret;
if (h->priv.tcl.state != TCL_STATE_DESELECTED &&
h->priv.tcl.state != TCL_STATE_INITIAL)
return -1;
switch (h->l2h->l2->id) {
case RFID_LAYER2_ISO14443A:
/* Start Type A T=CL Activation Sequence */
ret = tcl_request_ats(h);
if (ret < 0)
return ret;
/* Only do PPS if any non-default divisors supported */
if (h->priv.tcl.ta & 0x77) {
ret = tcl_do_pps(h);
if (ret < 0)
return ret;
}
break;
case RFID_LAYER2_ISO14443B:
/* initialized T=CL state from Type B Activation Data */
h->priv.tcl.cid = h->l2h->priv.iso14443b.cid;
h->priv.tcl.fsc = h->l2h->priv.iso14443b.fsc;
h->priv.tcl.fsd = h->l2h->priv.iso14443b.fsd;
h->priv.tcl.fwt = h->l2h->priv.iso14443b.fwt;
/* what about ta? sfgt? */
if (h->l2h->priv.iso14443b.flags & ISO14443B_CID_SUPPORTED)
h->priv.tcl.flags |= TCL_HANDLE_F_CID_SUPPORTED;
if (h->l2h->priv.iso14443b.flags & ISO14443B_NAD_SUPPORTED)
h->priv.tcl.flags |= TCL_HANDLE_F_NAD_SUPPORTED;
switch (h->l2h->priv.iso14443b.state) {
case ISO14443B_STATE_SELECTED:
h->priv.tcl.state = TCL_STATE_ATS_RCVD;
break;
case ISO14443B_STATE_ATTRIB_SENT:
h->priv.tcl.state = TCL_STATE_RATS_SENT;
break;
}
/* PUPI will be presented as ATS/historical bytes */
memcpy(h->priv.tcl.ats, h->l2h->uid, 4);
h->priv.tcl.ats_len = 4;
h->priv.tcl.historical_bytes = h->priv.tcl.ats;
break;
default:
DEBUGP("unsupported l2: %u\n", h->l2h->l2->id);
return -1;
break;
}
h->priv.tcl.state = TCL_STATE_ESTABLISHED;
return 0;
}
static int
tcl_deselect(struct rfid_protocol_handle *h)
{
/* ISO 14443-4:2000(E) Section 8 */
int ret;
unsigned char frame[3]; /* 3 bytes prologue, no information */
unsigned char rx[3];
unsigned int rx_len = sizeof(rx);
unsigned int prlg_len;
struct tcl_handle *th = &h->priv.tcl;
if (th->state != TCL_STATE_ESTABLISHED) {
/* FIXME: not sure whether deselect is possible here,
* probably better send a HLTA? */
}
/* build DESELECT S-block */
ret = tcl_build_prologue_s(th, frame, &prlg_len);
if (ret < 0)
return ret;
ret = rfid_layer2_transceive(h->l2h, RFID_14443A_FRAME_REGULAR,
frame, prlg_len, rx,
&rx_len, deactivation_fwt(h),
TCL_TRANSP_F_TX_CRC);
if (ret < 0) {
/* FIXME: retransmit, HLT(A|B) */
return ret;
}
th->state = TCL_STATE_DESELECTED;
return 0;
}
struct fr_buff {
unsigned int frame_len; /* length of frame */
unsigned int hdr_len; /* length of header within frame */
unsigned char data[RFID_MAX_FRAMELEN];
};
#define frb_payload(x) (x.data + x.hdr_len)
/* RFID transceive buffer. */
struct rfid_xcvb {
struct rfix_xcvb *next; /* next in queue of buffers */
u_int64_t timeout; /* timeout to wait for reply */
struct fr_buff tx;
struct fr_buff rx;
//struct rfid_protocol_handle *h; /* connection to which we belong */
};
struct tcl_tx_context {
const unsigned char *tx;
unsigned char *rx;
const unsigned char *next_tx_byte;
unsigned char *next_rx_byte;
unsigned int rx_len;
unsigned int tx_len;
struct rfid_protocol_handle *h;
};
#define tcl_ctx_todo(ctx) (ctx->tx_len - (ctx->next_tx_byte - ctx->tx))
static int
tcl_refill_xcvb(struct rfid_xcvb *xcvb, struct tcl_tx_context *ctx)
{
struct tcl_handle *th = &ctx->h->priv.tcl;
if (ctx->next_tx_byte >= ctx->tx + ctx->tx_len) {
DEBUGP("tyring to refill tx xcvb but no data left!\n");
return -1;
}
if (tcl_build_prologue_i(th, xcvb->tx.data,
&xcvb->tx.hdr_len) < 0)
return -1;
if (tcl_ctx_todo(ctx) > th->fsc - xcvb->tx.hdr_len)
xcvb->tx.frame_len = max_net_tx_framesize(th);
else
xcvb->tx.frame_len = tcl_ctx_todo(ctx);
memcpy(frb_payload(xcvb->tx), ctx->next_tx_byte,
xcvb->tx.frame_len);
ctx->next_tx_byte += xcvb->tx.frame_len;
/* check whether we need to set the chaining bit */
if (ctx->next_tx_byte < ctx->tx + ctx->tx_len)
xcvb->tx.data[0] |= 0x10;
/* add hdr_len after copying the net payload */
xcvb->tx.frame_len += xcvb->tx.hdr_len;
xcvb->timeout = th->fwt;
return 0;
}
static void fill_xcvb_wtxm(struct tcl_handle *th, struct rfid_xcvb *xcvb,
unsigned char inf)
{
/* Acknowledge WTXM */
tcl_build_prologue_s(th, xcvb->tx.data, &xcvb->tx.hdr_len);
/* set two bits that make this block a wtx */
xcvb->tx.data[0] |= 0x30;
xcvb->tx.data[xcvb->tx.hdr_len] = inf;
xcvb->tx.frame_len = xcvb->tx.hdr_len+1;
xcvb->timeout = th->fwt * inf;
}
static int check_cid(struct tcl_handle *th, struct rfid_xcvb *xcvb)
{
if (xcvb->rx.data[0] & TCL_PCB_CID_FOLLOWING) {
if (xcvb->rx.data[1] != th->cid) {
DEBUGP("CID %u is not valid, we expected %u\n",
xcvb->rx.data[1], th->cid);
return 0;
}
}
return 1;
}
static int
tcl_transceive(struct rfid_protocol_handle *h,
const unsigned char *tx_data, unsigned int tx_len,
unsigned char *rx_data, unsigned int *rx_len,
unsigned int timeout, unsigned int flags)
{
int ret;
struct rfid_xcvb xcvb;
struct tcl_tx_context tcl_ctx;
struct tcl_handle *th = &h->priv.tcl;
unsigned char ack[10];
unsigned int ack_len;
/* initialize context */
tcl_ctx.next_tx_byte = tcl_ctx.tx = tx_data;
tcl_ctx.next_rx_byte = tcl_ctx.rx = rx_data;
tcl_ctx.rx_len = *rx_len;
tcl_ctx.tx_len = tx_len;
tcl_ctx.h = h;
/* initialize xcvb */
xcvb.timeout = th->fwt;
tx_refill:
if (tcl_refill_xcvb(&xcvb, &tcl_ctx) < 0) {
ret = -1;
goto out;
}
do_tx:
xcvb.rx.frame_len = sizeof(xcvb.rx.data);
ret = rfid_layer2_transceive(h->l2h, l2_to_frame(h->l2h->l2->id),
xcvb.tx.data, xcvb.tx.frame_len,
xcvb.rx.data, &xcvb.rx.frame_len,
xcvb.timeout, 0);
DEBUGP("l2 transceive finished\n");
if (ret < 0)
goto out;
if (is_r_block(xcvb.rx.data[0])) {
DEBUGP("R-Block\n");
if ((xcvb.rx.data[0] & 0x01) != h->priv.tcl.toggle) {
DEBUGP("response with wrong toggle bit\n");
goto out;
}
/* Handle ACK frame in case of chaining */
if (!check_cid(th, &xcvb))
goto out;
goto tx_refill;
} else if (is_s_block(xcvb.rx.data[0])) {
unsigned char inf;
unsigned int prlg_len;
DEBUGP("S-Block\n");
/* Handle Wait Time Extension */
if (!check_cid(th, &xcvb))
goto out;
if (xcvb.rx.data[0] & TCL_PCB_CID_FOLLOWING) {
if (xcvb.rx.frame_len < 3) {
DEBUGP("S-Block with CID but short len\n");
ret = -1;
goto out;
}
inf = xcvb.rx.data[2];
} else
inf = xcvb.rx.data[1];
if ((xcvb.rx.data[0] & 0x30) != 0x30) {
DEBUGP("S-Block but not WTX?\n");
ret = -1;
goto out;
}
inf &= 0x3f; /* only lower 6 bits code WTXM */
if (inf == 0 || (inf >= 60 && inf <= 63)) {
DEBUGP("WTXM %u is RFU!\n", inf);
ret = -1;
goto out;
}
fill_xcvb_wtxm(th, &xcvb, inf);
/* start over with next transceive */
goto do_tx;
} else if (is_i_block(xcvb.rx.data[0])) {
unsigned int net_payload_len;
/* we're actually receiving payload data */
DEBUGP("I-Block: ");
if ((xcvb.rx.data[0] & 0x01) != h->priv.tcl.toggle) {
DEBUGP("response with wrong toggle bit\n");
goto out;
}
xcvb.rx.hdr_len = 1;
if (!check_cid(th, &xcvb))
goto out;
if (xcvb.rx.data[0] & TCL_PCB_CID_FOLLOWING)
xcvb.rx.hdr_len++;
if (xcvb.rx.data[0] & TCL_PCB_NAD_FOLLOWING)
xcvb.rx.hdr_len++;
net_payload_len = xcvb.rx.frame_len - xcvb.rx.hdr_len;
DEBUGPC("%u bytes\n", net_payload_len);
memcpy(tcl_ctx.next_rx_byte, &xcvb.rx.data[xcvb.rx.hdr_len],
net_payload_len);
tcl_ctx.next_rx_byte += net_payload_len;
if (xcvb.rx.data[0] & 0x10) {
/* we're not the last frame in the chain, continue rx */
DEBUGP("not the last frame in the chain, continue\n");
ack_len = sizeof(ack);
tcl_build_prologue_r(th, xcvb.tx.data, &xcvb.tx.frame_len, 0);
xcvb.timeout = th->fwt;
goto do_tx;
}
}
out:
*rx_len = tcl_ctx.next_rx_byte - tcl_ctx.rx;
return ret;
}
static struct rfid_protocol_handle *
tcl_init(struct rfid_layer2_handle *l2h)
{
struct rfid_protocol_handle *th;
unsigned int mru = l2h->rh->ah->mru;
th = malloc_protocol_handle(sizeof(struct rfid_protocol_handle));
if (!th)
return NULL;
/* FIXME: mru should be attribute of layer2 (in case it adds/removes
* some overhead */
memset(th, 0, sizeof(struct rfid_protocol_handle));
/* maximum received ats length equals mru of asic/reader */
th->priv.tcl.state = TCL_STATE_INITIAL;
th->priv.tcl.ats_len = mru;
th->priv.tcl.toggle = 1;
th->priv.tcl.fsd = iso14443_fsd_approx(mru);
return th;
}
static int
tcl_fini(struct rfid_protocol_handle *ph)
{
free_protocol_handle(ph);
return 0;
}
int
tcl_getopt(struct rfid_protocol_handle *h, int optname, void *optval,
unsigned int *optlen)
{
u_int8_t *opt_str = optval;
switch (optname) {
case RFID_OPT_P_TCL_ATS:
if (h->priv.tcl.ats_len < *optlen)
*optlen = h->priv.tcl.ats_len;
memcpy(opt_str, h->priv.tcl.ats, *optlen);
break;
case RFID_OPT_P_TCL_ATS_LEN:
if (*optlen < sizeof(u_int8_t))
return -E2BIG;
*optlen = sizeof(u_int8_t);
*opt_str = h->priv.tcl.ats_len & 0xff;
break;
default:
return -EINVAL;
}
return 0;
}
int
tcl_setopt(struct rfid_protocol_handle *h, int optname, const void *optval,
unsigned int optlen)
{
int ret = -EINVAL;
switch (optname) {
default:
break;
}
return ret;
}
const struct rfid_protocol rfid_protocol_tcl = {
.id = RFID_PROTOCOL_TCL,
.name = "ISO 14443-4 / T=CL",
.fn = {
.init = &tcl_init,
.open = &tcl_connect,
.transceive = &tcl_transceive,
.close = &tcl_deselect,
.fini = &tcl_fini,
.getopt = &tcl_getopt,
.setopt = &tcl_setopt,
},
};
+152
View File
@@ -0,0 +1,152 @@
/* librfid - layer 4 protocol handler
* (C) 2005-2006 by Harald Welte <laforge@gnumonks.org>
*/
/*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2
* as published by the Free Software Foundation
*
* 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, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#include <stdlib.h>
#include <unistd.h>
#include <errno.h>
#include <librfid/rfid_layer2.h>
#include <librfid/rfid_protocol.h>
static const struct rfid_protocol *rfid_protocols[] = {
[RFID_PROTOCOL_MIFARE_CLASSIC] = &rfid_protocol_mfcl,
[RFID_PROTOCOL_MIFARE_UL] = &rfid_protocol_mful,
[RFID_PROTOCOL_TCL] = &rfid_protocol_tcl,
};
struct rfid_protocol_handle *
rfid_protocol_init(struct rfid_layer2_handle *l2h, unsigned int id)
{
struct rfid_protocol *p;
struct rfid_protocol_handle *ph = NULL;
if (id >= ARRAY_SIZE(rfid_protocols))
return NULL;
p = rfid_protocols[id];
ph = p->fn.init(l2h);
if (!ph)
return NULL;
ph->proto = p;
ph->l2h = l2h;
return ph;
}
int
rfid_protocol_open(struct rfid_protocol_handle *ph)
{
if (ph->proto->fn.open)
return ph->proto->fn.open(ph);
return 0;
}
int
rfid_protocol_transceive(struct rfid_protocol_handle *ph,
const unsigned char *tx_buf, unsigned int len,
unsigned char *rx_buf, unsigned int *rx_len,
unsigned int timeout, unsigned int flags)
{
return ph->proto->fn.transceive(ph, tx_buf, len, rx_buf, rx_len,
timeout, flags);
}
int
rfid_protocol_read(struct rfid_protocol_handle *ph,
unsigned int page,
unsigned char *rx_data,
unsigned int *rx_len)
{
if (ph->proto->fn.read)
return ph->proto->fn.read(ph, page, rx_data, rx_len);
else
return -EINVAL;
}
int
rfid_protocol_write(struct rfid_protocol_handle *ph,
unsigned int page,
unsigned char *tx_data,
unsigned int tx_len)
{
if (ph->proto->fn.write)
return ph->proto->fn.write(ph, page, tx_data, tx_len);
else
return -EINVAL;
}
int rfid_protocol_fini(struct rfid_protocol_handle *ph)
{
return ph->proto->fn.fini(ph);
}
int
rfid_protocol_close(struct rfid_protocol_handle *ph)
{
if (ph->proto->fn.close)
return ph->proto->fn.close(ph);
return 0;
}
int
rfid_protocol_getopt(struct rfid_protocol_handle *ph, int optname,
void *optval, unsigned int *optlen)
{
if (optname >> 16 == 0) {
unsigned char *optchar = optval;
switch (optname) {
default:
return -EINVAL;
break;
}
} else {
if (!ph->proto->fn.getopt)
return -EINVAL;
return ph->proto->fn.getopt(ph, optname, optval, optlen);
}
return 0;
}
int
rfid_protocol_setopt(struct rfid_protocol_handle *ph, int optname,
const void *optval, unsigned int optlen)
{
if (optname >> 16 == 0) {
switch (optname) {
default:
return -EINVAL;
break;
}
} else {
if (!ph->proto->fn.setopt)
return -EINVAL;
return ph->proto->fn.setopt(ph, optname, optval, optlen);
}
return 0;
}
char *rfid_protocol_name(struct rfid_protocol_handle *ph)
{
return ph->proto->name;
}
+67
View File
@@ -0,0 +1,67 @@
/* librfid - core reader handling
* (C) 2005-2006 by Harald Welte <laforge@gnumonks.org>
*/
/*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2
* as published by the Free Software Foundation
*
* 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, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#include <stdlib.h>
#include <stdio.h>
#include <librfid/rfid.h>
#include <librfid/rfid_reader.h>
#include <librfid/rfid_reader_cm5121.h>
#include <librfid/rfid_reader_openpcd.h>
static const struct rfid_reader *rfid_readers[] = {
#ifdef ENABLE_CM5121
[RFID_READER_CM5121] = &rfid_reader_cm5121,
#endif
[RFID_READER_OPENPCD] = &rfid_reader_openpcd,
};
struct rfid_reader_handle *
rfid_reader_open(void *data, unsigned int id)
{
const struct rfid_reader *p;
if (id >= ARRAY_SIZE(rfid_readers)) {
DEBUGP("unable to find matching reader\n");
return NULL;
}
p = rfid_readers[id];
if (!p)
return NULL;
return p->open(data);
}
int
rfid_reader_transceive(struct rfid_reader_handle *rh,
enum rfid_frametype frametype,
const unsigned char *tx_buf, unsigned int len,
unsigned char *rx_buf, unsigned int *rx_len,
u_int64_t timeout, unsigned int flags)
{
return rh->reader->transceive(rh, frametype, tx_buf, len, rx_buf,
rx_len, timeout, flags);
}
void
rfid_reader_close(struct rfid_reader_handle *rh)
{
rh->reader->close(rh);
}
+392
View File
@@ -0,0 +1,392 @@
/* Omnikey CardMan 5121 specific RC632 transport layer
*
* (C) 2005-2006 by Harald Welte <laforge@gnumonks.org>
*
* The 5121 is an Atmel AT89C5122 based USB CCID reader (probably the same
* design like the 3121). It's CL RC632 is connected via address/data bus,
* not via SPI.
*
* The vendor-supplied reader firmware provides some undocumented extensions
* to CCID (via PC_to_RDR_Escape) that allow access to registers and FIFO of
* the RC632.
*
*/
/*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2
* as published by the Free Software Foundation
*
* 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, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#include <stdlib.h>
#include <unistd.h>
#include <string.h>
#include <errno.h>
#include <librfid/rfid.h>
#ifndef LIBRFID_FIRMWARE
#include <librfid/rfid_reader.h>
#include <librfid/rfid_asic.h>
#include <librfid/rfid_asic_rc632.h>
#include <librfid/rfid_reader_cm5121.h>
#include <librfid/rfid_layer2.h>
#include <librfid/rfid_protocol.h>
#include "cm5121_source.h"
/* FIXME */
#include "rc632.h"
#define SENDBUF_LEN 256+7+10 /* 256bytes max FSD/FSC, plus 7 bytes header,
plus 10 bytes reserve */
#define RECVBUF_LEN SENDBUF_LEN
//#define DEBUG_REGISTER
#ifdef DEBUG_REGISTER
#define DEBUGRC DEBUGPC
#define DEBUGR DEBUGP
#else
#define DEBUGRC(x, args ...) do {} while(0)
#define DEBUGR(x, args ...) do {} while(0)
#endif
static
int Write1ByteToReg(struct rfid_asic_transport_handle *rath,
unsigned char reg, unsigned char value)
{
unsigned char sndbuf[SENDBUF_LEN];
unsigned char rcvbuf[RECVBUF_LEN];
size_t retlen = RECVBUF_LEN;
sndbuf[0] = 0x20;
sndbuf[1] = 0x00;
sndbuf[2] = 0x01;
sndbuf[3] = 0x00;
sndbuf[4] = 0x00;
sndbuf[5] = 0x00;
sndbuf[6] = reg;
sndbuf[7] = value;
DEBUGR("reg=0x%02x, val=%02x: ", reg, value);
if (PC_to_RDR_Escape(rath->data, sndbuf, 8, rcvbuf,
&retlen) == 0) {
DEBUGRC("OK\n");
return 0;
}
DEBUGRC("ERROR\n");
return -1;
}
static int Read1ByteFromReg(struct rfid_asic_transport_handle *rath,
unsigned char reg,
unsigned char *value)
{
unsigned char sndbuf[SENDBUF_LEN];
unsigned char recvbuf[RECVBUF_LEN];
size_t retlen = sizeof(recvbuf);
sndbuf[0] = 0x20;
sndbuf[1] = 0x00;
sndbuf[2] = 0x00;
sndbuf[3] = 0x00;
sndbuf[4] = 0x01;
sndbuf[5] = 0x00;
sndbuf[6] = reg;
if (PC_to_RDR_Escape(rath->data, sndbuf, 7, recvbuf,
&retlen) == 0) {
*value = recvbuf[1];
DEBUGR("reg=0x%02x, val=%02x: ", reg, *value);
DEBUGRC("OK\n");
return 0;
}
DEBUGRC("ERROR\n");
return -1;
}
static int ReadNBytesFromFIFO(struct rfid_asic_transport_handle *rath,
unsigned char num_bytes,
unsigned char *buf)
{
unsigned char sndbuf[SENDBUF_LEN];
unsigned char recvbuf[0x7f];
size_t retlen = sizeof(recvbuf);
sndbuf[0] = 0x20;
sndbuf[1] = 0x00;
sndbuf[2] = 0x00;
sndbuf[3] = 0x00;
sndbuf[4] = num_bytes;
sndbuf[5] = 0x00;
sndbuf[6] = 0x02;
DEBUGR("num_bytes=%u: ", num_bytes);
if (PC_to_RDR_Escape(rath->data, sndbuf, 7, recvbuf, &retlen) == 0) {
DEBUGRC("%u [%s]\n", retlen,
rfid_hexdump(recvbuf+1, num_bytes));
memcpy(buf, recvbuf+1, num_bytes); // len == 0x7f
return 0;
}
DEBUGRC("ERROR\n");
return -1;
}
static int WriteNBytesToFIFO(struct rfid_asic_transport_handle *rath,
unsigned char len,
const unsigned char *bytes,
unsigned char flags)
{
unsigned char sndbuf[SENDBUF_LEN];
unsigned char recvbuf[0x7f];
size_t retlen = sizeof(recvbuf);
sndbuf[0] = 0x20;
sndbuf[1] = 0x00;
sndbuf[2] = len;
sndbuf[3] = 0x00;
sndbuf[4] = 0x00;
sndbuf[5] = flags;
sndbuf[6] = 0x02;
DEBUGR("%u [%s]: ", len, rfid_hexdump(bytes, len));
memcpy(sndbuf+7, bytes, len);
if (PC_to_RDR_Escape(rath->data, sndbuf, len+7, recvbuf, &retlen) == 0) {
DEBUGRC("OK (%u [%s])\n", retlen, rfid_hexdump(recvbuf, retlen));
return 0;
}
DEBUGRC("ERROR\n");
return -1;
}
#if 0
static int TestFIFO(struct rc632_handle *handle)
{
unsigned char sndbuf[60]; // 0x3c
// FIXME: repne stosd, call
memset(sndbuf, 0, sizeof(sndbuf));
if (WriteNBytesToFIFO(handle, sizeof(sndbuf), sndbuf, 0) < 0)
return -1;
return ReadNBytesFromFIFO(handle, sizeof(sndbuf), sndbuf);
}
#endif
static int cm5121_transceive(struct rfid_reader_handle *rh,
enum rfid_frametype frametype,
const unsigned char *tx_data, unsigned int tx_len,
unsigned char *rx_data, unsigned int *rx_len,
u_int64_t timeout, unsigned int flags)
{
return rh->ah->asic->priv.rc632.fn.transceive(rh->ah, frametype,
tx_data, tx_len, rx_data,
rx_len, timeout, flags);
}
static int cm5121_transceive_sf(struct rfid_reader_handle *rh,
unsigned char cmd, struct iso14443a_atqa *atqa)
{
return rh->ah->asic->priv.rc632.fn.iso14443a.transceive_sf(rh->ah,
cmd,
atqa);
}
static int
cm5121_transceive_acf(struct rfid_reader_handle *rh,
struct iso14443a_anticol_cmd *cmd,
unsigned int *bit_of_col)
{
return rh->ah->asic->priv.rc632.fn.iso14443a.transceive_acf(rh->ah,
cmd, bit_of_col);
}
static int
cm5121_14443a_init(struct rfid_reader_handle *rh)
{
return rh->ah->asic->priv.rc632.fn.iso14443a.init(rh->ah);
}
static int
cm5121_14443a_set_speed(struct rfid_reader_handle *rh,
unsigned int tx,
unsigned int speed)
{
u_int8_t rate;
DEBUGP("setting rate: ");
switch (speed) {
case RFID_14443A_SPEED_106K:
rate = 0x00;
DEBUGPC("106K\n");
break;
case RFID_14443A_SPEED_212K:
rate = 0x01;
DEBUGPC("212K\n");
break;
case RFID_14443A_SPEED_424K:
rate = 0x02;
DEBUGPC("424K\n");
break;
case RFID_14443A_SPEED_848K:
rate = 0x03;
DEBUGPC("848K\n");
break;
default:
DEBUGPC("invalid\n");
return -EINVAL;
break;
}
return rh->ah->asic->priv.rc632.fn.iso14443a.set_speed(rh->ah,
tx, rate);
}
static int
cm5121_14443b_init(struct rfid_reader_handle *rh)
{
return rh->ah->asic->priv.rc632.fn.iso14443b.init(rh->ah);
}
static int
cm5121_15693_init(struct rfid_reader_handle *rh)
{
return rh->ah->asic->priv.rc632.fn.iso15693.init(rh->ah);
}
static int
cm5121_mifare_setkey(struct rfid_reader_handle *rh, const u_int8_t *key)
{
return rh->ah->asic->priv.rc632.fn.mifare_classic.setkey(rh->ah, key);
}
static int
cm5121_mifare_auth(struct rfid_reader_handle *rh, u_int8_t cmd,
u_int32_t serno, u_int8_t block)
{
return rh->ah->asic->priv.rc632.fn.mifare_classic.auth(rh->ah,
cmd, serno, block);
}
struct rfid_asic_transport cm5121_ccid = {
.name = "CM5121 OpenCT",
.priv.rc632 = {
.fn = {
.reg_write = &Write1ByteToReg,
.reg_read = &Read1ByteFromReg,
.fifo_write = &WriteNBytesToFIFO,
.fifo_read = &ReadNBytesFromFIFO,
},
},
};
static int cm5121_enable_rc632(struct rfid_asic_transport_handle *rath)
{
unsigned char tx_buf[1] = { 0x01 };
unsigned char rx_buf[64];
size_t rx_len = sizeof(rx_buf);
PC_to_RDR_Escape(rath->data, tx_buf, 1, rx_buf, &rx_len);
return 0;
}
static struct rfid_reader_handle *
cm5121_open(void *data)
{
struct rfid_reader_handle *rh;
struct rfid_asic_transport_handle *rath;
rh = malloc_reader_handle(sizeof(*rh));
if (!rh)
return NULL;
memset(rh, 0, sizeof(*rh));
rath = malloc_rat_handle(sizeof(*rath));
if (!rath)
goto out_rh;
memset(rath, 0, sizeof(*rath));
rath->rat = &cm5121_ccid;
rh->reader = &rfid_reader_cm5121;
if (cm5121_source_init(rath) < 0)
goto out_rath;
if (cm5121_enable_rc632(rath) < 0)
goto out_rath;
rh->ah = rc632_open(rath);
if (!rh->ah)
goto out_rath;
DEBUGP("returning %p\n", rh);
return rh;
out_rath:
free_rat_handle(rath);
out_rh:
free_reader_handle(rh);
return NULL;
}
static void
cm5121_close(struct rfid_reader_handle *rh)
{
struct rfid_asic_transport_handle *rath = rh->ah->rath;
rc632_close(rh->ah);
free_rat_handle(rath);
free_reader_handle(rh);
}
const struct rfid_reader rfid_reader_cm5121 = {
.name = "Omnikey CardMan 5121 RFID",
.open = &cm5121_open,
.close = &cm5121_close,
.transceive = &cm5121_transceive,
.l2_supported = (1 << RFID_LAYER2_ISO14443A) |
(1 << RFID_LAYER2_ISO14443B) |
(1 << RFID_LAYER2_ISO15693),
.proto_supported = (1 << RFID_PROTOCOL_TCL) |
(1 << RFID_PROTOCOL_MIFARE_UL) |
(1 << RFID_PROTOCOL_MIFARE_CLASSIC),
.iso14443a = {
.init = &cm5121_14443a_init,
.transceive_sf = &cm5121_transceive_sf,
.transceive_acf = &cm5121_transceive_acf,
.speed = RFID_14443A_SPEED_106K | RFID_14443A_SPEED_212K |
RFID_14443A_SPEED_424K, //| RFID_14443A_SPEED_848K,
.set_speed = &cm5121_14443a_set_speed,
},
.iso14443b = {
.init = &cm5121_14443b_init,
},
.iso15693 = {
.init = &cm5121_15693_init,
},
.mifare_classic = {
.setkey = &cm5121_mifare_setkey,
.auth = &cm5121_mifare_auth,
},
};
#endif /* LIBRFID_FIRMWARE */
@@ -0,0 +1,54 @@
/* CM5121 backend for OpenCT virtual slot */
#include <stdio.h>
#include <librfid/rfid_asic.h>
#include <openct/openct.h>
/* FIXME: get rid of this global crap. In fact this needs to become part of
* struct rfid_reader_handle */
static ct_lock_handle lock;
static int slot = 1;
/* this is the sole function required by rfid_reader_cm5121.c */
int
PC_to_RDR_Escape(void *handle,
const unsigned char *tx_buf, size_t tx_len,
unsigned char *rx_buf, size_t *rx_len)
{
int rc;
ct_handle *h = (ct_handle *) handle;
rc = ct_card_transact(h, 1, tx_buf, tx_len, rx_buf, *rx_len);
if (rc >= 0) {
*rx_len = rc;
return 0;
}
return rc;
}
int cm5121_source_init(struct rfid_asic_transport_handle *rath)
{
struct ct_handle *h;
int rc;
unsigned char atr[64];
h = ct_reader_connect(0);
if (!h)
return -1;
rc = ct_card_lock(h, slot, IFD_LOCK_EXCLUSIVE, &lock);
if (rc < 0)
return -1;
rc = ct_card_reset(h, slot, atr, sizeof(atr));
if (rc < 0)
return -1;
rath->data = h;
return 0;
}
+563
View File
@@ -0,0 +1,563 @@
/* OpenPCD specific RC632 transport layer
*
* (C) 2006 by Harald Welte <laforge@gnumonks.org>
*
* The OpenPCD is an Atmel AT91SAM7Sxx based USB RFID reader.
* It's CL RC632 is connected via SPI. OpenPCD has multiple firmware
* images. This driver is for the "main_dumbreader" firmware.
*
* TODO:
* - put hdl from static variable into asic transport or reader handle
*/
/*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2
* as published by the Free Software Foundation
*
* 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, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#include <stdlib.h>
#include <unistd.h>
#include <string.h>
#include <errno.h>
#include <librfid/rfid.h>
#include <librfid/rfid_reader.h>
#include <librfid/rfid_asic.h>
#include <librfid/rfid_asic_rc632.h>
#include <librfid/rfid_reader_openpcd.h>
#include <librfid/rfid_layer2.h>
#include <librfid/rfid_protocol.h>
/* FIXME */
#include "rc632.h"
#define SENDBUF_LEN (256+4+10) /* 256bytes max FSD/FSC, plus 4 bytes header,
plus 10 bytes reserve */
#define RECVBUF_LEN SENDBUF_LEN
static char snd_buf[SENDBUF_LEN];
static char rcv_buf[RECVBUF_LEN];
static struct openpcd_hdr *snd_hdr;
static struct openpcd_hdr *rcv_hdr;
#ifndef LIBRFID_FIRMWARE
#ifdef __MINGW32__
#include "libusb_dyn.h"
#else /*__MINGW32__*/
#include <usb.h>
#endif/*__MINGW32__*/
static struct usb_device *dev;
static struct usb_dev_handle *hdl;
static int openpcd_send_command(u_int8_t cmd, u_int8_t reg, u_int8_t val,
u_int16_t len, const unsigned char *data)
{
int ret;
u_int16_t cur;
snd_hdr->cmd = cmd;
snd_hdr->reg = reg;
snd_hdr->val = val;
snd_hdr->flags = OPENPCD_FLAG_RESPOND;
if (data && len)
memcpy(snd_hdr->data, data, len);
cur = sizeof(*snd_hdr) + len;
return usb_bulk_write(hdl, OPENPCD_OUT_EP, (char *)snd_hdr, cur, 1000);
}
static int openpcd_recv_reply(void)
{
int ret;
ret = usb_bulk_read(hdl, OPENPCD_IN_EP, rcv_buf, sizeof(rcv_buf), 1000);
return ret;
}
static int openpcd_xcv(u_int8_t cmd, u_int8_t reg, u_int8_t val,
u_int16_t len, const unsigned char *data)
{
int ret;
ret = openpcd_send_command(cmd, reg, val, len, data);
if (ret < 0)
return ret;
if (ret < sizeof(struct openpcd_hdr))
return -EINVAL;
return openpcd_recv_reply();
}
struct usb_id {
u_int16_t vid;
u_int16_t pid;
};
static const struct usb_id opcd_usb_ids[] = {
{ .vid = 0x2342, .pid = 0x0001 }, /* prototypes */
{ .vid = 0x16c0, .pid = 0x076b }, /* first official device id */
};
static struct usb_device *find_opcd_device(void)
{
struct usb_bus *bus;
for (bus = usb_get_busses(); bus; bus = bus->next) {
struct usb_device *dev;
for (dev = bus->devices; dev; dev = dev->next) {
int i;
for (i = 0; i < ARRAY_SIZE(opcd_usb_ids); i++) {
const struct usb_id *id = &opcd_usb_ids[i];
if (dev->descriptor.idVendor == id->vid &&
dev->descriptor.idProduct == id->pid)
return dev;
}
}
}
return NULL;
}
/* RC632 access primitives for librfid inside reader firmware */
static int openpcd_reg_write(struct rfid_asic_transport_handle *rath,
unsigned char reg, unsigned char value)
{
int ret;
DEBUGP("reg=0x%02x, val=%02x: ", reg, value);
ret = openpcd_xcv(OPENPCD_CMD_WRITE_REG, reg, value, 0, NULL);
if (ret < 0)
DEBUGPC("ERROR sending command\n");
else
DEBUGPC("OK\n");
return ret;
}
static int openpcd_reg_read(struct rfid_asic_transport_handle *rath,
unsigned char reg,
unsigned char *value)
{
int ret;
DEBUGP("reg=0x%02x, ", reg);
ret = openpcd_xcv(OPENPCD_CMD_READ_REG, reg, 0, 0, NULL);
if (ret < 0) {
DEBUGPC("ERROR sending command\n");
return ret;
}
if (ret < sizeof(struct openpcd_hdr)) {
DEBUGPC("ERROR: short packet\n");
return ret;
}
*value = rcv_hdr->val;
DEBUGPC("val=%02x: OK\n", *value);
return ret;
}
static int openpcd_fifo_read(struct rfid_asic_transport_handle *rath,
unsigned char num_bytes,
unsigned char *buf)
{
int ret;
DEBUGP(" ");
ret = openpcd_xcv(OPENPCD_CMD_READ_FIFO, 0x00, num_bytes, 0, NULL);
if (ret < 0) {
DEBUGPC("ERROR sending command\n");
return ret;
}
DEBUGPC("ret = %d\n", ret);
memcpy(buf, rcv_hdr->data, ret - sizeof(struct openpcd_hdr));
DEBUGPC("len=%d val=%s: OK\n", ret - sizeof(struct openpcd_hdr),
rfid_hexdump(rcv_hdr->data, ret - sizeof(struct openpcd_hdr)));
return ret;
}
static int openpcd_fifo_write(struct rfid_asic_transport_handle *rath,
unsigned char len,
const unsigned char *bytes,
unsigned char flags)
{
int ret;
DEBUGP("len=%u, data=%s\n", len, rfid_hexdump(bytes, len));
ret = openpcd_xcv(OPENPCD_CMD_WRITE_FIFO, 0, 0, len, bytes);
return ret;
}
const struct rfid_asic_transport openpcd_rat = {
.name = "OpenPCD Dumb USB Protocol",
.priv.rc632 = {
.fn = {
.reg_write = &openpcd_reg_write,
.reg_read = &openpcd_reg_read,
.fifo_write = &openpcd_fifo_write,
.fifo_read = &openpcd_fifo_read,
},
},
};
static int openpcd_get_api_version(struct rfid_reader_handle *rh, u_int8_t *version)
{
int ret;
// preset version result to zero
rcv_hdr->val=0;
ret = openpcd_xcv(OPENPCD_CMD_GET_API_VERSION, 0, 0, 0, NULL);
if (ret < 0) {
DEBUGPC("ERROR sending command [%i]\n", ret);
return ret;
}
if (ret < sizeof(struct openpcd_hdr)) {
DEBUGPC("ERROR: short packet [%i]\n", ret);
return -EINVAL;
}
*version = rcv_hdr->val;
return ret;
}
static int openpcd_get_environment(
struct rfid_reader_handle *rh,
unsigned char num_bytes,
unsigned char *buf)
{
int ret;
DEBUGP(" ");
ret = openpcd_xcv(OPENPCD_CMD_GET_ENVIRONMENT, 0x00, num_bytes, 0, NULL);
if (ret < 0) {
DEBUGPC("ERROR sending command [%i]\n",ret);
return ret;
}
DEBUGPC("ret = %d\n", ret);
memcpy(buf, rcv_hdr->data, ret - sizeof(struct openpcd_hdr));
DEBUGPC("len=%d val=%s: OK\n", ret - sizeof(struct openpcd_hdr),
rfid_hexdump(rcv_hdr->data, ret - sizeof(struct openpcd_hdr)));
return ret;
}
static int openpcd_set_environment(
struct rfid_reader_handle *rh,
const unsigned char num_bytes,
unsigned char *buf)
{
int ret;
ret = openpcd_xcv(OPENPCD_CMD_SET_ENVIRONMENT, 0, 0, num_bytes, buf);
if (ret < 0) {
DEBUGPC("ERROR sending command [%i]\n",ret);
return ret;
}
if (ret < sizeof(struct openpcd_hdr)) {
DEBUGPC("ERROR: short packet [%i]\n", ret);
return -EINVAL;
}
return rcv_hdr->val;
}
static int openpcd_reset(struct rfid_reader_handle *rh)
{
int ret;
DEBUGP("reset ");
ret = openpcd_xcv(OPENPCD_CMD_RESET, 0, 0, 0, 0);
return ret;
}
#else
/* RC632 access primitives for librfid inside reader firmware */
static int openpcd_reg_write(struct rfid_asic_transport_handle *rath,
unsigned char reg, unsigned char value)
{
return opcd_rc632_reg_write(rath, reg, value);
}
static int openpcd_reg_read(struct rfid_asic_transport_handle *rath,
unsigned char reg,
unsigned char *value)
{
return opcd_rc632_reg_read(rath, reg, value);
}
static int openpcd_fifo_read(struct rfid_asic_transport_handle *rath,
unsigned char num_bytes,
unsigned char *buf)
{
return opcd_rc632_fifo_read(rath, num_bytes, buf);
}
static int openpcd_fifo_write(struct rfid_asic_transport_handle *rath,
unsigned char len,
const unsigned char *bytes,
unsigned char flags)
{
return opcd_rc632_fifo_write(rath, len, bytes, flags);
}
const struct rfid_asic_transport openpcd_rat = {
.name = "OpenPCD Firmware RC632 Access",
.priv.rc632 = {
.fn = {
.reg_write = &openpcd_reg_write,
.reg_read = &openpcd_reg_read,
.fifo_write = &openpcd_fifo_write,
.fifo_read = &openpcd_fifo_read,
},
},
};
#endif /* LIBRFID_FIRMWARE */
static int openpcd_transceive(struct rfid_reader_handle *rh,
enum rfid_frametype frametype,
const unsigned char *tx_data, unsigned int tx_len,
unsigned char *rx_data, unsigned int *rx_len,
u_int64_t timeout, unsigned int flags)
{
return rh->ah->asic->priv.rc632.fn.transceive(rh->ah, frametype,
tx_data, tx_len,
rx_data, rx_len,
timeout, flags);
}
static int openpcd_transceive_sf(struct rfid_reader_handle *rh,
unsigned char cmd, struct iso14443a_atqa *atqa)
{
return rh->ah->asic->priv.rc632.fn.iso14443a.transceive_sf(rh->ah,
cmd,
atqa);
}
static int
openpcd_transceive_acf(struct rfid_reader_handle *rh,
struct iso14443a_anticol_cmd *cmd,
unsigned int *bit_of_col)
{
return rh->ah->asic->priv.rc632.fn.iso14443a.transceive_acf(rh->ah,
cmd, bit_of_col);
}
static int
openpcd_14443a_init(struct rfid_reader_handle *rh)
{
return rh->ah->asic->priv.rc632.fn.iso14443a.init(rh->ah);
}
static int
openpcd_14443a_set_speed(struct rfid_reader_handle *rh,
unsigned int tx,
unsigned int speed)
{
u_int8_t rate;
DEBUGP("setting rate: ");
switch (speed) {
case RFID_14443A_SPEED_106K:
rate = 0x00;
DEBUGPC("106K\n");
break;
case RFID_14443A_SPEED_212K:
rate = 0x01;
DEBUGPC("212K\n");
break;
case RFID_14443A_SPEED_424K:
rate = 0x02;
DEBUGPC("424K\n");
break;
case RFID_14443A_SPEED_848K:
rate = 0x03;
DEBUGPC("848K\n");
break;
default:
return -EINVAL;
break;
}
return rh->ah->asic->priv.rc632.fn.iso14443a.set_speed(rh->ah,
tx, rate);
}
static int
openpcd_14443b_init(struct rfid_reader_handle *rh)
{
return rh->ah->asic->priv.rc632.fn.iso14443b.init(rh->ah);
}
static int
openpcd_15693_init(struct rfid_reader_handle *rh)
{
return rh->ah->asic->priv.rc632.fn.iso15693.init(rh->ah);
}
static int
openpcd_mifare_setkey(struct rfid_reader_handle *rh, const u_int8_t *key)
{
return rh->ah->asic->priv.rc632.fn.mifare_classic.setkey(rh->ah, key);
}
static int
openpcd_mifare_auth(struct rfid_reader_handle *rh, u_int8_t cmd,
u_int32_t serno, u_int8_t block)
{
return rh->ah->asic->priv.rc632.fn.mifare_classic.auth(rh->ah,
cmd, serno, block);
}
static struct rfid_reader_handle *
openpcd_open(void *data)
{
struct rfid_reader_handle *rh;
struct rfid_asic_transport_handle *rath;
snd_hdr = (struct openpcd_hdr *)snd_buf;
rcv_hdr = (struct openpcd_hdr *)rcv_buf;
#ifndef LIBRFID_FIRMWARE
usb_init();
if (usb_find_busses() < 0)
return NULL;
if (usb_find_devices() < 0)
return NULL;
dev = find_opcd_device();
if (!dev) {
DEBUGP("No matching USB device found\n");
return NULL;
}
hdl = usb_open(dev);
if (!hdl) {
DEBUGP("Can't open USB device\n");
return NULL;
}
if(usb_set_configuration(hdl, 1 ) < 0)
{
DEBUGP("setting config failed\n");
usb_close( hdl );
return NULL;
}
if (usb_claim_interface(hdl, 0) < 0) {
DEBUGP("Can't claim interface\n");
usb_close(hdl);
return NULL;
}
#endif
rh = malloc_reader_handle(sizeof(*rh));
if (!rh)
return NULL;
memset(rh, 0, sizeof(*rh));
rath = malloc_rat_handle(sizeof(*rath));
if (!rath)
goto out_rh;
memset(rath, 0, sizeof(*rath));
rath->rat = &openpcd_rat;
rh->reader = &rfid_reader_openpcd;
rh->ah = rc632_open(rath);
if (!rh->ah)
goto out_rath;
DEBUGP("returning %p\n", rh);
return rh;
out_rath:
free_rat_handle(rath);
out_rh:
free_reader_handle(rh);
return NULL;
}
static void
openpcd_close(struct rfid_reader_handle *rh)
{
struct rfid_asic_transport_handle *rath = rh->ah->rath;
rc632_close(rh->ah);
free_rat_handle(rath);
free_reader_handle(rh);
#ifndef LIBRFID_FIRMWARE
usb_close(hdl);
#endif
}
const struct rfid_reader rfid_reader_openpcd = {
.name = "OpenPCD RFID Reader",
.id = RFID_READER_OPENPCD,
.open = &openpcd_open,
.close = &openpcd_close,
#ifndef LIBRFID_FIRMWARE
.get_api_version = &openpcd_get_api_version,
.get_environment = &openpcd_get_environment,
.set_environment = &openpcd_set_environment,
.reset = &openpcd_reset,
#endif
.transceive = &openpcd_transceive,
.l2_supported = (1 << RFID_LAYER2_ISO14443A) |
(1 << RFID_LAYER2_ISO14443B) |
(1 << RFID_LAYER2_ISO15693),
.proto_supported = (1 << RFID_PROTOCOL_TCL) |
(1 << RFID_PROTOCOL_MIFARE_UL) |
(1 << RFID_PROTOCOL_MIFARE_CLASSIC),
.iso14443a = {
.init = &openpcd_14443a_init,
.transceive_sf = &openpcd_transceive_sf,
.transceive_acf = &openpcd_transceive_acf,
.speed = RFID_14443A_SPEED_106K | RFID_14443A_SPEED_212K |
RFID_14443A_SPEED_424K, //| RFID_14443A_SPEED_848K,
.set_speed = &openpcd_14443a_set_speed,
},
.iso14443b = {
.init = &openpcd_14443b_init,
},
.iso15693 = {
.init = &openpcd_15693_init,
},
.mifare_classic = {
.setkey = &openpcd_mifare_setkey,
.auth = &openpcd_mifare_auth,
},
};
+115
View File
@@ -0,0 +1,115 @@
/* RFID scanning implementation
*
* (C) 2006 by Harald Welte <laforge@gnumonks.org>
*
*/
/*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2
* as published by the Free Software Foundation
*
* 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, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#include <librfid/rfid.h>
#include <librfid/rfid_layer2.h>
#include <librfid/rfid_reader.h>
#include <librfid/rfid_protocol.h>
static struct rfid_layer2_handle *
rfid_layer2_scan1(struct rfid_reader_handle *rh, int l2)
{
struct rfid_layer2_handle *l2h;
if (rh->reader->l2_supported & (1 << l2)) {
l2h = rfid_layer2_init(rh, l2);
if (!l2h)
return NULL;
if (rfid_layer2_open(l2h) < 0) {
rfid_layer2_fini(l2h);
return NULL;
} else
return l2h;
}
return NULL;
}
struct rfid_layer2_handle *
rfid_layer2_scan(struct rfid_reader_handle *rh)
{
struct rfid_layer2_handle *l2h;
int i;
#define RFID_LAYER2_MAX 16
for (i = 0; i < RFID_LAYER2_MAX; i++) {
DEBUGP("testing l2 %u\n", i);
l2h = rfid_layer2_scan1(rh, i);
if (l2h)
return l2h;
}
return NULL;
}
static struct rfid_protocol_handle *
rfid_protocol_scan1(struct rfid_layer2_handle *l2h, int proto)
{
struct rfid_protocol_handle *ph;
if (l2h->rh->reader->proto_supported & (1 << proto) &&
l2h->proto_supported & (1 << proto)) {
ph = rfid_protocol_init(l2h, proto);
if (!ph)
return NULL;
if (rfid_protocol_open(ph) < 0) {
rfid_protocol_fini(ph);
return NULL;
} else
return ph;
}
return NULL;
}
struct rfid_protocol_handle *
rfid_protocol_scan(struct rfid_layer2_handle *l2h)
{
struct rfid_protocol_handle *ph;
int i;
#define RFID_PROTOCOL_MAX 16
for (i = 0; i < RFID_PROTOCOL_MAX; i++) {
DEBUGP("testing proto %u\n", i);
ph = rfid_protocol_scan1(l2h, i);
if (ph)
return ph;
}
return NULL;
}
/* Scan for any RFID transponder within range of the given reader.
* Abort after the first successfully found transponder. */
int rfid_scan(struct rfid_reader_handle *rh,
struct rfid_layer2_handle **l2h,
struct rfid_protocol_handle **ph)
{
*l2h = rfid_layer2_scan(rh);
if (!*l2h)
return 0;
*ph = rfid_protocol_scan(*l2h);
if (!*ph)
return 2;
return 3;
}
+30
View File
@@ -0,0 +1,30 @@
#include <windows.h>
#include <errno.h>
void usleep(unsigned long usec)
{
int msec;
msec=usec/1000;
usec=usec%1000;
if(msec)
{
if(usec)
msec++;
}
else
{
LARGE_INTEGER current,freq,end;
QueryPerformanceFrequency(&freq);
QueryPerformanceCounter(&end);
end.QuadPart+=(freq.QuadPart*usec)/1000000;
while(QueryPerformanceCounter(&current) && (current.QuadPart<=end.QuadPart))
{
}
}
Sleep(msec);
}
+6
View File
@@ -0,0 +1,6 @@
#ifndef __USLEEP_H__
#define __USLEEP_H__
void usleep(unsigned long usec);
#endif/*__USLEEP_H__*/
+25
View File
@@ -0,0 +1,25 @@
INCLUDES = $(all_includes) -I$(top_srcdir)/include
if ENABLE_FIRMWARE
else
bin_PROGRAMS = librfid-tool mifare-tool librfid-send_script
noinst_HEADERS = librfid-tool.h
librfid_tool_SOURCES = librfid-tool.c common.c
librfid_tool_LDADD = ../src/librfid.la
librfid_send_script_SOURCES= send_script.c
librfid_send_script_LDADD = ../src/librfid.la
mifare_tool_SOURCES = mifare-tool.c common.c
mifare_tool_LDADD = ../src/librfid.la
if ENABLE_WIN32
LINKOPTS = -dynamic -mno-cygwin
librfid_send_script_LDFLAGS = $(LINKOPTS)
librfid_tool_LDFLAGS = $(LINKOPTS)
mifare_tool_LDFLAGS = $(LINKOPTS)
endif
endif
+563
View File
@@ -0,0 +1,563 @@
# Makefile.in generated by automake 1.11 from Makefile.am.
# @configure_input@
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
# 2003, 2004, 2005, 2006, 2007, 2008, 2009 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@
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@
target_triplet = @target@
@ENABLE_FIRMWARE_FALSE@bin_PROGRAMS = librfid-tool$(EXEEXT) \
@ENABLE_FIRMWARE_FALSE@ mifare-tool$(EXEEXT) \
@ENABLE_FIRMWARE_FALSE@ librfid-send_script$(EXEEXT)
subdir = utils
DIST_COMMON = $(am__noinst_HEADERS_DIST) $(srcdir)/Makefile.am \
$(srcdir)/Makefile.in
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/configure.in
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
mkinstalldirs = $(install_sh) -d
CONFIG_CLEAN_FILES =
CONFIG_CLEAN_VPATH_FILES =
am__installdirs = "$(DESTDIR)$(bindir)"
PROGRAMS = $(bin_PROGRAMS)
am__librfid_send_script_SOURCES_DIST = send_script.c
@ENABLE_FIRMWARE_FALSE@am_librfid_send_script_OBJECTS = \
@ENABLE_FIRMWARE_FALSE@ send_script.$(OBJEXT)
librfid_send_script_OBJECTS = $(am_librfid_send_script_OBJECTS)
@ENABLE_FIRMWARE_FALSE@librfid_send_script_DEPENDENCIES = \
@ENABLE_FIRMWARE_FALSE@ ../src/librfid.la
librfid_send_script_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \
$(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
$(librfid_send_script_LDFLAGS) $(LDFLAGS) -o $@
am__librfid_tool_SOURCES_DIST = librfid-tool.c common.c
@ENABLE_FIRMWARE_FALSE@am_librfid_tool_OBJECTS = \
@ENABLE_FIRMWARE_FALSE@ librfid-tool.$(OBJEXT) common.$(OBJEXT)
librfid_tool_OBJECTS = $(am_librfid_tool_OBJECTS)
@ENABLE_FIRMWARE_FALSE@librfid_tool_DEPENDENCIES = ../src/librfid.la
librfid_tool_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \
$(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
$(librfid_tool_LDFLAGS) $(LDFLAGS) -o $@
am__mifare_tool_SOURCES_DIST = mifare-tool.c common.c
@ENABLE_FIRMWARE_FALSE@am_mifare_tool_OBJECTS = mifare-tool.$(OBJEXT) \
@ENABLE_FIRMWARE_FALSE@ common.$(OBJEXT)
mifare_tool_OBJECTS = $(am_mifare_tool_OBJECTS)
@ENABLE_FIRMWARE_FALSE@mifare_tool_DEPENDENCIES = ../src/librfid.la
mifare_tool_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \
$(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
$(mifare_tool_LDFLAGS) $(LDFLAGS) -o $@
DEFAULT_INCLUDES = -I.@am__isrc@
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) --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 = $(librfid_send_script_SOURCES) $(librfid_tool_SOURCES) \
$(mifare_tool_SOURCES)
DIST_SOURCES = $(am__librfid_send_script_SOURCES_DIST) \
$(am__librfid_tool_SOURCES_DIST) \
$(am__mifare_tool_SOURCES_DIST)
am__noinst_HEADERS_DIST = librfid-tool.h
HEADERS = $(noinst_HEADERS)
ETAGS = etags
CTAGS = ctags
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
ACLOCAL = @ACLOCAL@
AMTAR = @AMTAR@
AR = @AR@
AS = @AS@
AUTOCONF = @AUTOCONF@
AUTOHEADER = @AUTOHEADER@
AUTOMAKE = @AUTOMAKE@
AWK = @AWK@
BUILDENV = @BUILDENV@
CC = @CC@
CCDEPMODE = @CCDEPMODE@
CFLAGS = @CFLAGS@
CPP = @CPP@
CPPFLAGS = @CPPFLAGS@
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@
FIRMWARE_PATH = @FIRMWARE_PATH@
GREP = @GREP@
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@
LIBTOOL_DEPS = @LIBTOOL_DEPS@
LIPO = @LIPO@
LN_S = @LN_S@
LTLIBOBJS = @LTLIBOBJS@
MAKEINFO = @MAKEINFO@
MKDIR_P = @MKDIR_P@
NM = @NM@
NMEDIT = @NMEDIT@
OBJDUMP = @OBJDUMP@
OBJEXT = @OBJEXT@
OPENCT_CFLAGS = @OPENCT_CFLAGS@
OPENCT_LIBS = @OPENCT_LIBS@
OTOOL = @OTOOL@
OTOOL64 = @OTOOL64@
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@
RANLIB = @RANLIB@
SED = @SED@
SET_MAKE = @SET_MAKE@
SHELL = @SHELL@
STRIP = @STRIP@
VERSION = @VERSION@
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_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@
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 = @target@
target_alias = @target_alias@
target_cpu = @target_cpu@
target_os = @target_os@
target_vendor = @target_vendor@
to_host_path_cmd = @to_host_path_cmd@
top_build_prefix = @top_build_prefix@
top_builddir = @top_builddir@
top_srcdir = @top_srcdir@
INCLUDES = $(all_includes) -I$(top_srcdir)/include
@ENABLE_FIRMWARE_FALSE@noinst_HEADERS = librfid-tool.h
@ENABLE_FIRMWARE_FALSE@librfid_tool_SOURCES = librfid-tool.c common.c
@ENABLE_FIRMWARE_FALSE@librfid_tool_LDADD = ../src/librfid.la
@ENABLE_FIRMWARE_FALSE@librfid_send_script_SOURCES = send_script.c
@ENABLE_FIRMWARE_FALSE@librfid_send_script_LDADD = ../src/librfid.la
@ENABLE_FIRMWARE_FALSE@mifare_tool_SOURCES = mifare-tool.c common.c
@ENABLE_FIRMWARE_FALSE@mifare_tool_LDADD = ../src/librfid.la
@ENABLE_FIRMWARE_FALSE@@ENABLE_WIN32_TRUE@LINKOPTS = -dynamic -mno-cygwin
@ENABLE_FIRMWARE_FALSE@@ENABLE_WIN32_TRUE@librfid_send_script_LDFLAGS = $(LINKOPTS)
@ENABLE_FIRMWARE_FALSE@@ENABLE_WIN32_TRUE@librfid_tool_LDFLAGS = $(LINKOPTS)
@ENABLE_FIRMWARE_FALSE@@ENABLE_WIN32_TRUE@mifare_tool_LDFLAGS = $(LINKOPTS)
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 ) \
&& { if test -f $@; then exit 0; else break; fi; }; \
exit 1;; \
esac; \
done; \
echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu utils/Makefile'; \
$(am__cd) $(top_srcdir) && \
$(AUTOMAKE) --gnu utils/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
$(am__aclocal_m4_deps):
install-binPROGRAMS: $(bin_PROGRAMS)
@$(NORMAL_INSTALL)
test -z "$(bindir)" || $(MKDIR_P) "$(DESTDIR)$(bindir)"
@list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \
for p in $$list; do echo "$$p $$p"; done | \
sed 's/$(EXEEXT)$$//' | \
while read p p1; do if test -f $$p || test -f $$p1; \
then echo "$$p"; echo "$$p"; else :; fi; \
done | \
sed -e 'p;s,.*/,,;n;h' -e 's|.*|.|' \
-e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \
sed 'N;N;N;s,\n, ,g' | \
$(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \
{ d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \
if ($$2 == $$4) files[d] = files[d] " " $$1; \
else { print "f", $$3 "/" $$4, $$1; } } \
END { for (d in files) print "f", d, files[d] }' | \
while read type dir files; do \
if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \
test -z "$$files" || { \
echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(bindir)$$dir'"; \
$(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \
} \
; done
uninstall-binPROGRAMS:
@$(NORMAL_UNINSTALL)
@list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \
files=`for p in $$list; do echo "$$p"; done | \
sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \
-e 's/$$/$(EXEEXT)/' `; \
test -n "$$list" || exit 0; \
echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \
cd "$(DESTDIR)$(bindir)" && rm -f $$files
clean-binPROGRAMS:
@list='$(bin_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
librfid-send_script$(EXEEXT): $(librfid_send_script_OBJECTS) $(librfid_send_script_DEPENDENCIES)
@rm -f librfid-send_script$(EXEEXT)
$(librfid_send_script_LINK) $(librfid_send_script_OBJECTS) $(librfid_send_script_LDADD) $(LIBS)
librfid-tool$(EXEEXT): $(librfid_tool_OBJECTS) $(librfid_tool_DEPENDENCIES)
@rm -f librfid-tool$(EXEEXT)
$(librfid_tool_LINK) $(librfid_tool_OBJECTS) $(librfid_tool_LDADD) $(LIBS)
mifare-tool$(EXEEXT): $(mifare_tool_OBJECTS) $(mifare_tool_DEPENDENCIES)
@rm -f mifare-tool$(EXEEXT)
$(mifare_tool_LINK) $(mifare_tool_OBJECTS) $(mifare_tool_LDADD) $(LIBS)
mostlyclean-compile:
-rm -f *.$(OBJEXT)
distclean-compile:
-rm -f *.tab.c
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/common.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/librfid-tool.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mifare-tool.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/send_script.Po@am__quote@
.c.o:
@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
@am__fastdepCC_TRUE@ $(am__mv) $(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@ $(am__mv) $(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@ $(am__mv) $(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 $@ $<
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; nonempty = 1; } \
END { if (nonempty) { for (i in files) print i; }; }'`; \
mkid -fID $$unique
tags: TAGS
TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
$(TAGS_FILES) $(LISP)
set x; \
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; }; }'`; \
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
CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
$(TAGS_FILES) $(LISP)
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)$$unique" \
|| $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
$$unique
GTAGS:
here=`$(am__cd) $(top_builddir) && pwd` \
&& $(am__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 "$(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) $(HEADERS)
installdirs:
for dir in "$(DESTDIR)$(bindir)"; do \
test -z "$$dir" || $(MKDIR_P) "$$dir"; \
done
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)
-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-binPROGRAMS clean-generic clean-libtool 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-binPROGRAMS
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: uninstall-binPROGRAMS
.MAKE: install-am install-strip
.PHONY: CTAGS GTAGS all all-am check check-am clean clean-binPROGRAMS \
clean-generic clean-libtool ctags distclean distclean-compile \
distclean-generic distclean-libtool distclean-tags distdir dvi \
dvi-am html html-am info info-am install install-am \
install-binPROGRAMS 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 \
uninstall-binPROGRAMS
# 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:
+125
View File
@@ -0,0 +1,125 @@
#include <stdio.h>
#include <unistd.h>
#include <stdlib.h>
#include <string.h>
#include <errno.h>
//#include <libgen.h>
#include <librfid/rfid.h>
#include <librfid/rfid_scan.h>
#include <librfid/rfid_reader.h>
#include <librfid/rfid_layer2.h>
#include <librfid/rfid_protocol.h>
#include <librfid/rfid_protocol_mifare_classic.h>
#include <librfid/rfid_protocol_mifare_ul.h>
#include "librfid-tool.h"
#include "common.h"
const char *
hexdump(const void *data, unsigned int len)
{
static char string[1024];
unsigned char *d = (unsigned char *) data;
unsigned int i, left;
string[0] = '\0';
left = sizeof(string);
for (i = 0; len--; i += 3) {
if (i >= sizeof(string) -4)
break;
snprintf(string+i, 4, " %02x", *d++);
}
return string;
}
static char parse_hexdigit(const char hexdigit)
{
if (hexdigit <= '9' && hexdigit >= '0')
return hexdigit - '0';
if (hexdigit <= 'f' && hexdigit >= 'a')
return 10 + (hexdigit - 'a');
return 0;
}
int
hexread(unsigned char *result, const unsigned char *in, unsigned int len)
{
const unsigned char *pos;
char dig1, dig2;
unsigned char *res = result;
for (pos = in; pos-in <= len-2; pos+=2) {
if (*pos == ':') {
pos++;
continue;
}
dig1 = *pos;
dig2 = *(pos+1);
*res++ = parse_hexdigit(dig1) << 4 | parse_hexdigit(dig2);
}
return (res - result);
}
struct rfid_reader_handle *rh;
struct rfid_layer2_handle *l2h;
struct rfid_protocol_handle *ph;
int reader_init(void)
{
printf("opening reader handle\n");
rh = rfid_reader_open(NULL, RFID_READER_CM5121);
if (!rh) {
fprintf(stderr, "No Omnikey Cardman 5121 found\n");
rh = rfid_reader_open(NULL, RFID_READER_OPENPCD);
if (!rh) {
fprintf(stderr, "No OpenPCD found either\n");
return -1;
}
}
return 0;
}
int l2_init(int layer2)
{
int rc;
printf("opening layer2 handle\n");
l2h = rfid_layer2_init(rh, layer2);
if (!l2h) {
fprintf(stderr, "error during iso14443a_init\n");
return -1;
}
printf("running layer2 anticol\n");
rc = rfid_layer2_open(l2h);
if (rc < 0) {
fprintf(stderr, "error during layer2_open\n");
return rc;
}
return 0;
}
int l3_init(int protocol)
{
printf("running layer3 (ats)\n");
ph = rfid_protocol_init(l2h, protocol);
if (!ph) {
fprintf(stderr, "error during protocol_init\n");
return -1;
}
if (rfid_protocol_open(ph) < 0) {
fprintf(stderr, "error during protocol_open\n");
return -1;
}
printf("we now have layer3 up and running\n");
return 0;
}
+7
View File
@@ -0,0 +1,7 @@
#ifndef __COMMON_H__
#define __COMMON_H__
extern const char * hexdump(const void *data, unsigned int len);
extern int hexread(unsigned char *result, const unsigned char *in, unsigned int len);
#endif/*__COMMON_H__*/
+552
View File
@@ -0,0 +1,552 @@
/* librfid-tool - a small command-line tool for librfid testing
*
* (C) 2005-2006 by Harald Welte <laforge@gnumonks.org>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2
* as published by the Free Software Foundation
*
* 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, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#include <stdio.h>
#include <unistd.h>
#include <stdlib.h>
#include <string.h>
#include <errno.h>
/*#include <libgen.h>*/
#define _GNU_SOURCE
#include <getopt.h>
#include <librfid/rfid.h>
#include <librfid/rfid_scan.h>
#include <librfid/rfid_reader.h>
#include <librfid/rfid_layer2.h>
#include <librfid/rfid_protocol.h>
#include <librfid/rfid_protocol_mifare_classic.h>
#include <librfid/rfid_protocol_mifare_ul.h>
#include "librfid-tool.h"
static int select_mf(void)
{
unsigned char cmd[] = { 0x00, 0xa4, 0x00, 0x00, 0x02, 0x3f, 0x00, 0x00 };
unsigned char ret[256];
unsigned int rlen = sizeof(ret);
int rv;
rv = rfid_protocol_transceive(ph, cmd, sizeof(cmd), ret, &rlen, 0, 0);
if (rv < 0)
return rv;
printf("%d: [%s]\n", rlen, hexdump(ret, rlen));
return 0;
}
static int iso7816_get_challenge(unsigned char len)
{
unsigned char cmd[] = { 0x00, 0x84, 0x00, 0x00, 0x08 };
unsigned char ret[256];
unsigned int rlen = sizeof(ret);
cmd[4] = len;
int rv;
rv = rfid_protocol_transceive(ph, cmd, sizeof(cmd), ret, &rlen, 0, 0);
if (rv < 0)
return rv;
printf("%d: [%s]\n", rlen, hexdump(ret, rlen));
return 0;
}
int
iso7816_select_application(void)
{
unsigned char cmd[] = { 0x00, 0xa4, 0x04, 0x0c, 0x07,
0xa0, 0x00, 0x00, 0x02, 0x47, 0x10, 0x01 };
unsigned char resp[7];
unsigned int rlen = sizeof(resp);
int rv;
rv = rfid_protocol_transceive(ph, cmd, sizeof(cmd), resp, &rlen, 0, 0);
if (rv < 0)
return rv;
/* FIXME: parse response */
printf("%s\n", hexdump(resp, rlen));
return 0;
}
int
iso7816_select_ef(u_int16_t fid)
{
unsigned char cmd[7] = { 0x00, 0xa4, 0x02, 0x0c, 0x02, 0x00, 0x00 };
unsigned char resp[7];
unsigned int rlen = sizeof(resp);
int rv;
cmd[5] = (fid >> 8) & 0xff;
cmd[6] = fid & 0xff;
rv = rfid_protocol_transceive(ph, cmd, sizeof(cmd), resp, &rlen, 0, 0);
if (rv < 0)
return rv;
/* FIXME: parse response */
printf("%s\n", hexdump(resp, rlen));
return 0;
}
int
iso7816_read_binary(unsigned char *buf, unsigned int *len)
{
unsigned char cmd[] = { 0x00, 0xb0, 0x00, 0x00, 0x00 };
unsigned char resp[256];
unsigned int rlen = sizeof(resp);
int rv;
rv = rfid_protocol_transceive(ph, cmd, sizeof(cmd), resp, &rlen, 0, 0);
if (rv < 0)
return rv;
printf("%s\n", hexdump(resp, rlen));
/* FIXME: parse response, determine whether we need additional reads */
/* FIXME: copy 'len' number of response bytes to 'buf' */
return 0;
}
/* wrapper function around SELECT EF and READ BINARY */
int
iso7816_read_ef(u_int16_t fid, unsigned char *buf, unsigned int *len)
{
int rv;
rv = iso7816_select_ef(fid);
if (rv < 0)
return rv;
return iso7816_read_binary(buf, len);
}
/* mifare ultralight helpers */
int
mifare_ulight_write(struct rfid_protocol_handle *ph)
{
unsigned char buf[4] = { 0xa1, 0xa2, 0xa3, 0xa4 };
return rfid_protocol_write(ph, 10, buf, 4);
}
int
mifare_ulight_blank(struct rfid_protocol_handle *ph)
{
unsigned char buf[4] = { 0x00, 0x00, 0x00, 0x00 };
int i, ret;
for (i = 4; i <= MIFARE_UL_PAGE_MAX; i++) {
ret = rfid_protocol_write(ph, i, buf, 4);
if (ret < 0)
return ret;
}
return 0;
}
static int
mifare_ulight_read(struct rfid_protocol_handle *ph)
{
unsigned char buf[20];
unsigned int len = sizeof(buf);
int ret;
int i;
for (i = 0; i <= MIFARE_UL_PAGE_MAX; i++) {
ret = rfid_protocol_read(ph, i, buf, &len);
if (ret < 0)
return ret;
printf("Page 0x%x: %s\n", i, hexdump(buf, 4));
}
return 0;
}
/* mifare classic helpers */
static int
mifare_classic_read_sector(struct rfid_protocol_handle *ph, int sector)
{
unsigned char buf[20];
unsigned int len = sizeof(buf);
int ret;
int block;
/* FIXME: make this work for sectors > 31 */
printf("Reading sector %u\n", sector);
for (block = sector*4; block < sector*4+4; block++) {
printf("Reading block %u: ", block);
ret = rfid_protocol_read(ph, block, buf, &len);
if(ret == -ETIMEDOUT)
fprintf(stderr, "TIMEOUT\n");
if (ret < 0) {
printf("Error %d reading\n", ret);
return ret;
}
printf("Page 0x%x: %s\n", block, hexdump(buf, len));
}
return 0;
}
static char *proto_names[] = {
[RFID_PROTOCOL_TCL] = "tcl",
[RFID_PROTOCOL_MIFARE_UL] = "mifare-ultralight",
[RFID_PROTOCOL_MIFARE_CLASSIC] = "mifare-classic",
};
static int proto_by_name(const char *name)
{
int i;
for (i = 0; i < ARRAY_SIZE(proto_names); i++) {
if (proto_names[i] == NULL)
continue;
if (!strcasecmp(name, proto_names[i]))
return i;
}
return -1;
}
static char *l2_names[] = {
[RFID_LAYER2_ISO14443A] = "iso14443a",
[RFID_LAYER2_ISO14443B] = "iso14443b",
[RFID_LAYER2_ISO15693] = "iso15693",
};
static int l2_by_name(const char *name)
{
int i;
for (i = 0; i < ARRAY_SIZE(l2_names); i++) {
if (l2_names[i] == NULL)
continue;
if (!strcasecmp(name, l2_names[i]))
return i;
}
return -1;
}
static void do_scan(void)
{
int rc;
unsigned int size;
unsigned int size_len = sizeof(size);
printf("scanning for RFID token...\n");
rc = rfid_scan(rh, &l2h, &ph);
if (rc >= 2) {
unsigned char uid_buf[16];
unsigned int uid_len = sizeof(uid_buf);
rfid_layer2_getopt(l2h, RFID_OPT_LAYER2_UID, &uid_buf,
&uid_len);
printf("Layer 2 success (%s): %s\n", rfid_layer2_name(l2h),
hexdump(uid_buf, uid_len));
}
if (rc >= 3) {
printf("Protocol success (%s)\n", rfid_protocol_name(ph));
if (rfid_protocol_getopt(ph, RFID_OPT_PROTO_SIZE,
&size, &size_len) == 0)
printf("Size: %u bytes\n", size);
}
}
#define OPTION_OFFSET 256
static struct option original_opts[] = {
{ "help", 0, 0, 'h' },
{ "layer2", 1, 0, 'l' },
{ "protocol", 1, 0, 'p' },
{ "scan", 0, 0, 's' },
{ "scan-loop", 0, 0, 'S' },
{0, 0, 0, 0}
};
/* module / option merging code */
static struct option *opts = original_opts;
static unsigned int global_option_offset = 0;
static char *program_name;
static char *program_version = LIBRFID_TOOL_VERSION;
static void free_opts(int reset_offset)
{
if (opts != original_opts) {
free(opts);
opts = original_opts;
if (reset_offset)
global_option_offset = 0;
}
}
static struct option *
merge_options(struct option *oldopts, const struct option *newopts,
unsigned int *option_offset)
{
unsigned int num_old, num_new, i;
struct option *merge;
for (num_old = 0; oldopts[num_old].name; num_old++);
for (num_new = 0; oldopts[num_new].name; num_new++);
global_option_offset += OPTION_OFFSET;
*option_offset = global_option_offset;
merge = malloc(sizeof(struct option) * (num_new + num_old + 1));
memcpy(merge, oldopts, num_old * sizeof(struct option));
free_opts(0); /* Release previous options merged if any */
for (i = 0; i < num_new; i++) {
merge[num_old + i] = newopts[i];
merge[num_old + i].val += *option_offset;
}
memset(merge + num_old + num_new, 0, sizeof(struct option));
return merge;
}
struct rfidtool_module *find_module(const char *name)
{
return NULL;
}
void register_module(struct rfidtool_module *me)
{
struct rfidtool_module *old;
if (strcmp(me->version, program_version) != 0) {
fprintf(stderr, "%s: target `%s' v%s (I'm v%s).\n",
program_name, me->name, me->version, program_version);
exit(1);
}
old = find_module(me->name);
if (old) {
fprintf(stderr, "%s: target `%s' already registered.\n",
program_name, me->name);
exit(1);
}
}
static void help(void)
{
printf( " -s --scan scan until first RFID tag is found\n"
" -S --scan-loop endless scanning loop\n"
" -p --protocol {tcl,mifare-ultralight,mifare-classic}\n"
" -l --layer2 {iso14443a,iso14443b,iso15693}\n"
" -h --help\n");
}
int main(int argc, char **argv)
{
int rc;
char buf[0x100];
int i, len, protocol = -1, layer2 = -1;
#ifdef __MINGW32__
program_name = argv[0];
#else /*__MINGW32__*/
program_name = basename(argv[0]);
#endif/*__MINGW32__*/
printf("%s - (C) 2006 by Harald Welte\n"
"This program is Free Software and has "
"ABSOLUTELY NO WARRANTY\n\n", program_name);
printf("initializing librfid\n");
rfid_init();
while (1) {
int c, option_index = 0;
c = getopt_long(argc, argv, "hp:l:sS", opts, &option_index);
if (c == -1)
break;
switch (c) {
case 's':
if (reader_init() < 0)
exit(1);
do_scan();
exit(0);
break;
case 'S':
if (reader_init() < 0)
exit(1);
while (1)
do_scan();
exit(0);
break;
case 'p':
protocol = proto_by_name(optarg);
if (protocol < 0) {
fprintf(stderr, "unknown protocol `%s'\n",
optarg);
exit(2);
}
break;
case 'l':
layer2 = l2_by_name(optarg);
if (layer2 < 0) {
fprintf(stderr, "unknown layer2 `%s'\n",
optarg);
exit(2);
}
break;
case 'h':
help();
exit(0);
break;
}
}
switch (protocol) {
case RFID_PROTOCOL_MIFARE_UL:
case RFID_PROTOCOL_MIFARE_CLASSIC:
layer2 = RFID_LAYER2_ISO14443A;
break;
case -1:
fprintf(stderr, "you have to specify --protocol\n");
exit(2);
}
if (layer2 < 0) {
fprintf(stderr, "you have to specify --layer2\n");
exit(2);
}
if (reader_init() < 0)
exit(1);
if (l2_init(layer2) < 0)
exit(1);
if (l3_init(protocol) < 0)
exit(1);
switch (protocol) {
case RFID_PROTOCOL_TCL:
printf("Protocol T=CL\n");
/* we've established T=CL at this point */
printf("selecting Master File\n");
rc = select_mf();
if (rc < 0) {
printf("error selecting MF\n");
break;
}
printf("Getting random challenge, length 255\n");
rc = iso7816_get_challenge(0xff);
if (rc < 0) {
printf("error getting random challenge\n");
break;
}
printf("selecting Passport application\n");
rc = iso7816_select_application();
if (rc < 0) {
printf("error selecting passport application\n");
break;
}
printf("selecting EF 0x1e\n");
rc = iso7816_select_ef(0x011e);
if (rc < 0) {
printf("error selecting EF 0x1e\n");
break;
}
printf("selecting EF 0x01\n");
rc = iso7816_select_ef(0x0101);
if (rc < 0) {
printf("error selecting EF 0x01\n");
break;
}
while (1) {
printf("reading EF1\n");
len = sizeof(buf);
printf("reading ef\n");
rc = iso7816_read_binary(buf, &len);
if (rc < 0) {
printf("error reading EF\n");
break;
}
}
#if 0
for (i = 0; i < 4; i++)
iso7816_get_challenge(0xff);
#endif
break;
case RFID_PROTOCOL_MIFARE_UL:
printf("Protocol Mifare Ultralight\n");
mifare_ulight_read(ph);
#if 0
mifare_ulight_blank(ph);
mifare_ulight_write(ph);
mifare_ulight_read(ph);
#endif
break;
case RFID_PROTOCOL_MIFARE_CLASSIC:
printf("Protocol Mifare Classic\n");
{
int sector;
for (sector = 0; sector < 31; sector++) {
printf("Authenticating sector %u: ", sector);
fflush(stdout);
rc = mfcl_set_key(ph, MIFARE_CL_KEYA_DEFAULT_INFINEON);
if (rc < 0) {
printf("key format error\n");
exit(1);
}
rc = mfcl_auth(ph, RFID_CMD_MIFARE_AUTH1A, sector*4);
if (rc < 0) {
printf("mifare auth error\n");
exit(1);
} else
printf("mifare auth succeeded!\n");
mifare_classic_read_sector(ph, sector);
}
}
break;
default:
printf("unknown protocol\n");
exit(1);
break;
}
rfid_reader_close(rh);
exit(0);
}
+35
View File
@@ -0,0 +1,35 @@
#ifndef _RFIDTOOL_H
#define _RFIDTOOL_H
#define _GNU_SOURCE
#include <getopt.h>
#define ARRAY_SIZE(x) (sizeof(x) / sizeof((x)[0]))
extern const char *
hexdump(const void *data, unsigned int len);
extern int
hexread(unsigned char *result, const unsigned char *in, unsigned int len);
extern struct rfid_reader_handle *rh;
extern struct rfid_layer2_handle *l2h;
extern struct rfid_protocol_handle *ph;
extern int reader_init(void);
extern int l2_init(int layer2);
extern int l3_init(int protocol);
#define LIBRFID_TOOL_VERSION "0.1"
struct rfidtool_module {
struct rfidtool_module *next;
char *name;
char *version;
const struct option *extra_opts;
unsigned int option_offset;
};
#endif /* _REFIDTOOL_H */
+230
View File
@@ -0,0 +1,230 @@
/* mifare-tool - a small command-line tool for librfid mifare testing
*
* (C) 2006 by Harald Welte <laforge@gnumonks.org>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2
* as published by the Free Software Foundation
*
* 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, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#include <stdio.h>
#include <unistd.h>
#include <stdlib.h>
#include <string.h>
#include <errno.h>
//#include <libgen.h>
#define _GNU_SOURCE
#include <getopt.h>
#include <librfid/rfid.h>
#include <librfid/rfid_scan.h>
#include <librfid/rfid_reader.h>
#include <librfid/rfid_layer2.h>
#include <librfid/rfid_protocol.h>
#include <librfid/rfid_protocol_mifare_classic.h>
#include <librfid/rfid_protocol_mifare_ul.h>
#include <librfid/rfid_access_mifare_classic.h>
#include "librfid-tool.h"
static char *program_name;
static void help(void)
{
printf( " -h --help Print this help message\n"
" -r --read Read a mifare sector\n"
" -l --loop-read Loop reading a mifare sector\n"
" -w --write Write a mifare sector\n"
" -k --key Specify mifare access key (in hex tuples)\n");
}
static struct option mifare_opts[] = {
{ "key", 1, 0, 'k' },
{ "read", 1, 0, 'r' },
{ "loop-read", 1, 0, 'l' },
{ "write", 1 ,0, 'w' },
{ "help", 0, 0, 'h' },
{ 0, 0, 0, 0 }
};
static int mifare_cl_auth(unsigned char *key, int page)
{
int rc;
rc = mfcl_set_key(ph, key);
if (rc < 0) {
fprintf(stderr, "key format error\n");
return rc;
}
rc = mfcl_auth(ph, RFID_CMD_MIFARE_AUTH1A, page);
if (rc < 0) {
fprintf(stderr, "mifare auth error\n");
return rc;
} else
printf("mifare auth succeeded!\n");
return 0;
}
static void mifare_l3(void)
{
while (l2_init(RFID_LAYER2_ISO14443A) < 0) ;
printf("ISO14443-3A anticollision succeeded\n");
while (l3_init(RFID_PROTOCOL_MIFARE_CLASSIC) < 0) ;
printf("Mifare card available\n");
}
int main(int argc, char **argv)
{
int len, rc, c, option_index = 0;
unsigned int page,uid,uid_len;
char key[MIFARE_CL_KEY_LEN];
char buf[MIFARE_CL_PAGE_SIZE];
#ifdef __MINGW32__
program_name = argv[0];
#else
program_name = basename(argv[0]);
#endif/*__MINGW32__*/
memcpy(key, MIFARE_CL_KEYA_DEFAULT_INFINEON, MIFARE_CL_KEY_LEN);
printf("%s - (C) 2006 by Harald Welte\n"
"This program is Free Software and has "
"ABSOLUTELY NO WARRANTY\n\n", program_name);
printf("initializing librfid\n");
rfid_init();
if (reader_init() < 0) {
fprintf(stderr, "error opening reader\n");
exit(1);
}
while (1) {
c = getopt_long(argc, argv, "k:r:l:w:", mifare_opts,
&option_index);
if (c == -1)
break;
switch (c) {
case 'k':
hexread(key, optarg, strlen(optarg));
printf("key: %s\n", hexdump(key, MIFARE_CL_KEY_LEN));
break;
case 'r':
page = atoi(optarg);
printf("read(key='%s',page=%u):",
hexdump(key, MIFARE_CL_KEY_LEN), page);
len = MIFARE_CL_PAGE_SIZE;
mifare_l3();
if (mifare_cl_auth(key, page) < 0)
exit(1);
uid_len=sizeof(uid);
uid=0;
if(rfid_layer2_getopt(l2h,RFID_OPT_LAYER2_UID,&uid,&uid_len)>=0)
printf("UID=%08X (len=%u)\n",uid,uid_len);
len=MIFARE_CL_PAGE_SIZE;
rc = rfid_protocol_read(ph, page, buf, &len);
if (rc < 0) {
printf("\n");
fprintf(stderr, "error during read\n");
break;
}
printf("len=%u data=%s\n", len, hexdump(buf, len));
if (page & 0x3 == 0x3) {
struct mfcl_access_sect s;
struct mfcl_access_exp_sect es;
int b;
u_int8_t recreated[4];
mfcl_parse_access(&s, buf+6);
printf("access b0:%u b1:%u b2:%u b3:%u\n",
s.block[0], s.block[1],
s.block[2], s.block[3]);
mfcl_access_to_exp(&es, &s);
for (b = 0; b < 3; b++)
printf("%u: %s\n", b, mfcl_access_exp_stringify(&es.block[b]));
printf("3: %s\n", mfcl_access_exp_acc_stringify(&es.acc));
#if 0
mfcl_compile_access(recreated, &s);
printf("recreated; %s\n", hexdump(recreated,4));
#endif
}
break;
case 'l':
page = atoi(optarg);
printf("read_loop(key='%s',page=%u):\n",
hexdump(key, MIFARE_CL_KEY_LEN), page);
while (1) {
mifare_l3();
if (mifare_cl_auth(key, page) < 0)
continue;
uid_len=sizeof(uid);
uid=0;
if(rfid_layer2_getopt(l2h,RFID_OPT_LAYER2_UID,&uid,&uid_len)>=0)
printf("UID=%08X (len=%u)\n",uid,uid_len);
len=MIFARE_CL_PAGE_SIZE;
rc = rfid_protocol_read(ph, page, buf, &len);
if (rc < 0) {
printf("\n");
fprintf(stderr, "error during read\n");
continue;
}
printf("%s\n", hexdump(buf, len));
}
break;
case 'w':
page = atoi(optarg);
len = strlen(argv[optind]);
len = hexread(buf, argv[optind], len);
printf("write(key='%s',page=%u):",
hexdump(key, MIFARE_CL_KEY_LEN), page);
printf(" '%s'(%u):", hexdump(buf, len), len);
mifare_l3();
if (mifare_cl_auth(key, page) < 0)
exit(1);
rc = rfid_protocol_write(ph, page, buf, len);
if (rc < 0) {
printf("\n");
fprintf(stderr, "error during write\n");
break;
}
printf("success\n");
break;
case 'h':
default:
help();
}
}
#if 0
rfid_protocol_close(ph);
rfid_protocol_fini(ph);
rfid_layer2_close(l2h);
rfid_layer2_fini(l2h);
#endif
rfid_reader_close(rh);
exit(0);
}
+292
View File
@@ -0,0 +1,292 @@
/*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2
* as published by the Free Software Foundation
*
* 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, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#include <stdio.h>
#include <unistd.h>
#include <stdlib.h>
#include <string.h>
#include <errno.h>
#include <ctype.h>
#define _GNU_SOURCE
#include <getopt.h>
#include <librfid/rfid.h>
#include <librfid/rfid_reader.h>
#include <librfid/rfid_layer2.h>
#include <librfid/rfid_protocol.h>
#include <librfid/rfid_protocol_mifare_classic.h>
#include <librfid/rfid_protocol_mifare_ul.h>
#define ARRAY_SIZE(x) (sizeof(x) / sizeof((x)[0]))
static const char *
hexdump(const void *data, unsigned int len)
{
static char string[2048];
unsigned char *d = (unsigned char *) data;
unsigned int i, left, llen = len;
string[0] = '\0';
left = sizeof(string);
for (i = 0; llen--; i += 3) {
if (i >= sizeof(string) -4)
break;
snprintf(string+i, 4, " %02x", *d++);
} return string;
if (i >= sizeof(string) -2)
return string;
snprintf(string+i, 2, " ");
i++; llen = len;
d = (unsigned char *) data;
for (; llen--; i += 1) {
if (i >= sizeof(string) -2)
break;
snprintf(string+i, 2, "%c", isprint(*d) ? *d : '.');
d++;
}
return string;
}
static struct rfid_reader_handle *rh;
static struct rfid_layer2_handle *l2h;
static struct rfid_protocol_handle *ph;
static int init()
{
unsigned char buf[0x3f];
int rc;
printf("initializing librfid\n");
rfid_init();
printf("opening reader handle\n");
rh = rfid_reader_open(NULL, RFID_READER_CM5121);
if (!rh) {
fprintf(stderr, "error, no cm5121 handle\n");
return -1;
}
printf("opening layer2 handle\n");
l2h = rfid_layer2_init(rh, RFID_LAYER2_ISO14443A);
//l2h = rfid_layer2_init(rh, RFID_LAYER2_ISO14443B);
if (!l2h) {
fprintf(stderr, "error during iso14443a_init\n");
return -1;
}
//rc632_register_dump(rh->ah, buf);
printf("running layer2 anticol\n");
rc = rfid_layer2_open(l2h);
if (rc < 0) {
fprintf(stderr, "error during layer2_open\n");
return rc;
}
return 0;
}
static int l3(int protocol)
{
printf("running layer3 (ats)\n");
ph = rfid_protocol_init(l2h, protocol);
if (!ph) {
fprintf(stderr, "error during protocol_init\n");
return -1;
}
if (rfid_protocol_open(ph) < 0) {
fprintf(stderr, "error during protocol_open\n");
return -1;
}
printf("we now have layer3 up and running\n");
return 0;
}
static int send_command(char* sbuf, int slen, char* rbuf, int rlen)
{
int rv;
static int doit;
int answer, c = 0;
if(doit == 0) {
fprintf(stderr, "?? %s (%i bytes)\n", hexdump(sbuf, slen), slen);
fprintf(stderr, "Execute? (Yes/No/All/Exit) ");
answer = getc(stdin);
if(answer != '\n') do {
c = getc(stdin);
} while(c != '\n' && c != EOF);
switch(answer) {
case 'y': // Fall-through
case 'Y':
case '\n':
// Do nothing
break;
case 'n': // Fall-through
case 'N':
return 0;
break;
case 'a': // Fall-through
case 'A':
doit = 1;
break;
case 'e': // Fall-through
case 'E':
return -1;
break;
default:
return 0; // Default to 'n'
break;
}
}
printf(">> %s (%i bytes)\n", hexdump(sbuf, slen), slen);
rv = rfid_protocol_transceive(ph, sbuf, slen, rbuf, &rlen, 0, 0);
if (rv < 0) {
fprintf(stderr, "Error from transceive: %i\n", rv);
return rv;
}
printf("<< %s (%i bytes)\n", hexdump(rbuf, rlen), rlen);
if(rlen < 2 || rbuf[rlen-2] != (char)0x90 || rbuf[rlen-1] != 0x00) {
fprintf(stderr, "SW is not 90 00. Ignore (i) or Abort (a)? ");
answer = getc(stdin);
if(answer != '\n') do {
c = getc(stdin);
} while(c != '\n' && c != EOF);
switch(answer) {
case 'i': // Fall-through
case 'I':
case '\n':
// Do nothing
break;
case 'a': // Fall-through
case 'A':
return -1;
break;
default:
return -1; // Default to 'a'
}
}
return rlen;
}
static char *nextline(FILE* fh)
{
int buflen = 1024; // FIXME Might want to increase dynamically?
char *buffer = malloc(buflen);
if (!buffer) {
perror("malloc");
return 0;
}
if (!fgets(buffer, buflen, fh)) {
perror("fgets");
free(buffer);
return 0;
}
return buffer;
}
static int unhexchar(char c) {
if ((c - '0') >= 0 && (c - '0') < 10)
return c-'0';
if ((c - 'a') >= 0 && (c - 'a') < 6)
return 10 + c-'a';
if ((c - 'A') >= 0 && (c - 'A') < 6)
return 10 + c-'A';
return -1;
}
int make_command( const char *line, char **buffer, int *blen )
{
int len = strlen(line), pos;
*buffer = malloc( len );
*blen = 0;
if(!*buffer) {
perror("malloc");
return 0;
}
for(pos = 0; pos < len; pos++) {
if(!isxdigit(line[pos]))
continue;
if(! (pos+1 < len) )
continue;
(*buffer)[*blen] = unhexchar(line[pos]) * 16 + unhexchar(line[pos+1]);
pos += 1;
*blen += 1;
}
return 1;
}
int main(int argc, char **argv)
{
FILE *fh;
int slen, rlen, retval = 0;
char *next, *sbuf, *rbuf;
if (argc != 2) {
fprintf(stderr, "Syntax: %s scriptfile\n", argv[0]);
exit(1);
}
fh = fopen(argv[1], "r");
if (!fh) {
perror("fopen");
exit(1);
}
if (init() < 0)
exit(1);
if (l3(RFID_PROTOCOL_TCL) < 0)
exit(1);
printf("Protocol T=CL\n");
/* we've established T=CL at this point */
while (next = nextline(fh)) {
if (!(strlen(next) >= 2 && strncmp(next, "//", 2) == 0)) {
if (make_command(next, &sbuf, &slen)) {
rlen = 1024;
rbuf = calloc(rlen, 1);
retval = send_command(sbuf, slen, rbuf, rlen);
free(sbuf);
free(rbuf);
}
}
free(next);
if (retval < 0)
break;
}
rfid_reader_close(rh);
exit(0);
}
+15
View File
@@ -0,0 +1,15 @@
LIBVERSION= 0:0:0
noinst_HEADERS = openpcd.h
noinst_DATA = openpcd.dll
INCLUDES = -I$(top_srcdir)/include
LIBRFID_DIR = $(top_builddir)/src/.libs/
CLEANFILES = $(noinst_DATA)
.c.o:
$(CC) $(CFLAGS) $(INCLUDES) -c $< -o $@
.o.dll:
$(CC) -mno-cygwin --add-stdcall-alias -shared -o $@ -L$(LIBRFID_DIR) $< -lrfid -lwinmm -Wl,-no-undefined -Wl,--entry,__cygwin_noncygwin_dll_entry@12
$(STRIP) --strip-unneeded $@

Some files were not shown because too many files have changed in this diff Show More