2015-06-13 21:59:00 +03:00
|
|
|
BUILD_DIR = build
|
|
|
|
|
|
|
|
$(BUILD_DIR_):
|
|
|
|
-mkdir $(BUILD_DIR_) 2>/dev/null
|
|
|
|
-cd $(BUILD_DIR); rm -rf *
|
|
|
|
|
|
|
|
# The release target will perform additional optimization
|
|
|
|
release: $(BUILD_DIR)
|
|
|
|
cd $(BUILD_DIR); \
|
|
|
|
cmake -DCMAKE_BUILD_TYPE=Release ..
|
|
|
|
|
|
|
|
# Enables CuTest unit testing
|
|
|
|
debug: $(BUILD_DIR)
|
|
|
|
cd $(BUILD_DIR); \
|
|
|
|
cmake -DTEST=1 ..
|
|
|
|
|
|
|
|
# For Mac only
|
|
|
|
xcode: $(BUILD_DIR)
|
|
|
|
cd $(BUILD_DIR); \
|
|
|
|
cmake -G Xcode ..
|
|
|
|
|
|
|
|
# Cross-compile for Windows
|
|
|
|
windows: $(BUILD_DIR)
|
|
|
|
cd $(BUILD_DIR); \
|
|
|
|
cmake -DCMAKE_TOOLCHAIN_FILE=../tools/Toolchain-mingw32.cmake -DCMAKE_BUILD_TYPE=Release ..
|
|
|
|
|
2015-06-14 15:23:41 +03:00
|
|
|
# Build the documentation using doxygen
|
|
|
|
documentation: $(BUILD_DIR)
|
|
|
|
cd $(BUILD_DIR); \
|
|
|
|
cmake -DDOCUMENTATION=1 ..; cd ..; \
|
|
|
|
doxygen build/doxygen.conf
|
|
|
|
|
2015-06-13 21:59:00 +03:00
|
|
|
# Clean out the build directory
|
|
|
|
clean:
|
|
|
|
rm -rf $(BUILD_DIR)/*
|