Makefile~ 505 B

12345678910111213141516171819202122232425
  1. CPP = g++
  2. CPPFLAGS = -O3 -g
  3. EXE = fp
  4. LIB = -lmpfr
  5. SAGE = sage
  6. PYTHON = $(SAGE) -python
  7. MODULE = fp.so
  8. OBJS = obj/adjacency_matrix.o obj/coefficients.o obj/error.o obj/matrix.o obj/polygon.o
  9. all: $(EXE) #sage
  10. sage: $(MODULE)
  11. obj/%.o: src/%.cpp src/%.hpp
  12. $(CPP) $(CPPFLAGS) -c $< -o $@
  13. $(EXE): $(OBJS) src/main.cpp
  14. $(CPP) $(CPPFLAGS) $^ $(LIB) -o $@
  15. $(MODULE): sage/setup.py sage/fp.pyx
  16. $(PYTHON) sage/setup.py build_ext --inplace
  17. clean:
  18. $(RM) -r build obj/*.o *.so sage/*.cpp $(EXE)