Commit e583b6a96346673fbac785593ccfb2adb2fca250
1 parent
80d9947a
First version
Working with nfc_proxmark3_driver Version displaying OK
Showing
3 changed files
with
40 additions
and
0 deletions
Show diff stats
@@ -0,0 +1,20 @@ | @@ -0,0 +1,20 @@ | ||
1 | +CC= gcc | ||
2 | +CC_FLAGS=-c -Wall -Werror -g | ||
3 | +CC_LIBS=$(NFC_PROXMARK_LIB) | ||
4 | +INCLUDES=-I../nfc_proxmark3_driver | ||
5 | + | ||
6 | +SOURCES=main.c | ||
7 | +OBJECTS=$(SOURCES:.c=.o) | ||
8 | +NFC_PROXMARK_LIB=-L../nfc_proxmark3_driver -lnfcproxmark3driver | ||
9 | +OUTPUT=tweekd | ||
10 | + | ||
11 | +all: $(SOURCES) $(OUTPUT) | ||
12 | + | ||
13 | +$(OUTPUT): $(OBJECTS) | ||
14 | + $(CC) $(OBJECTS) $(CC_LIBS) -o $@ | ||
15 | + | ||
16 | +%.o: %.c | ||
17 | + $(CC) -c $(INCLUDES) $(CC_FLAGS) $< -o $@ | ||
18 | + | ||
19 | +clear: | ||
20 | + rm -f $(OUTPUT) $(OBJECTS) |
@@ -0,0 +1,17 @@ | @@ -0,0 +1,17 @@ | ||
1 | +#include <stdio.h> | ||
2 | +#include <version.h> | ||
3 | +#include <transfer.h> | ||
4 | + | ||
5 | +int main(void) | ||
6 | +{ | ||
7 | + printf("Tweekd starting\n"); | ||
8 | + if(initializeProxmark() != 0) | ||
9 | + { | ||
10 | + printf("Initialization failed\n"); | ||
11 | + return 1; | ||
12 | + } | ||
13 | + printf("[NFC]\t: HW version\n"); | ||
14 | + proxVersion(); | ||
15 | + stopProxmark(); | ||
16 | + return 0; | ||
17 | +} |