Commit 5ec9aa85 authored by Romain Bignon's avatar Romain Bignon

reorganization of the build system

parent 5af2f544
build.minbif
/build/
doc/html
*.so
*.pyc
Session.vim
tests/config.py
Makefile.options.local
ENABLE_MINBIF ?= ON
ENABLE_CACA ?= ON
ENABLE_VIDEO ?= OFF
ENABLE_PLUGIN ?= OFF
ENABLE_PAM ?= OFF
PREFIX ?= /usr/local/
CMAKE_OPTIONS = -DCMAKE_BUILD_TYPE=Debug -DCMAKE_VERBOSE_MAKEFILE=0 \
-DENABLE_CACA=$(ENABLE_CACA) -DENABLE_VIDEO=$(ENABLE_VIDEO) -DENABLE_PLUGIN=$(ENABLE_PLUGIN) -DENABLE_PAM=$(ENABLE_PAM) -DENABLE_MINBIF=$(ENABLE_MINBIF) \
-DCMAKE_INSTALL_PREFIX=$(PREFIX) -DMAN_PREFIX=$(MAN_PREFIX) -DCONF_PREFIX=$(CONF_PREFIX) -DDOC_PREFIX=$(DOC_PREFIX)
all: build.minbif/Makefile
make -C build.minbif all
build.minbif/Makefile:
[ -d build.minbif ] || mkdir build.minbif; \
cd build.minbif && cmake $(CMAKE_OPTIONS) .. || cd .. && rm -rf build.minbif
include Makefile.options.defaults
-include Makefile.options.local
include Makefile.parser
CMAKE_OPTIONS = $(EXTRA_CMAKE_FLAGS) $(CMAKE_PREFIX)
all: build/Makefile
$(MAKE) -C build all
build/Makefile: Makefile.options.local
@[ -d build ] || mkdir build
cd build && cmake .. $(CMAKE_OPTIONS) || cd .. && rm -rf build
install:
make -C build.minbif install
$(MAKE) -C build install
clean:
rm -rf build.minbif
rm -rf build
rm -rf release
doc:
cd doc/ && /usr/bin/doxygen
tests:
make -C tests
$(MAKE) -C tests
.PHONY: all clean install doc tests
# Options for minbif
#
# Do NOT edit this file directly ! Copy it to Makefile.options.local
# and edit it.
#
# This file is used as an abstraction around CMake command line
# Enable debug mde
DEBUG = 0
# Compile minbif
ENABLE_MINBIF ?= ON
# Compile with the libcaca support
ENABLE_CACA ?= ON
# Compile with the video support
ENABLE_VIDEO ?= OFF
# Compile libpurple plugins
ENABLE_PLUGIN ?= OFF
# Compile with the pam support
ENABLE_PAM ?= OFF
# Installation prefix
# PREFIX = /usr/local/
# MAN_PREFIX = /usr/local/share/man/man8/
# CONF_PREFIX = /etc/minbif/
# DOC_PREFIX = /usr/local/share/doc/minbif/
# Print the gcc call line.
CMAKE_VERBOSE_MAKEFILE = 0
EXTRA_CMAKE_FLAGS += -DDEBUG=$(DEBUG)
EXTRA_CMAKE_FLAGS += -DENABLE_MINBIF=$(ENABLE_MINBIF)
EXTRA_CMAKE_FLAGS += -DENABLE_CACA=$(ENABLE_CACA)
EXTRA_CMAKE_FLAGS += -DENABLE_VIDEO=$(ENABLE_VIDEO)
EXTRA_CMAKE_FLAGS += -DENABLE_PLUGIN=$(ENABLE_PLUGIN)
EXTRA_CMAKE_FLAGS += -DENABLE_PAM=$(ENABLE_PAM)
ifneq ($(PREFIX),)
CMAKE_PREFIX = -DCMAKE_INSTALL_PREFIX="$(PREFIX)"
endif
ifneq ($(MAN_PREFIX),)
EXTRA_CMAKE_FLAGS += -DMAN_PREFIX=$(MAN_PREFIX)
endif
ifneq ($(CONF_PREFIX),)
EXTRA_CMAKE_FLAGS += -DCONF_PREFIX=$(CONF_PREFIX)
endif
ifneq ($(DOC_PREFIX),)
EXTRA_CMAKE_FLAGS += -DDOC_PREFIX=$(DOC_PREFIX)
endif
ifneq ($(CMAKE_VERBOSE_MAKEFILE),)
EXTRA_CMAKE_FLAGS += -DCMAKE_VERBOSE_MAKEFILE=$(CMAKE_VERBOSE_MAKEFILE)
endif
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