-
Notifications
You must be signed in to change notification settings - Fork 3
/
Makefile
42 lines (34 loc) · 844 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
setup: venv
. .venv/bin/activate && python -m pip install --upgrade pip
. .venv/bin/activate && pip install -r python-requirements.txt
venv:
test -d .venv || python3 -m venv .venv
clean:
rm -rf .venv
py:
. .venv/bin/activate && python main.py
mo:
. .venv/bin/activate && mojo run main.mojo
cpp-build:
@echo "Building C++ executable ..."
g++ -std=c++20 \
-O3 \
-fopenmp \
-o ./cpp/build/bin/gradient_descent \
-I ./cpp/include \
-I ./cpp/include/eigen-3.4.0 \
./cpp/src/*.cpp
@echo "Building C++ shared object ..."
g++ -std=c++20 \
-O3 \
-fpic \
-shared \
-fopenmp \
-o ./cpp/build/lib/gradient_descent.so \
-I ./cpp/include \
-I ./cpp/include/eigen-3.4.0 \
./cpp/src/*.cpp
@echo "Running C++ executable"
./cpp/build/bin/gradient_descent
shape:
. .venv/bin/activate && python -m shapes.parse_svg