update master Makefile; add MinGW 64 bit support

This commit is contained in:
Fletcher T. Penney 2015-11-09 07:07:57 -05:00
parent af29f50383
commit db93d84d96
2 changed files with 37 additions and 4 deletions

View File

@ -10,24 +10,48 @@ release: $(BUILD_DIR)
cd $(BUILD_DIR); \
cmake -DCMAKE_BUILD_TYPE=Release ..
# Enables CuTest unit testing
# Build zip file package
.PHONY : zip
zip: $(BUILD_DIR)
cd $(BUILD_DIR); touch README.html; \
cmake -DCMAKE_BUILD_TYPE=Release -DZIP=1 ..
# debug target enables CuTest unit testing
.PHONY : debug
debug: $(BUILD_DIR)
cd $(BUILD_DIR); \
cmake -DTEST=1 ..
# For Mac only
# Create xcode project
.PHONY : xcode
xcode: $(BUILD_DIR)
cd $(BUILD_DIR); \
cmake -G Xcode ..
# Cross-compile for Windows
# Cross-compile for Windows using MinGW on *nix
.PHONY : windows
windows: $(BUILD_DIR)
cd $(BUILD_DIR); \
cd $(BUILD_DIR); touch README.html; \
cmake -DCMAKE_TOOLCHAIN_FILE=../tools/Toolchain-mingw64.cmake -DCMAKE_BUILD_TYPE=Release ..
# Build Windows zip file using MinGW on *nix
.PHONY : windows-zip
windows-zip: $(BUILD_DIR)
cd $(BUILD_DIR); touch README.html; \
cmake -DCMAKE_TOOLCHAIN_FILE=../tools/Toolchain-mingw64.cmake -DCMAKE_BUILD_TYPE=Release -DZIP=1 ..
# Cross-compile for Windows using MinGW on *nix (32-bit)
.PHONY : windows-32
windows-32: $(BUILD_DIR)
cd $(BUILD_DIR); touch README.html; \
cmake -DCMAKE_TOOLCHAIN_FILE=../tools/Toolchain-mingw32.cmake -DCMAKE_BUILD_TYPE=Release ..
# Build Windows zip file using MinGW on *nix (32-bit)
.PHONY : windows-zip-32
windows-zip-32: $(BUILD_DIR)
cd $(BUILD_DIR); touch README.html; \
cmake -DCMAKE_TOOLCHAIN_FILE=../tools/Toolchain-mingw32.cmake -DCMAKE_BUILD_TYPE=Release -DZIP=1 ..
# Build the documentation using doxygen
.PHONY : documentation
documentation: $(BUILD_DIR)

View File

@ -0,0 +1,9 @@
# Settings for compiling for Windows 64-bit machines
set (CMAKE_SYSTEM_NAME Windows)
set (CMAKE_C_COMPILER i686-w64-mingw32-gcc)
set (CMAKE_CXX_COMPILER i686-w64-mingw32-g++)
set (CMAKE_RC_COMPILER i686-w64-mingw32-windres)
set (CMAKE_FIND_ROOT_PATH /usr/bin)