diff options
author | Jon Nordby <jononor@gmail.com> | 2025-05-14 19:05:34 +0200 |
---|---|---|
committer | Jon Nordby <jononor@gmail.com> | 2025-05-14 19:05:34 +0200 |
commit | 8b2563ef4764f93901d65fffc786ae1a9ae9774d (patch) | |
tree | aff67ec76fcd5a27c86e544047ea53cb25dd9470 /bindings | |
parent | 2f08a04e673c82cccd223a9beb6803e65a016653 (diff) |
bindings: Add a unified Makefile
Diffstat (limited to 'bindings')
-rw-r--r-- | bindings/.gitignore | 3 | ||||
-rw-r--r-- | bindings/Makefile | 23 |
2 files changed, 26 insertions, 0 deletions
diff --git a/bindings/.gitignore b/bindings/.gitignore index 140f8cf..7b22e56 100644 --- a/bindings/.gitignore +++ b/bindings/.gitignore @@ -1 +1,4 @@ *.so + +build/ +obj_dir/ diff --git a/bindings/Makefile b/bindings/Makefile new file mode 100644 index 0000000..c76d3a0 --- /dev/null +++ b/bindings/Makefile @@ -0,0 +1,23 @@ + +SHARED_LIB=obj_dir/libsim.so + +# FIXME: +PY_MODULE=galearn_pdm.cpython-313-x86_64-linux-gnu.so + +all: ${PY_MODULE} + +clean: + rm -fr obj_dir + +.PHONY: all check clean + +${SHARED_LIB}: ../verilator_lib/mul.v ../verilator_lib/sim.cc + verilator --cc --lib-create sim --build -j 0 -Wall $^ + +check: ${PY_MODULE} + python test_galearn_pdm.py + +${PY_MODULE}: ${SHARED_LIB} + python setup.py build_ext --inplace + + |