kumquat-buildroot/package/tinycbor/tinycbor.mk
Peter Korsgaard b059e08420 package/tinycbor: override prefix at build time as well
To ensure the correct prefix is used in the generated tinycbor.pc instead of
/usr/local:

>>> tinycbor 0.6.0 Building
..
sed > tinycbor.pc < tinycbor.pc.in \
        -e 's,@prefix@,/usr/local,' \
        -e 's,@exec_prefix@,/usr/local,' \
        -e 's,@libdir@,/usr/local/lib,' \
        -e 's,@includedir@,/usr/local/include,' \
        -e 's,@version@,0.6.0,'
>>> tinycbor 0.6.0 Installing to staging directory
..
install -m 644 tinycbor.pc /path/to/buildroot/output/host/aarch64-buildroot-linux-gnu/sysroot/usr/lib/pkgconfig/tinycbor.pc

Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2024-04-25 19:19:56 +02:00

46 lines
1.3 KiB
Makefile

################################################################################
#
# tinycbor
#
################################################################################
TINYCBOR_VERSION = 0.6.0
TINYCBOR_SITE = $(call github,intel,tinycbor,v$(TINYCBOR_VERSION))
TINYCBOR_LICENSE = MIT
TINYCBOR_LICENSE_FILES = LICENSE
TINYCBOR_DEPENDENCIES = host-pkgconf
TINYCBOR_INSTALL_STAGING = YES
ifeq ($(BR2_PACKAGE_CJSON),y)
TINYCBOR_DEPENDENCIES += cjson
endif
TINYCBOR_MAKE_OPTS = $(TARGET_CONFIGURE_OPTS) DISABLE_WERROR=1 V=1 prefix=/usr
ifeq ($(BR2_STATIC_LIBS),y)
TINYCBOR_MAKE_OPTS += BUILD_STATIC=1 BUILD_SHARED=0
else ifeq ($(BR2_SHARED_STATIC_LIBS),y)
TINYCBOR_MAKE_OPTS += BUILD_STATIC=1 BUILD_SHARED=1
else ifeq ($(BR2_SHARED_LIBS),y)
TINYCBOR_MAKE_OPTS += BUILD_STATIC=0 BUILD_SHARED=1
endif
# disabled parallel build because of build failures while
# producing the .config file
define TINYCBOR_BUILD_CMDS
$(TARGET_MAKE_ENV) $(MAKE1) $(TINYCBOR_MAKE_OPTS) -C $(@D)
endef
define TINYCBOR_INSTALL_STAGING_CMDS
$(TARGET_MAKE_ENV) $(MAKE) $(TINYCBOR_MAKE_OPTS) -C $(@D) \
DESTDIR=$(STAGING_DIR) install
endef
define TINYCBOR_INSTALL_TARGET_CMDS
$(TARGET_MAKE_ENV) $(MAKE) $(TINYCBOR_MAKE_OPTS) -C $(@D) \
DESTDIR=$(TARGET_DIR) install
endef
$(eval $(generic-package))