kernel: add a missing kconfig symbol for 2.6.38
[openwrt.git] / include / cmake.mk
1 PKG_INSTALL:=1
2
3 MAKE_FLAGS+=VERBOSE=1
4
5 ifeq ($(CONFIG_CCACHE),)
6 CMAKE_C_COMPILER:=$(TOOLCHAIN_DIR)/bin/$(TARGET_CC)
7 CMAKE_C_COMPILER_ARG1:=
8 CMAKE_CXX_COMPILER:=$(TOOLCHAIN_DIR)/bin/$(TARGET_CXX)
9 CMAKE_CXX_COMPILER_ARG1:=
10 else
11 CMAKE_C_COMPILER:=$(STAGING_DIR_HOST)/bin/ccache
12 CMAKE_C_COMPILER_ARG1:=$(filter-out ccache,$(TARGET_CC))
13 CMAKE_CXX_COMPILER:=$(STAGING_DIR_HOST)/bin/ccache
14 CMAKE_CXX_COMPILER_ARG1:=$(filter-out ccache,$(TARGET_CXX))
15 endif
16
17 define Build/Configure/Default
18 (cd $(PKG_BUILD_DIR); \
19 CFLAGS="$(TARGET_CFLAGS) $(EXTRA_CFLAGS)" \
20 CXXFLAGS="$(TARGET_CFLAGS) $(EXTRA_CFLAGS)" \
21 cmake \
22 -DCMAKE_SYSTEM_NAME=Linux \
23 -DCMAKE_SYSTEM_VERSION=1 \
24 -DCMAKE_SYSTEM_PROCESSOR=$(ARCH) \
25 -DCMAKE_BUILD_TYPE=Release \
26 -DCMAKE_C_FLAGS_RELEASE="-DNDEBUG" \
27 -DCMAKE_CXX_FLAGS_RELEASE="-DNDEBUG" \
28 -DCMAKE_C_COMPILER="$(CMAKE_C_COMPILER)" \
29 -DCMAKE_C_COMPILER_ARG1="$(CMAKE_C_COMPILER_ARG1)" \
30 -DCMAKE_CXX_COMPILER="$(CMAKE_CXX_COMPILER)" \
31 -DCMAKE_CXX_COMPILER_ARG1="$(CMAKE_CXX_COMPILER_ARG1)" \
32 -DCMAKE_EXE_LINKER_FLAGS="$(TARGET_LDFLAGS)" \
33 -DCMAKE_MODULE_LINKER_FLAGS="$(TARGET_LDFLAGS)" \
34 -DCMAKE_SHARED_LINKER_FLAGS="$(TARGET_LDFLAGS)" \
35 -DCMAKE_FIND_ROOT_PATH=$(STAGING_DIR) \
36 -DCMAKE_FIND_ROOT_PATH_MODE_PROGRAM=$(STAGING_DIR_HOST) \
37 -DCMAKE_FIND_ROOT_PATH_MODE_LIBRARY=$(STAGING_DIR) \
38 -DCMAKE_FIND_ROOT_PATH_MODE_INCLUDE=$(STAGING_DIR) \
39 -DCMAKE_STRIP=: \
40 -DCMAKE_INSTALL_PREFIX=/usr \
41 $(CMAKE_OPTIONS) \
42 . \
43 )
44 endef
45
46 define Build/InstallDev/cmake
47 $(INSTALL_DIR) $(1)
48 $(CP) $(PKG_INSTALL_DIR)/* $(1)/
49 endef
50
51 Build/InstallDev = $(if $(CMAKE_INSTALL),$(Build/InstallDev/cmake))
This page took 0.068639 seconds and 5 git commands to generate.