Change standard to C++11 and swig to swig 3

This commit is contained in:
Ondrej Mikle 2017-10-22 18:21:33 +02:00
parent 1caf38de7e
commit dd37e20a02

View file

@ -1,7 +1,7 @@
DEFAULT_PYTHON_VERSION := $(shell python2 -c 'import platform; print "%s.%s" % platform.python_version_tuple()[:2]') DEFAULT_PYTHON_VERSION := $(shell python2 -c 'import platform; print "%s.%s" % platform.python_version_tuple()[:2]')
PYTHON_CONFIG := python$(DEFAULT_PYTHON_VERSION)-config PYTHON_CONFIG := python$(DEFAULT_PYTHON_VERSION)-config
PYTHON_INCLUDES := $(shell $(PYTHON_CONFIG) --includes) PYTHON_INCLUDES := $(shell $(PYTHON_CONFIG) --includes)
CXXFLAGS += -Wall -g $(PYTHON_INCLUDES) -fPIC CXXFLAGS += -Wall -g $(PYTHON_INCLUDES) -fPIC -std=c++11
LDFLAGS += -lnfc LDFLAGS += -lnfc
OBJECTS = nfc_smartcard.o nfc_smartcard_wrap.o OBJECTS = nfc_smartcard.o nfc_smartcard_wrap.o
SWIG_GENERATED = nfc_smartcard_wrap.cxx nfc_smartcard.py SWIG_GENERATED = nfc_smartcard_wrap.cxx nfc_smartcard.py
@ -19,7 +19,7 @@ nfc_smartcard_wrap.o: nfc_smartcard_wrap.cxx
g++ -c $(CXXFLAGS) $< g++ -c $(CXXFLAGS) $<
nfc_smartcard_wrap.cxx: nfc_smartcard.i nfc_smartcard.h nfc_smartcard_wrap.cxx: nfc_smartcard.i nfc_smartcard.h
swig -python -c++ $< swig3.0 -python -c++ $<
clean: clean:
rm -f $(OBJECTS) $(PY_MODULE) $(SWIG_GENERATED) *.pyc rm -f $(OBJECTS) $(PY_MODULE) $(SWIG_GENERATED) *.pyc