1 # This is a GNU makefile. You need GNU make to process it.
2 # FreeBSD users should use gmake.
6 # Unusual configuration things:
7 # CMAKE = path to cmake
8 # BUILD_DIR = directory to build things in
9 # CMAKE_FLAGS = extra flags to CMake. These will get set by
10 # ./configure, saved to CMakeOptions.txt, and read in below...
13 -include Makefile.cmake.in
16 BUILD_DIR ?= build-$(shell uname -sr | tr -d [:space:] | tr -Cs a-zA-Z0-9 _ )
17 # these come from CMakeOptions.txt (from ./configure)
22 @cd "$(BUILD_DIR)" && $(MAKE)
25 $(BUILD_DIR)/tests/testconstants
26 $(BUILD_DIR)/tests/testcategories --data-dir=tests/data
27 $(BUILD_DIR)/tests/testaddresses --data-dir=tests/data
28 $(BUILD_DIR)/tests/testdatebook --data-dir=tests/data
31 @cd "$(BUILD_DIR)" && $(MAKE) install
34 @cd "$(BUILD_DIR)" && $(MAKE) uninstall
36 lib: $(BUILD_DIR)/lib/libkpilot.so
38 $(BUILD_DIR)/lib/libkpilot.so: build-check
39 @cd "$(BUILD_DIR)/lib" && $(MAKE)
42 @cd "$(BUILD_DIR)/tests" && $(MAKE)
46 test -d "$(BUILD_DIR)" || mkdir -p "$(BUILD_DIR)"
47 test -d "$(BUILD_DIR)"
48 test -f "$(BUILD_DIR)/Makefile" || (cd "$(BUILD_DIR)" && $(CMAKE) -DKPILOT_STANDALONE=YES $(SRC_DIR) )
51 extractrc `find . -name *.rc` > rc.cc
52 extractrc `find . -name *.ui` >> rc.cc
53 xgettext -o kpilot.po --keyword=i18n rc.cc `find . -name *.h` `find . -name *.cc`
59 @rm -rf `svn status --no-ignore | awk '/^[?I]/{print $2}'`
62 @echo "Usage: make ( all | install | uninstall | clean )"
65 .PHONY : all check install uninstall lib build-check clean help