12345678910111213141516171819202122232425 |
- CPP = g++
- CPPFLAGS = -O3 -g
- EXE = fp
- LIB = -lmpfr
- SAGE = sage
- PYTHON = $(SAGE) -python
- MODULE = fp.so
- OBJS = obj/adjacency_matrix.o obj/coefficients.o obj/error.o obj/matrix.o obj/polygon.o
- all: $(EXE) #sage
- sage: $(MODULE)
- obj/%.o: src/%.cpp src/%.hpp
- $(CPP) $(CPPFLAGS) -c $< -o $@
- $(EXE): $(OBJS) src/main.cpp
- $(CPP) $(CPPFLAGS) $^ $(LIB) -o $@
- $(MODULE): sage/setup.py sage/fp.pyx
- $(PYTHON) sage/setup.py build_ext --inplace
- clean:
- $(RM) -r build obj/*.o *.so sage/*.cpp $(EXE)
|