Skip to content

Instantly share code, notes, and snippets.

@xiaohan2012
Created September 20, 2017 12:01
Show Gist options
  • Save xiaohan2012/a89d4b439629f0e554b95f433e4e343f to your computer and use it in GitHub Desktop.
Save xiaohan2012/a89d4b439629f0e554b95f433e4e343f to your computer and use it in GitHub Desktop.
CXX=g++
CPPFLAGS=-std=c++11 -O2 -Wall
LINK_OPTS=-shared -Wl,--export-dynamic
COMPILE_OPTS=-fPIC
INCLUDES=-I /usr/include/python3.5/
LIBS=-L /usr/lib/x86_64-linux-gnu/ -l boost_python-py35
%.so: %.o
$(CXX) $^ $(CPPFLAGS) $(LINK_OPTS) $(LIBS) -o $@
%.o: %.cpp
$(CXX) $(CPPFLAGS) $(COMPILE_OPTS) $(INCLUDES) -c $<
.PHONY: clean
clean:
rm -f *.o *.so *~ core
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment