Skip to content

Instantly share code, notes, and snippets.

@dnbaker
Last active December 25, 2018 00:31
Show Gist options
  • Save dnbaker/212f0bbf3dcf62075568ea7a8e9cdebf to your computer and use it in GitHub Desktop.
Save dnbaker/212f0bbf3dcf62075568ea7a8e9cdebf to your computer and use it in GitHub Desktop.
libtorch Makefile
all: zomg
LDP=-L lib
LIBS=c10 gloo gtest clog THD protobuf caffe2 torch mkldnn c10d
LIB=$(patsubst %,-l%,$(LIBS))
FLAGS=-O3 -std=c++17 -fopenmp -D_GLIBCXX_USE_CXX11_ABI=0
INCS=include include/torch/csrc/api/include/
INCLUDE=$(patsubst %,-I%,$(INCS))
%: %.cpp
$(CXX) $(INCLUDE) $(FLAGS) $< -o $@ $(LDP) $(LIB)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment