Makefile 353 B

123456789101112131415161718192021
  1. CPP = g++
  2. CPPFLAGS = -O3 -mavx2 -mfma -g
  3. EXE = fp
  4. LIB = -lmpfr
  5. SAGE = sage
  6. PYTHON = $(SAGE) -python
  7. MODULE = fp.so
  8. all: $(EXE) sage
  9. sage: $(MODULE)
  10. $(EXE): src/*.hpp src/*.cpp
  11. $(CPP) $(CPPFLAGS) $^ -o $@ $(LIB)
  12. $(MODULE): sage/setup.py sage/fp.pyx
  13. $(PYTHON) sage/setup.py build_ext --inplace
  14. clean:
  15. $(RM) -r build *.so sage/*.cpp $(EXE)