-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
executable file
·51 lines (39 loc) · 1.32 KB
/
Makefile
File metadata and controls
executable file
·51 lines (39 loc) · 1.32 KB
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
OFILES = base/Matrix.o \
base/Volume.o \
base/Fields.o \
base/LinearAlgebra.o \
base/Camera.o \
base/Color.o \
base/ImplicitVolumeShapes.o \
base/ImplicitVectorShapes.o \
base/ImplicitColors.o \
base/ImplicitMatrixShapes.o \
base/RectangularGrid.o \
base/SparseGrid.o \
base/Grids.o \
base/FileHandler.o \
base/RayMarch.o \
base/Triangle.o \
base/PerlinNoise.o \
base/NoiseMachine.o \
base/Wisps.o
AFILES = $(OFILES)
ROOTDIR = .
LIB = -L$(ROOTDIR)/lib -lstarter -lm -lOpenImageIO
CXX = g++ -shared -g -O2 -fPIC -fopenmp -lOpenImageIO -fopenmp -std=c++14
SWIGCXX = g++ -shared -g -O2 -fPIC -fopenmp -fopenmp -std=c++14
PYTHONINCLUDE = -I/usr/include/python3.8
SWIGEXEC = swig
INCLUDES = -I ./include/ $(PYTHONINCLUDE)
all: $(AFILES)
ar rv ./lib/libstarter.a $?
.C.o: $<
$(CXX) -c $(INCLUDES) $< -o $@
clean:
rm -rf ./main *.o bin/* base/*.o core ./lib/libstarter.a *~ swig/*~ swig/*.so swig/*.o swig/*.cxx swig/*.pyc swig/bishop.py* doc/html doc/latex python/*.pyc
genswig: swig/bishop.i $(OFILES)
$(SWIGEXEC) -c++ -python -shadow -I./include/ swig/bishop.i
$(SWIGCXX) -c swig/bishop_wrap.cxx $(INCLUDES) -o swig/bishop_wrap.o
$(SWIGCXX) swig/bishop_wrap.o $(LIB) -o swig/_bishop.so
render:
g++ -g -O2 -fPIC -fopenmp -std=c++14 main.C $(INCLUDES) -L. lib/libstarter.a -lOpenImageIO -o main