All of lore.kernel.org
 help / color / mirror / Atom feed
From: Samuel Martin <s.martin49@gmail.com>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH v2 4/4] cdrkit: convert to CMAKETARGETS infrastructure
Date: Sun, 23 Jan 2011 14:30:22 +0100	[thread overview]
Message-ID: <AANLkTi=XYYi_M7W1_NAdnV+WW9iFftEZ5+uYL3CCtoym@mail.gmail.com> (raw)
In-Reply-To: <1295124808-5649-5-git-send-email-bjorn.forsman@gmail.com>

Hi,


2011/1/15 Bj?rn Forsman <bjorn.forsman@gmail.com>

> Signed-off-by: Bj?rn Forsman <bjorn.forsman@gmail.com>
> ---
>  package/cdrkit/cdrkit.mk |   65
> ++++++---------------------------------------
>  1 files changed, 9 insertions(+), 56 deletions(-)
>
> diff --git a/package/cdrkit/cdrkit.mk b/package/cdrkit/cdrkit.mk
> index a0ce9cb..0e97cc1 100644
> --- a/package/cdrkit/cdrkit.mk
> +++ b/package/cdrkit/cdrkit.mk
> @@ -11,61 +11,14 @@ else
>  CMAKE_ENDIAN_OPT=-DBITFIELDS_HTOL=0
>  endif
>
> -# CMake doesn't support having the --sysroot option directly in the
> -# compiler path, so move this option to the CFLAGS/CXXFLAGS variables.
> -CDRKIT_TARGET_CC = $(filter-out --sysroot=%,$(TARGET_CC))
> -CDRKIT_TARGET_CXX = $(filter-out --sysroot=%,$(TARGET_CXX))
> -CDRKIT_TARGET_CFLAGS = $(filter --sysroot=%,$(TARGET_CC)) $(TARGET_CFLAGS)
> -CDRKIT_TARGET_CXXFLAGS = $(filter --sysroot=%,$(TARGET_CXX))
> $(TARGET_CXXFLAGS)
> +CDRKIT_CONF_OPT += $(CMAKE_ENDIAN_OPT)
>
> -define CDRKIT_CONFIGURE_CMDS
> - -mkdir $(@D)/build
> - (cd $(@D)/build ; \
> -       $(HOST_DIR)/usr/bin/cmake .. \
> -               -Wno-dev \
> -               -DCMAKE_SYSTEM_NAME:STRING="Linux" \
> -               -DCMAKE_C_COMPILER:FILEPATH="$(CDRKIT_TARGET_CC)" \
> -               -DCMAKE_CXX_COMPILER:FILEPATH="$(CDRKIT_TARGET_CXX)" \
> -               -DCMAKE_C_FLAGS:STRING="$(CDRKIT_TARGET_CFLAGS)" \
> -               -DCMAKE_CXX_FLAGS:STRING="$(CDRKIT_TARGET_CXXFLAGS)" \
> -               -DCMAKE_EXE_LINKER_FLAGS:STRING="$(TARGET_LDFLAGS)" \
> -               -DCMAKE_MODULE_LINKER_FLAGS:STRING="$(TARGET_LDFLAGS)" \
> -               -DCMAKE_SHARED_LINKER_FLAGS:STRING="$(TARGET_LDFLAGS)" \
> -               -DCMAKE_FIND_ROOT_PATH:PATH="$(STAGING_DIR)" \
> -               -DCMAKE_INSTALL_PREFIX:PATH="$(TARGET_DIR)/usr" \
> -               $(CMAKE_ENDIAN_OPT) \
> - )
> -endef
> -
> -define CDRKIT_BUILD_CMDS
> - $(TARGET_MAKE_ENV) $(MAKE) -C $(@D)/build
> -endef
> -
> -define CDRKIT_INSTALL_TARGET_CMDS
> - $(TARGET_MAKE_ENV) $(MAKE) -C $(@D)/build install
> -endef
> -
> -define HOST_CDRKIT_CONFIGURE_CMDS
> - -mkdir $(@D)/build
> - (cd $(@D)/build ; \
> -       $(HOST_DIR)/usr/bin/cmake .. \
> -               -Wno-dev \
> -               -DCMAKE_C_FLAGS="$(HOST_CFLAGS)" \
> -               -DCMAKE_EXE_LINKER_FLAGS:STRING="$(HOST_LDFLAGS)" \
> -               -DCMAKE_MODULE_LINKER_FLAGS:STRING="$(HOST_LDFLAGS)" \
> -               -DCMAKE_SHARED_LINKER_FLAGS:STRING="$(HOST_LDFLAGS)" \
> -               -DCMAKE_INSTALL_PREFIX:STRING="$(HOST_DIR)/usr" \
> - )
> -endef
> -
> -define HOST_CDRKIT_BUILD_CMDS
> - $(HOST_MAKE_ENV) $(MAKE) -C $(@D)/build
> -endef
> -
> -define HOST_CDRKIT_INSTALL_CMDS
> - $(HOST_MAKE_ENV) $(MAKE) -C $(@D)/build  install
> -endef
> -
> -$(eval $(call GENTARGETS,package,cdrkit))
> -$(eval $(call GENTARGETS,package,cdrkit,host))
> +## cdrkit isn't completely re-rooted by CMAKE_FIND_ROOT_PATH, so add
> +## some extra flags so it finds needed libs and headers.
> +CDRKIT_CONF_OPT += -DCMAKE_REQUIRED_INCLUDES="$(STAGING_DIR)/usr/include"
> +CDRKIT_CONF_OPT += -DCMAKE_EXE_LINKER_FLAGS="$(TARGET_LDFLAGS)"
> +HOST_CDRKIT_CONF_OPT +=
> -DCMAKE_REQUIRED_INCLUDES="$(HOST_DIR)/usr/include"
> +HOST_CDRKIT_CONF_OPT += -DCMAKE_EXE_LINKER_FLAGS="$(HOST_LDFLAGS)"
>
any specific reasons to remove defined variables' type?


