From e583b6a96346673fbac785593ccfb2adb2fca250 Mon Sep 17 00:00:00 2001 From: henyxia Date: Sun, 1 Feb 2015 15:27:16 +0100 Subject: [PATCH] First version Working with nfc_proxmark3_driver Version displaying OK --- .gitignore | 3 +++ Makefile | 20 ++++++++++++++++++++ main.c | 17 +++++++++++++++++ 3 files changed, 40 insertions(+), 0 deletions(-) create mode 100644 .gitignore create mode 100644 Makefile create mode 100644 main.c diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..525a40d --- /dev/null +++ b/.gitignore @@ -0,0 +1,3 @@ +*.swp +*.o +tweekd diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..dc48b2d --- /dev/null +++ b/Makefile @@ -0,0 +1,20 @@ +CC= gcc +CC_FLAGS=-c -Wall -Werror -g +CC_LIBS=$(NFC_PROXMARK_LIB) +INCLUDES=-I../nfc_proxmark3_driver + +SOURCES=main.c +OBJECTS=$(SOURCES:.c=.o) +NFC_PROXMARK_LIB=-L../nfc_proxmark3_driver -lnfcproxmark3driver +OUTPUT=tweekd + +all: $(SOURCES) $(OUTPUT) + +$(OUTPUT): $(OBJECTS) + $(CC) $(OBJECTS) $(CC_LIBS) -o $@ + +%.o: %.c + $(CC) -c $(INCLUDES) $(CC_FLAGS) $< -o $@ + +clear: + rm -f $(OUTPUT) $(OBJECTS) diff --git a/main.c b/main.c new file mode 100644 index 0000000..055149e --- /dev/null +++ b/main.c @@ -0,0 +1,17 @@ +#include +#include +#include + +int main(void) +{ + printf("Tweekd starting\n"); + if(initializeProxmark() != 0) + { + printf("Initialization failed\n"); + return 1; + } + printf("[NFC]\t: HW version\n"); + proxVersion(); + stopProxmark(); + return 0; +} -- libgit2 0.21.2