Unbreak example and add autotool stuff to help building.

This commit is contained in:
Romain Tartiere 2010-01-08 13:40:39 +00:00
parent 0c0d8e77a3
commit 2b76328c78
3 changed files with 11 additions and 5 deletions

7
examples/Makefile.am Normal file
View file

@ -0,0 +1,7 @@
AM_CFLAGS = -I. @LIBNFC_CFLAGS@
AM_LDFLAGS = @LIBNFC_LIBS@
bin_PROGRAMS = mifare-classic-format
mifare_classic_format_SOURCES = mifare-classic-format.c
mifare_classic_format_LDADD = -lnfc $(top_builddir)/libfreefare/libfreefare.la

View file

@ -4,17 +4,16 @@
#include <nfc/nfc.h>
#include <mifare_common.h>
#include <mifare_classic.h>
#include <freefare.h>
#define DEBUG 1
#define DEBUG
// Useful macros
#ifdef DEBUG
// #define DBG(x, args...) printf("DBG %s:%d: " x "\n", __FILE__, __LINE__,## args )
#define DBG(x, ...) fprintf(stderr, "DBG %s:%d: " x "\n", __FILE__, __LINE__, ## __VA_ARGS__ )
#else
#define DBG(...) {}
#define DBG(...) do {} while (0)
#endif
static nfc_device_t *device = NULL;