blob: c1995a0a619029c42056eb6fae44ca38330b4187 (
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
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
|
#############################################################
#
# dnsmasq
#
#############################################################
DNSMASQ_VERSION = 2.60
DNSMASQ_SITE = http://thekelleys.org.uk/dnsmasq
DNSMASQ_MAKE_ENV = CC="$(TARGET_CC)"
DNSMASQ_MAKE_OPT = COPTS="$(DNSMASQ_COPTS)" PREFIX=/usr CFLAGS="$(TARGET_CFLAGS)"
DNSMASQ_MAKE_OPT += DESTDIR=$(TARGET_DIR) LDFLAGS="$(TARGET_LDFLAGS)"
ifneq ($(BR2_INET_IPV6),y)
DNSMASQ_COPTS += -DNO_IPV6
endif
ifneq ($(BR2_PACKAGE_DNSMASQ_DHCP),y)
DNSMASQ_COPTS += -DNO_DHCP
endif
ifneq ($(BR2_PACKAGE_DNSMASQ_TFTP),y)
DNSMASQ_COPTS += -DNO_TFTP
endif
ifeq ($(BR2_PACKAGE_DNSMASQ_IDN),y)
DNSMASQ_MAKE_OPT += all-i18n
DNSMASQ_DEPENDENCIES += libidn libintl
DNSMASQ_MAKE_OPT += LDFLAGS+="-lintl -lidn"
endif
ifeq ($(BR2_PACKAGE_DNSMASQ_LUA),y)
DNSMASQ_DEPENDENCIES += lua
DNSMASQ_MAKE_OPT += LDFLAGS+="-ldl"
endif
ifeq ($(BR2_PACKAGE_DNSMASQ_LUA),y)
define DNSMASQ_ENABLE_LUA
$(SED) 's/lua5.1/lua/g' $(DNSMASQ_DIR)/Makefile
$(SED) 's^.*#define HAVE_LUASCRIPT.*^#define HAVE_LUASCRIPT^' \
$(DNSMASQ_DIR)/src/config.h
endef
endif
ifneq ($(BR2_LARGEFILE),y)
DNSMASQ_COPTS += -DNO_LARGEFILE
endif
ifeq ($(BR2_PACKAGE_DBUS),y)
DNSMASQ_DEPENDENCIES += host-pkg-config dbus
endif
define DNSMASQ_FIX_PKGCONFIG
$(SED) 's^PKG_CONFIG = pkg-config^PKG_CONFIG = $(PKG_CONFIG_HOST_BINARY)^' \
$(DNSMASQ_DIR)/Makefile
endef
ifeq ($(BR2_PACKAGE_DBUS),y)
define DNSMASQ_ENABLE_DBUS
$(SED) 's^.*#define HAVE_DBUS.*^#define HAVE_DBUS^' \
$(DNSMASQ_DIR)/src/config.h
endef
else
define DNSMASQ_ENABLE_DBUS
$(SED) 's^.*#define HAVE_DBUS.*^/* #define HAVE_DBUS */^' \
$(DNSMASQ_DIR)/src/config.h
endef
endif
define DNSMASQ_BUILD_CMDS
$(DNSMASQ_FIX_PKGCONFIG)
$(DNSMASQ_ENABLE_DBUS)
$(DNSMASQ_ENABLE_LUA)
$(DNSMASQ_MAKE_ENV) $(MAKE) -C $(@D) $(DNSMASQ_MAKE_OPT)
endef
define DNSMASQ_INSTALL_TARGET_CMDS
$(DNSMASQ_MAKE_ENV) $(MAKE) -C $(@D) $(DNSMASQ_MAKE_OPT) install
mkdir -p $(TARGET_DIR)/var/lib/misc/
endef
define DNSMASQ_UNINSTALL_TARGET_CMDS
rm -f $(TARGET_DIR)/usr/sbin/dnsmasq
rm -f $(TARGET_DIR)/usr/share/man/man8/dnsmasq.8
endef
$(eval $(call GENTARGETS))
|