-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
56 lines (41 loc) · 1.49 KB
/
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
44
45
46
47
48
49
50
51
52
53
54
55
56
PYTHON = python3
PYTHONCONFIG = python3-config
CXX = c++
CYTHON = cython
LIBPYSPADES = $(shell $(PYTHON) -m site --user-site)/pyspades
CXXFLAGS = -pthread -std=c++23 -fPIC -Ibuild/ -Iinclude/ -I$(LIBPYSPADES) $(shell $(PYTHONCONFIG) --includes)
LDFLAGS = -pthread -shared
all: build
build:
mkdir -p build
clean:
rm -f build/*.o build/*.h build/*.cxx milsim/*.so
release: CXXFLAGS += -O3
release: all
build/%.cxx: source/%.pyx
$(CYTHON) --cplus -3 $< -o $@
build/%.o: build/%.cxx
$(CXX) -c $(CXXFLAGS) $< -o $@
build/%.o: source/%.cxx
$(CXX) -c $(CXXFLAGS) $< -o $@
milsim/%.so: build/%.o
$(CXX) $(LDFLAGS) $^ -o $@
%.hxx:
touch $@
all: milsim/packets.so milsim/engine.so milsim/vxl.so
build/engine.h: build/engine.o
build/packets.o:
build/vxl.o: include/VXL.hxx
build/engine.o: include/Milsim/PyEngine.hxx
build/Engine.o: include/Milsim/Engine.hxx
build/PyEngine.o: include/Milsim/Engine.hxx include/Milsim/PyEngine.hxx
build/VXL.o: include/VXL.hxx
milsim/vxl.so: build/VXL.o
milsim/engine.so: build/PyEngine.o build/Engine.o
include/Milsim/AABB.hxx: include/Milsim/Vector.hxx
include/Milsim/Engine.hxx: build/engine.h include/Python.hxx include/Milsim/Vector.hxx include/Milsim/AABB.hxx include/Milsim/Fundamentals.hxx
include/Milsim/Fundamentals.hxx: include/Milsim/Vector.hxx include/Milsim/AABB.hxx
include/Milsim/PyEngine.hxx: include/Milsim/Fundamentals.hxx include/Python.hxx
include/Milsim/Vector.hxx:
include/Python.hxx:
include/VXL.hxx: include/Milsim/Vector.hxx