Makefile 372 B

12345678910111213141516171819
  1. GUROBI_DIR=/opt/gurobi650/linux64
  2. CPP=g++ -D_GLIBCXX_USE_CXX11_ABI=0 -m64 -g
  3. INC=-I$(GUROBI_DIR)/include
  4. LIBS=-L $(GUROBI_DIR)/lib -lgurobi_c++ -lgurobi65 -lpthread -lm
  5. SOURCES=gurobi.cpp
  6. main: $(SOURCES:.cpp=.o)
  7. $(CPP) -o $@ $^ $(INC) $(LIBS)
  8. %.o: %.cpp
  9. $(CPP) -o $@ -c $< $(INC)
  10. .PHONY: clean mrproper
  11. clean:
  12. rm -f $(SOURCES:.cpp=.o)
  13. mrproper: clean
  14. rm -f main