| 1 | ############################################################# |
|---|
| 2 | # |
|---|
| 3 | # dnsmasq |
|---|
| 4 | # |
|---|
| 5 | ############################################################# |
|---|
| 6 | |
|---|
| 7 | DNSMASQ_SOURCE_URL=http://www.thekelleys.org.uk/dnsmasq/archive |
|---|
| 8 | DNSMASQ_SOURCE=dnsmasq-1.18.tar.gz |
|---|
| 9 | DNSMASQ_DIR=$(BUILD_DIR)/dnsmasq-1.18 |
|---|
| 10 | |
|---|
| 11 | DNSMASQ_PATCH=$(PATCH_DIR)/dnsmasq/1.18.diff |
|---|
| 12 | |
|---|
| 13 | $(DL_DIR)/$(DNSMASQ_SOURCE): |
|---|
| 14 | $(WGET) -P $(DL_DIR) $(DNSMASQ_SOURCE_URL)/$(DNSMASQ_SOURCE) |
|---|
| 15 | |
|---|
| 16 | dnsmasq-source: $(DL_DIR)/$(DNSMASQ_SOURCE) |
|---|
| 17 | |
|---|
| 18 | $(DNSMASQ_DIR)/.unpacked: $(DL_DIR)/$(DNSMASQ_SOURCE) |
|---|
| 19 | zcat $(DL_DIR)/$(DNSMASQ_SOURCE) | \ |
|---|
| 20 | tar $(TAR_VERBOSE) -C $(BUILD_DIR) -xf - |
|---|
| 21 | cat $(DNSMASQ_PATCH) | patch -p1 -d $(DNSMASQ_DIR) |
|---|
| 22 | touch $(DNSMASQ_DIR)/.unpacked |
|---|
| 23 | |
|---|
| 24 | $(DNSMASQ_DIR)/.configured: $(DNSMASQ_DIR)/.unpacked |
|---|
| 25 | $(SED) "s/define HAVE_IPV6/undef HAVE_IPV6/" $(DNSMASQ_DIR)/config.h |
|---|
| 26 | # $(SED) "s/define INET6_ADDRSTRLEN/undef INET6_ADDRSTRLEN/" $(DNSMASQ_DIR)/config.h |
|---|
| 27 | $(SED) "s/define HAVE_LINUX_IPV6_PROC/undef HAVE_LINUX_IPV6_PROC/" $(DNSMASQ_DIR)/config.h |
|---|
| 28 | touch $(DNSMASQ_DIR)/.configured |
|---|
| 29 | |
|---|
| 30 | $(DNSMASQ_DIR)/dnsmasq: $(DNSMASQ_DIR)/.configured |
|---|
| 31 | $(MAKE) -C $(DNSMASQ_DIR) \ |
|---|
| 32 | CC="$(TARGET_CC)" \ |
|---|
| 33 | CFLAGS="$(TARGET_CFLAGS)" \ |
|---|
| 34 | BINDIR=/usr/sbin |
|---|
| 35 | |
|---|
| 36 | $(ADD_MASTER)/sbin/dnsmasq: $(DNSMASQ_DIR)/dnsmasq |
|---|
| 37 | cp -a $(DNSMASQ_DIR)/dnsmasq $(ADD_MASTER)/sbin/dnsmasq |
|---|
| 38 | -$(SSTRIP) $(ADD_MASTER)/sbin/dnsmasq |
|---|
| 39 | |
|---|
| 40 | dnsmasq: $(ADD_MASTER)/sbin/dnsmasq |
|---|
| 41 | |
|---|
| 42 | dnsmasq-clean: |
|---|
| 43 | -$(MAKE) -C $(DNSMASQ_DIR) clean |
|---|
| 44 | |
|---|
| 45 | dnsmasq-dirclean: |
|---|
| 46 | $(RM) -r $(DNSMASQ_DIR) |
|---|
| 47 | $(RM) $(ADD_MASTER)/sbin/dnsmasq |
|---|
| 48 | |
|---|