Skip to content

Commit

Permalink
Install instruction for OSX
Browse files Browse the repository at this point in the history
  • Loading branch information
tqchen committed Oct 4, 2016
1 parent 247e902 commit d9c46ef
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
7 changes: 4 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -11,19 +11,20 @@ export LDFLAGS = -pthread -lm
export CFLAGS = -std=c++11 -Wall -O2 -msse2 -Wno-unknown-pragmas -funroll-loops\
-fPIC -I${NNVM_PATH}/include -Iinclude -Idmlc-core/include

CFLAGS += -I$(TORCH_PATH)/install/include -I$(TORCH_PATH)/install/include/TH -I$(TORCH_PATH)/install/include/THC/
LDFLAGS += -L$(TORCH_PATH)/install/lib -lluajit -lluaT -lTH -lTHC

.PHONY: clean all test lint doc

UNAME_S := $(shell uname -s)

ifeq ($(UNAME_S), Darwin)
WHOLE_ARCH= -all_load
NO_WHOLE_ARCH= -noall_load
CFLAGS += -I$(TORCH_PATH)/install/include -I$(TORCH_PATH)/install/include/TH
LDFLAGS += -L$(TORCH_PATH)/install/lib -llua -lluaT -lTH
else
WHOLE_ARCH= --whole-archive
NO_WHOLE_ARCH= --no-whole-archive
CFLAGS += -I$(TORCH_PATH)/install/include -I$(TORCH_PATH)/install/include/TH -I$(TORCH_PATH)/install/include/THC/
LDFLAGS += -L$(TORCH_PATH)/install/lib -lluajit -lluaT -lTH -lTHC
endif

SRC = $(wildcard src/*.cc src/*/*.cc src/*/*/*.cc)
Expand Down
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,8 @@ Most of TinyFlow's code is self-contained.

## Build
- Install Torch7
- For OSX User, please install Torch with Lua 5.1 instead of LuaJIT,
i.e. ```TORCH_LUA_VERSION=LUA51 ./install.sh```
- Set up environment variable ```TORCH_HOME``` to root of torch
- Type ```make```
- Setup python path to include tinyflow and nnvm
Expand Down

0 comments on commit d9c46ef

Please sign in to comment.