>
> +$(eval $(call CMAKETARGETS,package,cdrkit))
> +$(eval $(call CMAKETARGETS,package,cdrkit,host))
> --
> 1.7.1
>
> _______________________________________________
> buildroot mailing list
> buildroot at busybox.net
> http://lists.busybox.net/mailman/listinfo/buildroot


sounds good.

Samuel
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.busybox.net/pipermail/buildroot/attachments/20110123/d6a1ce49/attachment.html>

  reply	other threads:[~2011-01-23 13:30 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-01-15 20:53 [Buildroot] [PATCH v2 0/4] Introducing CMAKETARGETS infrastructure Bjørn Forsman
2011-01-15 20:53 ` [Buildroot] [PATCH v2 1/4] Makefile: generate CMake toolchain-file in $(O) Bjørn Forsman
2011-01-25 23:21   ` Thomas Petazzoni
2011-01-26  0:33     ` Bjørn Forsman
2011-01-26  7:47       ` Thomas Petazzoni
2011-01-15 20:53 ` [Buildroot] [PATCH v2 2/4] Add CMAKETARGETS infrastructure for CMake packages Bjørn Forsman
2011-01-23 13:30   ` Samuel Martin
2011-01-25 23:25   ` Thomas Petazzoni
2011-01-26  0:39     ` Bjørn Forsman
2011-01-15 20:53 ` [Buildroot] [PATCH v2 3/4] doc: add CMAKETARGETS documentation Bjørn Forsman
2011-01-15 20:53 ` [Buildroot] [PATCH v2 4/4] cdrkit: convert to CMAKETARGETS infrastructure Bjørn Forsman
2011-01-23 13:30   ` Samuel Martin [this message]
2011-01-23 14:42     ` Bjørn Forsman
2011-01-25 23:26       ` Thomas Petazzoni
2011-01-26  8:43   ` Thomas Petazzoni
2011-01-26  9:56     ` Bjørn Forsman
2011-01-22 11:54 ` [Buildroot] [PATCH v2 0/4] Introducing " Bjørn Forsman
2011-01-24 17:16   ` Thomas Petazzoni

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='AANLkTi=XYYi_M7W1_NAdnV+WW9iFftEZ5+uYL3CCtoym@mail.gmail.com' \
    --to=s.martin49@gmail.com \
    --cc=buildroot@busybox.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.