diff --git a/configure.ac b/configure.ac index e3df80e..7d3e134 100644 --- a/configure.ac +++ b/configure.ac @@ -149,6 +149,7 @@ fi AC_CONFIG_FILES([ Makefile src/Makefile + src/examples/Makefile libnfc.pc ]) diff --git a/src/Makefile.am b/src/Makefile.am index 47a50bf..985ef96 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -1,15 +1,11 @@ -enable_pcsc_lite = @enable_pcsc_lite@ - -bin_PROGRAMS = nfc-anticol nfc-list nfc-mftool nfc-mfultool nfc-relay nfc-emulate nfcip-target nfcip-initiator +SUBDIRS = . examples # set the include path found by configure INCLUDES= $(all_includes) nfc_devices_headers = dev_arygon.h -nfc_examples_headers = mifaretag.h mifareultag.h nfcinclude_HEADERS = libnfc.h bitutils.h defines.h types.h rs232.h devices.h messages.h nfcinclude_HEADERS += $(nfc_devices_headers) -nfcinclude_HEADERS += $(nfc_examples_headers) nfcincludedir = $(includedir)/libnfc lib_LTLIBRARIES = libnfc.la @@ -31,31 +27,3 @@ if LIBUSB_ENABLED libnfc_la_LIBADD += @LIBUSB_LIBS@ endif -nfc_anticol_SOURCES = anticol.c -nfc_anticol_LDADD = libnfc.la - -nfc_list_SOURCES = list.c -nfc_list_LDADD = libnfc.la - -nfc_mfultool_SOURCES = mfultool.c -nfc_mfultool_LDADD = libnfc.la - -nfc_mftool_SOURCES = mftool.c -nfc_mftool_LDADD = libnfc.la - -nfc_relay_SOURCES = relay.c -nfc_relay_LDADD = libnfc.la - -nfc_emulate_SOURCES = emulate.c -nfc_emulate_LDADD = libnfc.la - -nfcip_target_SOURCES = target.c -nfcip_target_LDADD = libnfc.la - -nfcip_initiator_SOURCES = initiator.c -nfcip_initiator_LDADD = libnfc.la - -dist_man_MANS = nfc-anticol.1 nfc-emulate.1 nfc-list.1 nfc-mftool.1 nfc-relay.1 -#dist_man_MANS = $(man_MANS) -#EXTRA_DIST = $(man_MANS) - diff --git a/src/examples/Makefile.am b/src/examples/Makefile.am new file mode 100644 index 0000000..de6d8f9 --- /dev/null +++ b/src/examples/Makefile.am @@ -0,0 +1,35 @@ +bin_PROGRAMS = nfc-anticol nfc-list nfc-mftool nfc-mfultool nfc-relay nfc-emulate nfcip-target nfcip-initiator + +# set the include path found by configure +INCLUDES= $(all_includes) + +AM_CFLAGS = -I$(top_srcdir)/src + +nfc_anticol_SOURCES = nfc-anticol.c +nfc_anticol_LDADD = $(top_builddir)/src/libnfc.la + +nfc_list_SOURCES = nfc-list.c +nfc_list_LDADD = $(top_builddir)/src/libnfc.la + +nfc_mfultool_SOURCES = nfc-mfultool.c mifareultag.h +nfc_mfultool_LDADD = $(top_builddir)/src/libnfc.la + +nfc_mftool_SOURCES = nfc-mftool.c mifaretag.h +nfc_mftool_LDADD = $(top_builddir)/src/libnfc.la + +nfc_relay_SOURCES = nfc-relay.c +nfc_relay_LDADD = $(top_builddir)/src/libnfc.la + +nfc_emulate_SOURCES = nfc-emulate.c +nfc_emulate_LDADD = $(top_builddir)/src/libnfc.la + +nfcip_target_SOURCES = nfcip-target.c +nfcip_target_LDADD = $(top_builddir)/src/libnfc.la + +nfcip_initiator_SOURCES = nfcip-initiator.c +nfcip_initiator_LDADD = $(top_builddir)/src/libnfc.la + +dist_man_MANS = nfc-anticol.1 nfc-emulate.1 nfc-list.1 nfc-mftool.1 nfc-relay.1 +#dist_man_MANS = $(man_MANS) +#EXTRA_DIST = $(man_MANS) + diff --git a/src/mifaretag.h b/src/examples/mifaretag.h similarity index 100% rename from src/mifaretag.h rename to src/examples/mifaretag.h diff --git a/src/mifareultag.h b/src/examples/mifareultag.h similarity index 100% rename from src/mifareultag.h rename to src/examples/mifareultag.h diff --git a/src/nfc-anticol.1 b/src/examples/nfc-anticol.1 similarity index 100% rename from src/nfc-anticol.1 rename to src/examples/nfc-anticol.1 diff --git a/src/anticol.c b/src/examples/nfc-anticol.c similarity index 100% rename from src/anticol.c rename to src/examples/nfc-anticol.c diff --git a/src/nfc-emulate.1 b/src/examples/nfc-emulate.1 similarity index 100% rename from src/nfc-emulate.1 rename to src/examples/nfc-emulate.1 diff --git a/src/emulate.c b/src/examples/nfc-emulate.c similarity index 100% rename from src/emulate.c rename to src/examples/nfc-emulate.c diff --git a/src/nfc-list.1 b/src/examples/nfc-list.1 similarity index 100% rename from src/nfc-list.1 rename to src/examples/nfc-list.1 diff --git a/src/list.c b/src/examples/nfc-list.c similarity index 100% rename from src/list.c rename to src/examples/nfc-list.c diff --git a/src/nfc-mftool.1 b/src/examples/nfc-mftool.1 similarity index 100% rename from src/nfc-mftool.1 rename to src/examples/nfc-mftool.1 diff --git a/src/mftool.c b/src/examples/nfc-mftool.c similarity index 100% rename from src/mftool.c rename to src/examples/nfc-mftool.c diff --git a/src/mfultool.c b/src/examples/nfc-mfultool.c similarity index 100% rename from src/mfultool.c rename to src/examples/nfc-mfultool.c diff --git a/src/nfc-relay.1 b/src/examples/nfc-relay.1 similarity index 100% rename from src/nfc-relay.1 rename to src/examples/nfc-relay.1 diff --git a/src/relay.c b/src/examples/nfc-relay.c similarity index 100% rename from src/relay.c rename to src/examples/nfc-relay.c diff --git a/src/initiator.c b/src/examples/nfcip-initiator.c similarity index 100% rename from src/initiator.c rename to src/examples/nfcip-initiator.c diff --git a/src/target.c b/src/examples/nfcip-target.c similarity index 100% rename from src/target.c rename to src/examples/nfcip-target.c