diff options
author | Waldemar Brodkorb <wbx@openadk.org> | 2014-06-26 11:29:20 +0200 |
---|---|---|
committer | Waldemar Brodkorb <wbx@openadk.org> | 2014-06-26 11:29:43 +0200 |
commit | 1d3eac1e033e3d333d29ea1f32ab9f2b1d11e3f5 (patch) | |
tree | 81c9927d7a867311e5c7f82052b252cc95623d8b | |
parent | f8c4bf7569c33f0520dd91bf6ce31b9558a57f8e (diff) |
add CONFIG_STYLE for cmake based packages, fixup cmake host install
-rw-r--r-- | mk/pkg-bottom.mk | 13 | ||||
-rw-r--r-- | package/bcm2835-vc/Makefile | 5 | ||||
-rw-r--r-- | package/cmake/Makefile | 10 | ||||
-rw-r--r-- | package/mysql/Makefile | 19 | ||||
-rw-r--r-- | scripts/toolchain.cmake.in | 3 |
5 files changed, 23 insertions, 27 deletions
diff --git a/mk/pkg-bottom.mk b/mk/pkg-bottom.mk index 55bdde563..15da3c6b9 100644 --- a/mk/pkg-bottom.mk +++ b/mk/pkg-bottom.mk @@ -57,6 +57,19 @@ endif ifneq ($(filter manual,${CONFIG_STYLE}),) env ${CONFIGURE_ENV} ${MAKE} do-configure $(MAKE_TRACE) +else ifneq ($(filter cmake,${CONFIG_STYLE}),) + @$(CMD_TRACE) "configuring cmake... " + sed -e "s#@@TARGET_CC@@#$(TARGET_CC)#" \ + -e "s#@@TARGET_CXX@@#$(TARGET_CXX)#" \ + -e "s#@@TARGET_CFLAGS@@#$(TARGET_CFLAGS)#" \ + -e "s#@@TARGET_CXXFLAGS@@#$(TARGET_CXXFLAGS)#" \ + -e "s#@@STAGING_TARGET_DIR@@#$(STAGING_TARGET_DIR)#" \ + -e "s#@@STAGING_HOST_DIR@@#$(STAGING_HOST_DIR)#" \ + $(SCRIPT_DIR)/toolchain.cmake.in > $(SCRIPT_DIR)/toolchain.cmake + (cd ${WRKBUILD} && PATH='${HOST_PATH}' \ + cmake -DCMAKE_INSTALL_PREFIX:PATH=/usr \ + -DCMAKE_TOOLCHAIN_FILE="$(SCRIPT_DIR)/toolchain.cmake" \ + .) else ifneq ($(filter minimal,${CONFIG_STYLE}),) @$(CMD_TRACE) "configuring... " cd ${WRKBUILD}; rm -f config.{cache,status}; \ diff --git a/package/bcm2835-vc/Makefile b/package/bcm2835-vc/Makefile index 25187a7ae..dcff7bac9 100644 --- a/package/bcm2835-vc/Makefile +++ b/package/bcm2835-vc/Makefile @@ -21,10 +21,7 @@ include ${ADK_TOPDIR}/mk/package.mk $(eval $(call PKG_template,BCM2835_VC,bcm2835-vc,${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION})) -CONFIG_STYLE:= manual - -do-configure: - (cd $(WRKBUILD) && PATH='${TARGET_PATH}' cmake -DCMAKE_SYSTEM_NAME=Linux .) +CONFIG_STYLE:= cmake bcm2835-vc-install: $(INSTALL_DIR) ${IDIR_BCM2835_VC}/opt/vc/{bin,lib} diff --git a/package/cmake/Makefile b/package/cmake/Makefile index 8d8b14f86..2bc2fc468 100644 --- a/package/cmake/Makefile +++ b/package/cmake/Makefile @@ -22,19 +22,17 @@ include $(ADK_TOPDIR)/mk/package.mk $(eval $(call HOST_template,CMAKE,cmake,$(PKG_VERSION)-${PKG_RELEASE})) HOST_STYLE:= manual -CONFIG_STYLE:= manual -XAKE_FLAGS+= GCC_HONOUR_COPTS=s host-configure: - (cd $(WRKBUILD); ./configure --prefix=/usr) + (cd $(WRKBUILD); ./configure --prefix=${STAGING_HOST_DIR}/usr ) host-build: (cd ${WRKBUILD} && env ${HOST_MAKE_ENV} ${MAKE} -f ${MAKE_FILE} \ - ${HOST_MAKE_FLAGS} ${HOST_ALL_TARGET}) + ${HOST_MAKE_FLAGS} ${HOST_ALL_TARGET}) $(MAKE_TRACE) cmake-hostinstall: - $(INSTALL_BIN) $(WRKBUILD)/bin/cmake \ - $(STAGING_HOST_DIR)/usr/bin + cd ${WRKBUILD} && env ${HOST_MAKE_ENV} ${MAKE} -f ${MAKE_FILE} \ + ${HOST_FAKE_FLAGS} ${HOST_INSTALL_TARGET} $(MAKE_TRACE) include ${ADK_TOPDIR}/mk/host-bottom.mk include ${ADK_TOPDIR}/mk/pkg-bottom.mk diff --git a/package/mysql/Makefile b/package/mysql/Makefile index 8e05b9d94..b69d71296 100644 --- a/package/mysql/Makefile +++ b/package/mysql/Makefile @@ -26,7 +26,7 @@ $(eval $(call HOST_template,MYSQL,mysql,${PKG_VERSION}-${PKG_RELEASE})) $(eval $(call PKG_template,LIBMYSQLCLIENT,libmysqlclient,${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION},${PKG_OPTS})) HOST_STYLE:= manual -CONFIG_STYLE:= manual +CONFIG_STYLE:= cmake host-configure: cd ${WRKBUILD} && PATH='${HOST_PATH}' \ @@ -49,22 +49,7 @@ mysql-hostinstall: $(INSTALL_BIN) ${WRKBUILD}/storage/perfschema/gen_pfs_lex_token \ $(STAGING_HOST_DIR)/usr/bin -do-configure: - sed -e "s#@@TARGET_CC@@#$(TARGET_CC)#" \ - -e "s#@@TARGET_CXX@@#$(TARGET_CXX)#" \ - -e "s#@@TARGET_CFLAGS@@#$(TARGET_CFLAGS)#" \ - -e "s#@@TARGET_CXXFLAGS@@#$(TARGET_CXXFLAGS)#" \ - -e "s#@@STAGING_TARGET_DIR@@#$(STAGING_TARGET_DIR)#" \ - -e "s#@@STAGING_HOST_DIR@@#$(STAGING_HOST_DIR)#" \ - $(SCRIPT_DIR)/toolchain.cmake.in > $(SCRIPT_DIR)/toolchain.cmake - (cd ${WRKBUILD} && PATH='${HOST_PATH}' \ - cmake -DCMAKE_INSTALL_PREFIX:PATH=/usr \ - -DCMAKE_TOOLCHAIN_FILE="$(SCRIPT_DIR)/toolchain.cmake" \ - -DWITH_EDITLINE=bundled \ - -DCURSES_LIBRARY="$(STAGING_TARGET_DIR)/usr/lib" \ - -DCURSES_INCLUDE_PATH="$(STAGING_TARGET_DIR)/usr/lib" \ - -DSTACK_DIRECTION=1 \ - .) +post-configure: $(CP) $(STAGING_HOST_DIR)/usr/bin/comp_err \ ${WRKBUILD}/extra/ $(CP) $(STAGING_HOST_DIR)/usr/bin/comp_sql \ diff --git a/scripts/toolchain.cmake.in b/scripts/toolchain.cmake.in index 150bfcb27..85aadcbdd 100644 --- a/scripts/toolchain.cmake.in +++ b/scripts/toolchain.cmake.in @@ -1,6 +1,9 @@ set(CMAKE_SYSTEM_NAME Linux) set(CMAKE_C_COMPILER @@TARGET_CC@@) set(CMAKE_CXX_COMPILER @@TARGET_CXX@@) +set(CMAKE_SYSTEM_NAME Linux) +set(CMAKE_C_FLAGS "@@TARGET_CFLAGS@@" CACHE STRING "OpenADK CFLAGS" FORCE) +set(CMAKE_CXX_FLAGS "@@TARGET_CXXFLAGS@@" CACHE STRING "OpenADK CXXFLAGS" FORCE) set(CMAKE_INSTALL_SO_NO_EXE 0) set(CMAKE_PROGRAM_PATH \"@@STAGING_HOST_DIR@@/usr/bin\") set(CMAKE_FIND_ROOT_PATH \"@@STAGING_TARGET_DIR@@\") |