micropython: Set MICROPY_GCREGS_SETJMP=1 for xtensa and sh
[buildroot-gz.git] / package / ustr / ustr.mk
blob3144c0b47c70d5b54e1009ac595714a7c84c0510
1 ################################################################################
3 # ustr
5 ################################################################################
7 USTR_VERSION = 1.0.4
8 USTR_SOURCE = ustr-$(USTR_VERSION).tar.bz2
9 USTR_SITE = http://www.and.org/ustr/$(USTR_VERSION)
10 USTR_LICENSE = BSD-2c MIT LGPLv2+
11 USTR_LICENSE_FILES = LICENSE LICENSE_BSD LICENSE_LGPL LICENSE_MIT
13 USTR_INSTALL_STAGING = YES
15 ifeq ($(BR2_STATIC_LIBS),y)
16 USTR_BUILD_TARGETS = all
17 USTR_INSTALL_TARGETS = install
18 else ifeq ($(BR2_SHARED_LIBS),y)
19 USTR_BUILD_TARGETS = all-shared
20 USTR_INSTALL_TARGETS = install-shared
21 else
22 USTR_BUILD_TARGETS = all all-shared
23 USTR_INSTALL_TARGETS = all install-shared
24 endif
26 define USTR_BUILD_CMDS
27 $(MAKE) -C $(@D) $(TARGET_CONFIGURE_OPTS) $(USTR_BUILD_TARGETS)
28 endef
30 define USTR_INSTALL_STAGING_CMDS
31 $(MAKE) -C $(@D) $(TARGET_CONFIGURE_OPTS) DESTDIR=$(STAGING_DIR) \
32 $(USTR_INSTALL_TARGETS)
33 $(RM) -f $(STAGING_DIR)/usr/lib/libustr-debug*
34 $(RM) -f $(STAGING_DIR)/usr/lib/pkgconfig/libustr-debug.pc
35 endef
37 define USTR_INSTALL_TARGET_CMDS
38 $(MAKE) -C $(@D) $(TARGET_CONFIGURE_OPTS) DESTDIR=$(TARGET_DIR) \
39 $(USTR_INSTALL_TARGETS)
40 $(RM) -f $(TARGET_DIR)/usr/lib/libustr-debug*
41 $(RM) -rf $(TARGET_DIR)/usr/share/ustr-$(USTR_VERSION)
42 endef
44 define HOST_USTR_BUILD_CMDS
45 $(MAKE) -C $(@D) $(HOST_CONFIGURE_OPTS) all-shared
46 endef
48 define HOST_USTR_INSTALL_CMDS
49 $(MAKE) -C $(@D) $(HOST_CONFIGURE_OPTS) DESTDIR=$(HOST_DIR) \
50 install-shared
51 endef
53 $(eval $(generic-package))
54 $(eval $(host-generic-package))