Skip to content
Snippets Groups Projects
Makefile 988 B
Newer Older
Cyril Moineau's avatar
Cyril Moineau committed
# This makefile does nothing but delegating the actual building to cmake
BUILDDIR := build
MAKEFLAGS := --no-print-directory

all: core_with_pybind

core_only:
	mkdir -p ${BUILDDIR}; \
	cd ${BUILDDIR}; \
	cmake -DBUILD_CORE_ALONE=ON -DCMAKE_BUILD_TYPE=Release -DPYBIND=OFF -DTESTS=OFF ..; \
	${MAKE} ${MAKEFLAGS};

core_tests:
	mkdir -p ${BUILDDIR}; \
	cd ${BUILDDIR}; \
	cmake -DBUILD_CORE_ALONE=ON -DCMAKE_BUILD_TYPE=Debug -DPYBIND=OFF -DTESTS=ON ..; \
	${MAKE} ${MAKEFLAGS}; \
	cd tests; \
	ctest --output-on-failure || true;

core_with_pybind:
	mkdir -p ${BUILDDIR}; \
	cd ${BUILDDIR}; \
	cmake -DBUILD_CORE_ALONE=ON -DCMAKE_BUILD_TYPE=Release -DPYBIND=ON -DTESTS=OFF ..; \
	${MAKE} ${MAKEFLAGS};

core_with_pybind_tests:
	mkdir -p ${BUILDDIR}; \
	cd ${BUILDDIR}; \
	cmake -DBUILD_CORE_ALONE=ON -DCMAKE_BUILD_TYPE=Debug -DPYBIND=ON -DTESTS=ON ..; \
	${MAKE} ${MAKEFLAGS}; \
	cd tests; \
	ctest --output-on-failure || true;

clean:
	if [ -d "${BUILDDIR}" ]; then rm -rf ${BUILDDIR}; fi