Created
February 27, 2020 14:56
-
-
Save mattn/92d4ce7dd76f495fd3e36aa19cdf1c5a to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
TENSORFLOW_DIR = c:/dev/tensorflow | |
CFLAGS = \ | |
-shared \ | |
-Ic:/msys64/mingw64/include/python3.8 \ | |
-I${TENSORFLOW_DIR}/tensorflow/lite/tools/make/downloads/flatbuffers/include \ | |
-I${TENSORFLOW_DIR}/tensorflow/lite/tools/make/downloads/absl | |
INSTALL_DIR = c:/msys64/mingw64/lib/python3.8/site-packages/tflite_runtime | |
OS_ARCH=windows_x86_64 | |
all: _tensorflow_wrap_interpreter_wrapper.pyd | |
.SUFFIXES: .cc .cxx .o | |
_tensorflow_wrap_interpreter_wrapper.pyd: interpreter_wrapper.o numpy.o python_error_reporter.o python_utils.o interpreter_wrapper_wrap.o | |
g++ -shared -o _tensorflow_wrap_interpreter_wrapper.pyd interpreter_wrapper.o numpy.o python_error_reporter.o python_utils.o interpreter_wrapper_wrap.o -lpython3.8 \ | |
-L${TENSORFLOW_DIR}/tensorflow/lite/tools/make/gen/${OS_ARCH}/lib \ | |
-ltensorflow-lite | |
.cxx.o: | |
g++ -c ${CFLAGS} $< | |
.cc.o: | |
g++ -c ${CFLAGS} $< | |
interpreter_wrapper_wrap.cxx: interpreter_wrapper.i | |
swig -c++ -python -module tensorflow_wrap_interpreter_wrapper -outdir . -Ic:/dev/tensorflow interpreter_wrapper.i | |
clean: | |
-rm *.o *.pyd | |
install: _tensorflow_wrap_interpreter_wrapper.pyd | |
cp _tensorflow_wrap_interpreter_wrapper.pyd ${INSTALL_DIR}/_tensorflow_wrap_interpreter_wrapper.pyd |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment