enable hotplug
[openwrt.git] / package / dnsmasq / dnsmasq.mk
1 #############################################################
2 #
3 # dnsmasq
4 #
5 #############################################################
6
7 DNSMASQ_SITE=http://thekelleys.org.uk/dnsmasq
8 ifeq ($(filter $(TARGETS),dnsmasq1),)
9 DNSMASQ_SOURCE=dnsmasq-2.15.tar.gz
10 DNSMASQ_DIR=$(BUILD_DIR)/dnsmasq-2.15
11 DNSMASQ_VER=dnsmasq2
12 else
13 DNSMASQ_SOURCE=dnsmasq-1.18.tar.gz
14 DNSMASQ_DIR=$(BUILD_DIR)/dnsmasq-1.18
15 DNSMASQ_VER=dnsmasq1
16 endif
17 DNSMASQ_BINARY=dnsmasq
18 DNSMASQ_TARGET_BINARY=usr/sbin/dnsmasq
19
20 $(DL_DIR)/$(DNSMASQ_SOURCE):
21 $(WGET) -P $(DL_DIR) $(DNSMASQ_SITE)/$(DNSMASQ_SOURCE)
22
23 $(DNSMASQ_DIR)/.unpacked: $(DL_DIR)/$(DNSMASQ_SOURCE)
24 zcat $(DL_DIR)/$(DNSMASQ_SOURCE) | tar -C $(BUILD_DIR) $(TAR_OPTIONS) -
25 $(PATCH) $(DNSMASQ_DIR) ./ $(DNSMASQ_VER)-\*.patch
26 touch $(DNSMASQ_DIR)/.unpacked
27
28 $(DNSMASQ_DIR)/src/$(DNSMASQ_BINARY): $(DNSMASQ_DIR)/.unpacked
29 $(MAKE) CC=$(TARGET_CC) CFLAGS="$(TARGET_CFLAGS)" \
30 BINDIR=/usr/sbin MANDIR=/usr/man -C $(DNSMASQ_DIR)
31
32 $(TARGET_DIR)/$(DNSMASQ_TARGET_BINARY): $(DNSMASQ_DIR)/src/$(DNSMASQ_BINARY)
33 $(MAKE) BINDIR=/usr/sbin MANDIR=/usr/man \
34 DESTDIR=$(TARGET_DIR) -C $(DNSMASQ_DIR) install
35 $(STRIP) $(TARGET_DIR)/$(DNSMASQ_TARGET_BINARY)
36 rm -rf $(TARGET_DIR)/usr/man
37
38 dnsmasq: $(TARGET_DIR)/$(DNSMASQ_TARGET_BINARY)
39
40 dnsmasq1: $(TARGET_DIR)/$(DNSMASQ_TARGET_BINARY)
41
42 dnsmasq-source: $(DL_DIR)/$(DNSMASQ_SOURCE)
43
44 dnsmasq-clean:
45 #$(MAKE) prefix=$(TARGET_DIR)/usr -C $(DNSMASQ_DIR) uninstall
46 -$(MAKE) -C $(DNSMASQ_DIR) clean
47
48 dnsmasq-dirclean:
49 rm -rf $(DNSMASQ_DIR)
50
51 ifeq ($(strip $(BR2_PACKAGE_DNSMASQ)),y)
52 TARGETS+=dnsmasq
53 endif
This page took 0.04325 seconds and 5 git commands to generate.