forked from ProcursusTeam/Procursus
-
Notifications
You must be signed in to change notification settings - Fork 0
/
libtool.mk
48 lines (40 loc) · 1.33 KB
/
libtool.mk
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
ifneq ($(PROCURSUS),1)
$(error Use the main Makefile)
endif
SUBPROJECTS += libtool
LIBTOOL_VERSION := 2.4.6
DEB_LIBTOOL_V ?= $(LIBTOOL_VERSION)
libtool-setup: setup
wget -q -nc -P $(BUILD_SOURCE) https://ftpmirror.gnu.org/libtool/libtool-$(LIBTOOL_VERSION).tar.gz{,.sig}
$(call PGP_VERIFY,libtool-$(LIBTOOL_VERSION).tar.gz)
$(call EXTRACT_TAR,libtool-$(LIBTOOL_VERSION).tar.gz,libtool-$(LIBTOOL_VERSION),libtool)
ifneq ($(wildcard $(BUILD_WORK)/libtool/.build_complete),)
libtool:
@echo "Using previously built libtool."
else
libtool: libtool-setup
cd $(BUILD_WORK)/libtool && ./configure -C \
--host=$(GNU_HOST_TRIPLE) \
--prefix=/usr \
--program-prefix=g \
--enable-ltdl-install
+$(MAKE) -C $(BUILD_WORK)/libtool
+$(MAKE) -C $(BUILD_WORK)/libtool install \
DESTDIR=$(BUILD_STAGE)/libtool
+$(MAKE) -C $(BUILD_WORK)/libtool install \
DESTDIR="$(BUILD_BASE)"
touch $(BUILD_WORK)/libtool/.build_complete
endif
libtool-package: libtool-stage
# libtool.mk Package Structure
rm -rf $(BUILD_DIST)/libtool
mkdir -p $(BUILD_DIST)/libtool
# libtool.mk Prep libtool
cp -a $(BUILD_STAGE)/libtool/usr $(BUILD_DIST)/libtool
# libtool.mk Sign
$(call SIGN,libtool,general.xml)
# libtool.mk Make .debs
$(call PACK,libtool,DEB_LIBTOOL_V)
# libtool.mk Build cleanup
rm -rf $(BUILD_DIST)/libtool
.PHONY: libtool libtool-package