2020-03-28 17:39:20 +01:00
|
|
|
# parameters:
|
|
|
|
# $(1): lowercase package name
|
|
|
|
# $(2): uppercase package name
|
|
|
|
# $(3): 32/64, build type
|
2021-11-12 11:28:45 +01:00
|
|
|
# $(4): CROSS/<empty>, cross compile
|
2020-03-28 17:39:20 +01:00
|
|
|
#
|
|
|
|
define create-rules-autoconf
|
2021-11-12 11:28:45 +01:00
|
|
|
$(call create-rules-common,$(1),$(2),$(3),$(4))
|
2020-03-28 17:39:20 +01:00
|
|
|
|
2023-12-09 08:53:50 +01:00
|
|
|
$$($(2)_SRC)/configure: $$($(2)_ORIGIN)/configure.ac | $$(OBJ)/.$(1)-post-source
|
2021-09-06 19:24:43 +02:00
|
|
|
@echo ":: autoreconfing $(1)..." >&2
|
|
|
|
cd "$$($(2)_SRC)" && autoreconf -fiv
|
|
|
|
|
2023-12-09 08:53:50 +01:00
|
|
|
$$(OBJ)/.$(1)-configure$(3): $$($(2)_SRC)/configure
|
2020-03-28 17:39:20 +01:00
|
|
|
@echo ":: configuring $(3)bit $(1)..." >&2
|
|
|
|
rm -rf "$$($(2)_OBJ$(3))/config.cache"
|
|
|
|
|
|
|
|
cd "$$($(2)_OBJ$(3))" && env $$($(2)_ENV$(3)) \
|
2020-11-05 08:55:56 +01:00
|
|
|
$$($(2)_SRC)/configure $(--quiet?) -C \
|
2020-03-28 17:39:20 +01:00
|
|
|
--prefix="$$($(2)_DST$(3))" \
|
|
|
|
--libdir="$$($(2)_DST$(3))/lib$(subst 32,,$(3))" \
|
2021-11-12 11:28:45 +01:00
|
|
|
--host="$$(TARGET_$(4)$(3))" \
|
2020-03-28 17:39:20 +01:00
|
|
|
$$($(2)_ENV$(3)) \
|
|
|
|
$$($(2)_CONFIGURE_ARGS) \
|
|
|
|
$$($(2)_CONFIGURE_ARGS$(3))
|
|
|
|
|
|
|
|
touch $$@
|
|
|
|
|
|
|
|
$$(OBJ)/.$(1)-build$(3):
|
|
|
|
@echo ":: building $(3)bit $(1)..." >&2
|
2023-09-04 15:12:40 +02:00
|
|
|
+cd "$$($(2)_OBJ$(3))" && env $$($(2)_ENV$(3)) \
|
|
|
|
$$(BEAR) $$(MAKE)
|
2020-03-28 17:39:20 +01:00
|
|
|
cd "$$($(2)_OBJ$(3))" && env $$($(2)_ENV$(3)) \
|
|
|
|
$$(MAKE) install
|
|
|
|
touch $$@
|
|
|
|
endef
|
|
|
|
|
2021-11-12 11:28:45 +01:00
|
|
|
rules-autoconf = $(call create-rules-autoconf,$(1),$(call toupper,$(1)),$(2),$(3))
|