-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
42 lines (28 loc) · 742 Bytes
/
Makefile
File metadata and controls
42 lines (28 loc) · 742 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
SHELL = /bin/bash
CFLAGS ?= -fPIC -O3 -std=c++2a -Wall -Wextra -pedantic
SRC ?= $(wildcard libringbuf/*.cpp)
all:
clean:
rm -rf build
rm -rf *.so
rm -rf mmap_queue/mmap_queue.cpp
setup_venv:
python3 -m venv venv \
&& source ./venv/bin/activate \
&& pip install cython pytest
build_libringbuf:
$(CXX) -I ./includes/ $(CFLAGS) $(SRC) -shared -o libringbuf.so
dist_py:
source venv/bin/activate && \
export LDFLAGS="-L." && \
python setup.py build_ext --inplace
.PHONY: build
build: clean build_libringbuf dist_py
utest:
source venv/bin/activate && \
export LD_LIBRARY_PATH="." && \
pytest test.py
benchmark:
source venv/bin/activate && \
export LD_LIBRARY_PATH="." && \
python benchmark.py