mirror of
https://github.com/brmlab/brmdoor_libnfc.git
synced 2025-06-07 08:04:06 +02:00
Renamed module and files to nfc_smartcard
This commit is contained in:
parent
c297246545
commit
b57259b51d
9 changed files with 28 additions and 26 deletions
6
.gitignore
vendored
6
.gitignore
vendored
|
@ -5,8 +5,8 @@
|
|||
*.pyc
|
||||
|
||||
#SWIG
|
||||
brmdoor_nfc_wrap.cxx
|
||||
brmdoor_nfc.py
|
||||
nfc_smartcard_wrap.cxx
|
||||
nfc_smartcard.py
|
||||
|
||||
#Vim, GDB, Doxygen
|
||||
tags
|
||||
|
@ -26,3 +26,5 @@ brmdoor_libnfc.kpf
|
|||
#Testing config
|
||||
brmdoor_nfc.config
|
||||
|
||||
# flags for custom installed libnfc to be sourced into environment
|
||||
env_flags
|
||||
|
|
14
Makefile
14
Makefile
|
@ -3,22 +3,22 @@ PYTHON_CONFIG := python$(DEFAULT_PYTHON_VERSION)-config
|
|||
PYTHON_INCLUDES := $(shell $(PYTHON_CONFIG) --includes)
|
||||
CXXFLAGS += -Wall -g $(PYTHON_INCLUDES) -fPIC
|
||||
LDFLAGS += -lnfc
|
||||
OBJECTS = brmdoor_nfc.o brmdoor_nfc_wrap.o
|
||||
SWIG_GENERATED = brmdoor_nfc_wrap.cxx brmdoor_nfc.py
|
||||
PY_MODULE = _brmdoor_nfc.so
|
||||
OBJECTS = nfc_smartcard.o nfc_smartcard_wrap.o
|
||||
SWIG_GENERATED = nfc_smartcard_wrap.cxx nfc_smartcard.py
|
||||
PY_MODULE = _nfc_smartcard.so
|
||||
|
||||
all: $(PY_MODULE)
|
||||
|
||||
$(PY_MODULE): $(OBJECTS)
|
||||
g++ -shared -o $@ $(OBJECTS) $(LDFLAGS)
|
||||
|
||||
brmdoor_nfc.o: brmdoor_nfc.cpp brmdoor_nfc.h
|
||||
g++ -c $(CXXFLAGS) brmdoor_nfc.cpp
|
||||
nfc_smartcard.o: nfc_smartcard.cpp nfc_smartcard.h
|
||||
g++ -c $(CXXFLAGS) nfc_smartcard.cpp
|
||||
|
||||
brmdoor_nfc_wrap.o: brmdoor_nfc_wrap.cxx
|
||||
nfc_smartcard_wrap.o: nfc_smartcard_wrap.cxx
|
||||
g++ -c $(CXXFLAGS) $<
|
||||
|
||||
brmdoor_nfc_wrap.cxx: brmdoor_nfc.i brmdoor_nfc.h
|
||||
nfc_smartcard_wrap.cxx: nfc_smartcard.i nfc_smartcard.h
|
||||
swig -python -c++ $<
|
||||
|
||||
clean:
|
||||
|
|
|
@ -4,7 +4,7 @@ import hmac
|
|||
import hashlib
|
||||
import logging
|
||||
|
||||
from brmdoor_nfc import NFCError
|
||||
from nfc_smartcard import NFCError
|
||||
|
||||
|
||||
class UidRecord(object):
|
||||
|
|
|
@ -1,13 +0,0 @@
|
|||
%module brmdoor_nfc
|
||||
|
||||
%{
|
||||
#include "brmdoor_nfc.h"
|
||||
%}
|
||||
|
||||
%include std_string.i
|
||||
%include std_except.i
|
||||
%include stdint.i
|
||||
|
||||
%include "brmdoor_nfc.h"
|
||||
|
||||
|
|
@ -8,7 +8,7 @@ import ConfigParser
|
|||
from binascii import hexlify
|
||||
|
||||
|
||||
from brmdoor_nfc import NFCDevice, NFCError
|
||||
from nfc_smartcard import NFCDevice, NFCError
|
||||
from brmdoor_authenticator import UidAuthenticator, YubikeyHMACAuthenthicator
|
||||
import unlocker
|
||||
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
#include <nfc/nfc-types.h>
|
||||
|
||||
|
||||
#include "brmdoor_nfc.h"
|
||||
#include "nfc_smartcard.h"
|
||||
|
||||
using namespace std;
|
||||
|
13
nfc_smartcard.i
Normal file
13
nfc_smartcard.i
Normal file
|
@ -0,0 +1,13 @@
|
|||
%module nfc_smartcard
|
||||
|
||||
%{
|
||||
#include "nfc_smartcard.h"
|
||||
%}
|
||||
|
||||
%include std_string.i
|
||||
%include std_except.i
|
||||
%include stdint.i
|
||||
|
||||
%include "nfc_smartcard.h"
|
||||
|
||||
|
|
@ -1,7 +1,7 @@
|
|||
#!/usr/bin/env python
|
||||
import sys
|
||||
|
||||
from brmdoor_nfc import NFCDevice, NFCError
|
||||
from nfc_smartcard import NFCDevice, NFCError
|
||||
from binascii import hexlify
|
||||
|
||||
def formatAPDU(apdu):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue