forked from nfc-tools/libnfc
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
move some examples to utils/ since they are not examples anymore :) (…
…Fixes Issue 164)
- Loading branch information
Showing
34 changed files
with
126 additions
and
83 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -44,7 +44,7 @@ | |
|
||
#include <nfc/nfc.h> | ||
|
||
#include "nfc-utils.h" | ||
#include "utils/nfc-utils.h" | ||
|
||
#define MAX_FRAME_LEN 264 | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -43,7 +43,7 @@ | |
|
||
#include <nfc/nfc.h> | ||
|
||
#include "nfc-utils.h" | ||
#include "utils/nfc-utils.h" | ||
|
||
#define MAX_FRAME_LEN 264 | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -52,7 +52,7 @@ | |
|
||
#include <nfc/nfc.h> | ||
|
||
#include "nfc-utils.h" | ||
#include "utils/nfc-utils.h" | ||
|
||
#define MAX_FRAME_LEN 264 | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
SET(UTILS-SOURCES nfc-emulate-forum-tag2 nfc-emulate-forum-tag4 nfc-list nfc-relay-picc nfc-mfclassic nfc-mfultralight) | ||
|
||
# XXX: Examples should not use private API! | ||
#INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR}/../libnfc) | ||
|
||
INCLUDE_DIRECTORIES(${LIBUSB_INCLUDE_DIRS} ${PCSC_INCLUDE_DIRS}) | ||
LINK_DIRECTORIES(${LIBUSB_LIBRARY_DIRS} ${PCSC_LIBRARY_DIRS}) | ||
|
||
ADD_LIBRARY(nfcutils STATIC | ||
nfc-utils.c | ||
) | ||
|
||
# Examples | ||
FOREACH(source ${UTILS-SOURCES}) | ||
IF((${source} MATCHES "nfc-mfultralight") OR (${source} MATCHES "nfc-mfclassic")) | ||
ADD_EXECUTABLE(${source} ${source}.c mifare) | ||
ELSE() | ||
ADD_EXECUTABLE(${source} ${source}.c) | ||
ENDIF((${source} MATCHES "nfc-mfultralight") OR (${source} MATCHES "nfc-mfclassic")) | ||
TARGET_LINK_LIBRARIES(${source} nfc) | ||
TARGET_LINK_LIBRARIES(${source} nfcutils) | ||
INSTALL(TARGETS ${source} RUNTIME DESTINATION bin COMPONENT utils) | ||
ENDFOREACH(source) | ||
|
||
#install required libraries | ||
IF(WIN32) | ||
INCLUDE(InstallRequiredSystemLibraries) | ||
CONFIGURE_FILE(${CMAKE_SOURCE_DIR}/cmake/FixBundle.cmake.in ${CMAKE_CURRENT_BINARY_DIR}/FixBundle.cmake @ONLY) | ||
INSTALL(SCRIPT ${CMAKE_CURRENT_BINARY_DIR}/FixBundle.cmake) | ||
ENDIF(WIN32) | ||
|
||
IF(NOT WIN32) | ||
# Manuals for the examples | ||
FILE(GLOB manuals "${CMAKE_CURRENT_SOURCE_DIR}/*.1") | ||
INSTALL(FILES ${manuals} DESTINATION ${SHARE_INSTALL_PREFIX}/man/man1 COMPONENT manuals) | ||
ENDIF(NOT WIN32) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
bin_PROGRAMS = \ | ||
nfc-emulate-forum-tag2 \ | ||
nfc-emulate-forum-tag4 \ | ||
nfc-list \ | ||
nfc-mfclassic \ | ||
nfc-mfsetuid \ | ||
nfc-mfultralight \ | ||
nfc-relay-picc | ||
|
||
# set the include path found by configure | ||
INCLUDES= $(all_includes) $(LIBNFC_CFLAGS) | ||
|
||
AM_CFLAGS = -I$(top_srcdir)/libnfc | ||
|
||
noinst_HEADERS = mifare.h nfc-utils.h | ||
noinst_LTLIBRARIES = libnfcutils.la | ||
|
||
libnfcutils_la_SOURCES = nfc-utils.c | ||
|
||
nfc_emulate_forum_tag2_SOURCES = nfc-emulate-forum-tag2.c | ||
nfc_emulate_forum_tag2_LDADD = $(top_builddir)/libnfc/libnfc.la \ | ||
libnfcutils.la | ||
|
||
nfc_emulate_forum_tag4_SOURCES = nfc-emulate-forum-tag4.c | ||
nfc_emulate_forum_tag4_LDADD = $(top_builddir)/libnfc/libnfc.la \ | ||
libnfcutils.la | ||
|
||
nfc_list_SOURCES = nfc-list.c | ||
nfc_list_LDADD = $(top_builddir)/libnfc/libnfc.la \ | ||
libnfcutils.la | ||
|
||
nfc_mfultralight_SOURCES = nfc-mfultralight.c mifare.c mifare.h | ||
nfc_mfultralight_LDADD = $(top_builddir)/libnfc/libnfc.la | ||
|
||
nfc_mfclassic_SOURCES = nfc-mfclassic.c mifare.c mifare.h | ||
nfc_mfclassic_LDADD = $(top_builddir)/libnfc/libnfc.la \ | ||
libnfcutils.la | ||
|
||
nfc_mfsetuid_SOURCES = nfc-mfsetuid.c | ||
nfc_mfsetuid_LDADD = $(top_builddir)/libnfc/libnfc.la \ | ||
libnfcutils.la | ||
|
||
nfc_relay_picc_SOURCES = nfc-relay-picc.c | ||
nfc_relay_picc_LDADD = $(top_builddir)/libnfc/libnfc.la \ | ||
libnfcutils.la | ||
|
||
dist_man_MANS = \ | ||
nfc-emulate-forum-tag4.1 \ | ||
nfc-list.1 \ | ||
nfc-mfclassic.1 \ | ||
nfc-mfsetuid.1 \ | ||
nfc-mfultralight.1 | ||
|
||
if HAS_LOG4C | ||
AM_CFLAGS += @log4c_CFLAGS@ | ||
LIBADD = @log4c_LIBS@ | ||
endif | ||
|
||
EXTRA_DIST = CMakeLists.txt |
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.