forked from heitzmann/gdstk
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
43 lines (32 loc) · 944 Bytes
/
Makefile
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
43
default: test
clean:
-rm -rf build dist gdstk.egg-info src/gdstk.egg-info
-rm -rf docs/_build docs/geometry/* docs/library/*
-rm -rf *.svg
-rm -rf *.gds
-rm -rf *.oas
-rm -rf *.out
-rm -rf docs/*.gds
-rm -rf docs/*.svg
-rm -rf docs/*/*.svg
all: test docs examples
lib:
cmake -S . -B build -G Ninja -DCMAKE_INSTALL_PREFIX=build -DCMAKE_BUILD_TYPE=Debug
cmake --build build --target install
module:
python -m build -w
docs: module
sphinx-build docs docs/_build
test: module
python -m pytest
examples: lib
cmake --build build --target examples
cmake --build build --target test
%.out: %.cpp lib
$(CXX) $(CXXFLAGS) -o $@ $< $(shell pkg-config --with-path=build --cflags gdstk) $(shell pkg-config --with-path=build --libs gdstk)
%.run: %.out
-./$<
%.grind: %.out
valgrind --undef-value-errors=no --leak-check=full --error-exitcode=1 --quiet ./$<
.PHONY: default clean all lib module docs test examples
.PRECIOUS: %.out