Commit 104395b7 authored by Kevin Modzelewski's avatar Kevin Modzelewski

Add makefile option to defer to cmake

parent d7543b90
......@@ -713,9 +713,6 @@ endef
# Finally, link it all together:
$(call link,_dbg,$(OBJS),$(LDFLAGS),$(LLVM_DEPS))
$(call link,_debug,$(OBJS),$(LDFLAGS_DEBUG),$(LLVM_DEBUG_DEPS))
$(call link,_release,$(OPT_OBJS),$(LDFLAGS_RELEASE),$(LLVM_RELEASE_DEPS))
$(call link,_grwl,stdlib.grwl.bc.o $(SRCS:.cpp=.grwl.o),$(LDFLAGS_RELEASE),$(LLVM_RELEASE_DEPS))
$(call link,_grwl_dbg,stdlib.grwl_dbg.bc.o $(SRCS:.cpp=.grwl_dbg.o),$(LDFLAGS),$(LLVM_DEPS))
$(call link,_nosync,stdlib.nosync.bc.o $(SRCS:.cpp=.nosync.o),$(LDFLAGS_RELEASE),$(LLVM_RELEASE_DEPS))
......@@ -732,13 +729,20 @@ pyston_profile: $(PROFILE_OBJS) $(LLVM_PROFILE_DEPS)
$(ECHO) Linking $@
$(VERB) $(CXX) $(PROFILE_OBJS) $(LDFLAGS_PROFILE) -o $@
.PHONY: pyston_dbg_cmake pyston_release_cmake
pyston_dbg_cmake:
ninja -C $(HOME)/pyston-build-dbg pyston
ln -Sf $(HOME)/pyston-build-dbg/pyston pyston_dbg
pyston_release_cmake:
ninja -C $(HOME)/pyston-build-release pyston
ln -Sf $(HOME)/pyston-build-release/pyston pyston_release
ifneq ($(USE_CMAKE),1)
$(call link,_dbg,$(OBJS),$(LDFLAGS),$(LLVM_DEPS))
$(call link,_debug,$(OBJS),$(LDFLAGS_DEBUG),$(LLVM_DEBUG_DEPS))
$(call link,_release,$(OPT_OBJS),$(LDFLAGS_RELEASE),$(LLVM_RELEASE_DEPS))
else
.PHONY: pyston_dbg pyston_release
pyston_dbg:
ninja -C $(HOME)/pyston-build-dbg pyston $(NINJAFLAGS)
ln -sf $(HOME)/pyston-build-dbg/pyston pyston_dbg
pyston_release:
ninja -C $(HOME)/pyston-build-release pyston $(NINJAFLAGS)
ln -sf $(HOME)/pyston-build-release/pyston pyston_release
endif
-include $(wildcard *.d) $(wildcard */*.d) $(wildcard */*/*.d) $(wildcard $(UNITTEST_DIR)/*.d) $(wildcard ./lib_python/2.7_Modules/*.d)
......
......@@ -285,7 +285,7 @@ To use the toolchain from this document, do:
```
mkdir ~/pyston-build
cd ~/pyston-build
CC=~/pyston_deps/gcc-4.8.2-install/bin/gcc CXX=~/pyston_deps/gcc-4.8.2-install/bin/g++ ~/pyston_deps/cmake-3.0.0/bin/cmake -GNinja ~/pyston -DCMAKE_MAKE_PROGRAM=$HOME/pyston_deps/ninja/ninja -DCMAKE_EXE_LINKER_FLAGS="-Wl,-rpath,$HOME/pyston_deps/gcc-4.8.2-install/lib64" -DGCC_INSTALL_PREFIX=~/pyston_deps/gcc-4.8.2-install
CC="ccache $HOME/pyston_deps/gcc-4.8.2-install/bin/gcc" CXX="ccache $HOME/pyston_deps/gcc-4.8.2-install/bin/g++" ~/pyston_deps/cmake-3.0.0/bin/cmake -GNinja ~/pyston -DCMAKE_MAKE_PROGRAM=$HOME/pyston_deps/ninja/ninja -DCMAKE_EXE_LINKER_FLAGS="-Wl,-rpath,$HOME/pyston_deps/gcc-4.8.2-install/lib64" -DGCC_INSTALL_PREFIX=~/pyston_deps/gcc-4.8.2-install
~/pyston_deps/ninja/ninja check-pyston
```
......@@ -294,7 +294,7 @@ On Ubuntu 12.04, you need a new cmake in order to use ninja, but can install nin
```
mkdir ~/pyston-build
cd ~/pyston-build
CC=~/pyston_deps/gcc-4.8.2-install/bin/gcc CXX=~/pyston_deps/gcc-4.8.2-install/bin/g++ ~/pyston_deps/cmake-3.0.0/bin/cmake -GNinja ~/pyston -DCMAKE_EXE_LINKER_FLAGS="-Wl,-rpath,$HOME/pyston_deps/gcc-4.8.2-install/lib64" -DGCC_INSTALL_PREFIX=~/pyston_deps/gcc-4.8.2-install
CC="ccache $HOME/pyston_deps/gcc-4.8.2-install/bin/gcc" CXX="ccache $HOME/pyston_deps/gcc-4.8.2-install/bin/g++" ~/pyston_deps/cmake-3.0.0/bin/cmake -GNinja ~/pyston -DCMAKE_EXE_LINKER_FLAGS="-Wl,-rpath,$HOME/pyston_deps/gcc-4.8.2-install/lib64" -DGCC_INSTALL_PREFIX=~/pyston_deps/gcc-4.8.2-install
ninja check-pyston
```
......@@ -303,7 +303,10 @@ If your system provides a new enough GCC and cmake, you can just do:
```
mkdir ~/pyston-build
cd ~/pyston-build
CC=gcc CXX=g++ cmake -GNinja ~/pyston
CC='ccache gcc' CXX='ccache g++' cmake -GNinja ~/pyston
ninja check-pyston
```
Other important options:
- `-DCMAKE_BUILD_TYPE=Debug` (or Release, but defaults to Release I believe)
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment