1 # Generic Makefile.cvs for CMake-based projects:
3 # Create a subdirecory build/ and call cmake from there with /usr prefix.
5 # Intentionally using /usr rather than the default /usr/local since this is for
6 # internal use, and we are the distribution makers: /usr/local is off limits
9 # Author: Stefan Hundhammer <sh@suse.de>
12 HERE_FROM_BUILD_SUBDIR = ..
14 CMAKE = /usr/bin/cmake
19 cmake: create-build-subdir create-toplevel-makefile
20 ( cd $(BUILD_SUBDIR) && $(CMAKE) -DCMAKE_INSTALL_PREFIX=$(PREFIX) $(HERE_FROM_BUILD_SUBDIR) )
24 test -d $(BUILD_SUBDIR) || mkdir $(BUILD_SUBDIR)
27 create-toplevel-makefile:
29 echo -e '\t$$(MAKE) $$(MAKEFLAGS) -C $(BUILD_SUBDIR)' >>Makefile