summaryrefslogtreecommitdiffstats
path: root/package/wget/wget.mk
blob: 06e54c74559db32ddc670fcbab88f3dcb2d00bd8 (plain)
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
49
50
51
52
53
54
55
56
57
58
59
60
#############################################################
#
# wget
#
#############################################################
WGET_VERSION:=1.10.2
WGET_SOURCE:=wget-$(WGET_VERSION).tar.gz
WGET_SITE:=$(BR2_GNU_MIRROR)/wget
WGET_DIR:=$(BUILD_DIR)/wget-$(WGET_VERSION)
WGET_CAT:=$(ZCAT)
WGET_BINARY:=src/wget
WGET_TARGET_BINARY:=bin/wget

$(DL_DIR)/$(WGET_SOURCE):
	$(call DOWNLOAD,$(WGET_SITE),$(WGET_SOURCE))

wget-source: $(DL_DIR)/$(WGET_SOURCE)

$(WGET_DIR)/.unpacked: $(DL_DIR)/$(WGET_SOURCE)
	$(WGET_CAT) $(DL_DIR)/$(WGET_SOURCE) | tar -C $(BUILD_DIR) $(TAR_OPTIONS) -
	$(CONFIG_UPDATE) $(WGET_DIR)
	touch $@

$(WGET_DIR)/.configured: $(WGET_DIR)/.unpacked
	(cd $(WGET_DIR); rm -rf config.cache; \
		$(TARGET_CONFIGURE_OPTS) \
		$(TARGET_CONFIGURE_ARGS) \
		./configure $(QUIET) \
		--target=$(GNU_TARGET_NAME) \
		--host=$(GNU_TARGET_NAME) \
		--build=$(GNU_HOST_NAME) \
		--prefix=/ \
		--disable-ipv6 \
		$(DISABLE_NLS) \
		--without-ssl \
	)
	touch $@

$(WGET_DIR)/$(WGET_BINARY): $(WGET_DIR)/.configured
	$(MAKE) $(TARGET_CONFIGURE_OPTS) -C $(WGET_DIR)

$(TARGET_DIR)/$(WGET_TARGET_BINARY): $(WGET_DIR)/$(WGET_BINARY)
	install -D $(WGET_DIR)/$(WGET_BINARY) $(TARGET_DIR)/$(WGET_TARGET_BINARY)

wget: $(TARGET_DIR)/$(WGET_TARGET_BINARY)

wget-clean:
	rm -f $(TARGET_DIR)/$(WGET_TARGET_BINARY)
	-$(MAKE) -C $(WGET_DIR) clean

wget-dirclean:
	rm -rf $(WGET_DIR)
#############################################################
#
# Toplevel Makefile options
#
#############################################################
ifeq ($(BR2_PACKAGE_WGET),y)
TARGETS+=wget
endif