2004-04-04 04:33:03 +02:00
|
|
|
#############################################################
|
|
|
|
#
|
|
|
|
# dnsmasq
|
|
|
|
#
|
|
|
|
#############################################################
|
|
|
|
|
2012-05-04 05:16:47 +02:00
|
|
|
DNSMASQ_VERSION = 2.61
|
2009-09-01 23:02:06 +02:00
|
|
|
DNSMASQ_SITE = http://thekelleys.org.uk/dnsmasq
|
2012-03-13 14:20:15 +01:00
|
|
|
DNSMASQ_MAKE_ENV = CC="$(TARGET_CC)"
|
2010-04-01 17:44:28 +02:00
|
|
|
DNSMASQ_MAKE_OPT = COPTS="$(DNSMASQ_COPTS)" PREFIX=/usr CFLAGS="$(TARGET_CFLAGS)"
|
2012-03-13 14:20:15 +01:00
|
|
|
DNSMASQ_MAKE_OPT += DESTDIR=$(TARGET_DIR) LDFLAGS="$(TARGET_LDFLAGS)"
|
2007-09-10 11:04:03 +02:00
|
|
|
|
2008-03-02 15:36:40 +01:00
|
|
|
ifneq ($(BR2_INET_IPV6),y)
|
2010-06-24 14:11:06 +02:00
|
|
|
DNSMASQ_COPTS += -DNO_IPV6
|
2009-09-01 23:02:06 +02:00
|
|
|
endif
|
|
|
|
|
|
|
|
ifneq ($(BR2_PACKAGE_DNSMASQ_DHCP),y)
|
2010-06-24 14:11:06 +02:00
|
|
|
DNSMASQ_COPTS += -DNO_DHCP
|
2008-03-02 15:36:40 +01:00
|
|
|
endif
|
|
|
|
|
|
|
|
ifneq ($(BR2_PACKAGE_DNSMASQ_TFTP),y)
|
2010-06-24 14:11:06 +02:00
|
|
|
DNSMASQ_COPTS += -DNO_TFTP
|
2004-04-04 04:33:03 +02:00
|
|
|
endif
|
|
|
|
|
2012-05-04 05:16:47 +02:00
|
|
|
# NLS requires IDN so only enable it (i18n) when IDN is true
|
2009-11-13 16:12:09 +01:00
|
|
|
ifeq ($(BR2_PACKAGE_DNSMASQ_IDN),y)
|
2012-05-04 05:16:47 +02:00
|
|
|
DNSMASQ_DEPENDENCIES += libidn $(if $(BR2_NEEDS_GETTEXT_IF_LOCALE),gettext libintl)
|
|
|
|
DNSMASQ_MAKE_OPT += LDFLAGS+="-lidn $(if $(BR2_NEEDS_GETTEXT_IF_LOCALE),-lintl)"
|
|
|
|
DNSMASQ_COPTS += -DHAVE_IDN
|
|
|
|
DNSMASQ_I18N = $(if $(BR2_ENABLE_LOCALE),-i18n)
|
|
|
|
endif
|
|
|
|
|
|
|
|
ifeq ($(BR2_PACKAGE_DNSMASQ_CONNTRACK),y)
|
|
|
|
DNSMASQ_DEPENDENCIES += host-pkg-config libnetfilter_conntrack
|
|
|
|
endif
|
|
|
|
|
|
|
|
ifeq ($(BR2_PACKAGE_DNSMASQ_CONNTRACK),y)
|
|
|
|
define DNSMASQ_ENABLE_CONNTRACK
|
|
|
|
$(SED) 's^.*#define HAVE_CONNTRACK.*^#define HAVE_CONNTRACK^' \
|
|
|
|
$(DNSMASQ_DIR)/src/config.h
|
|
|
|
endef
|
2012-03-13 14:20:15 +01:00
|
|
|
endif
|
|
|
|
|
|
|
|
ifeq ($(BR2_PACKAGE_DNSMASQ_LUA),y)
|
2012-05-15 22:57:32 +02:00
|
|
|
DNSMASQ_DEPENDENCIES += lua host-pkg-config
|
2012-03-13 14:20:15 +01:00
|
|
|
DNSMASQ_MAKE_OPT += LDFLAGS+="-ldl"
|
|
|
|
|
|
|
|
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
|
2009-11-13 16:12:09 +01:00
|
|
|
endif
|
|
|
|
|
2008-08-08 20:15:29 +02:00
|
|
|
ifneq ($(BR2_LARGEFILE),y)
|
2010-06-24 14:11:06 +02:00
|
|
|
DNSMASQ_COPTS += -DNO_LARGEFILE
|
2008-08-08 20:15:29 +02:00
|
|
|
endif
|
|
|
|
|
2008-12-08 09:15:27 +01:00
|
|
|
ifeq ($(BR2_PACKAGE_DBUS),y)
|
2010-06-24 14:11:06 +02:00
|
|
|
DNSMASQ_DEPENDENCIES += host-pkg-config dbus
|
2008-03-02 15:36:43 +01:00
|
|
|
endif
|
|
|
|
|
2012-03-13 14:20:15 +01:00
|
|
|
define DNSMASQ_FIX_PKGCONFIG
|
|
|
|
$(SED) 's^PKG_CONFIG = pkg-config^PKG_CONFIG = $(PKG_CONFIG_HOST_BINARY)^' \
|
|
|
|
$(DNSMASQ_DIR)/Makefile
|
|
|
|
endef
|
|
|
|
|
2008-12-08 09:15:27 +01:00
|
|
|
ifeq ($(BR2_PACKAGE_DBUS),y)
|
2010-06-24 14:11:06 +02:00
|
|
|
define DNSMASQ_ENABLE_DBUS
|
2008-03-02 15:36:43 +01:00
|
|
|
$(SED) 's^.*#define HAVE_DBUS.*^#define HAVE_DBUS^' \
|
|
|
|
$(DNSMASQ_DIR)/src/config.h
|
2010-06-24 14:11:06 +02:00
|
|
|
endef
|
2008-03-02 15:36:43 +01:00
|
|
|
else
|
2010-06-24 14:11:06 +02:00
|
|
|
define DNSMASQ_ENABLE_DBUS
|
2008-03-02 15:36:43 +01:00
|
|
|
$(SED) 's^.*#define HAVE_DBUS.*^/* #define HAVE_DBUS */^' \
|
|
|
|
$(DNSMASQ_DIR)/src/config.h
|
2010-06-24 14:11:06 +02:00
|
|
|
endef
|
2008-03-02 15:36:43 +01:00
|
|
|
endif
|
2004-04-04 04:33:03 +02:00
|
|
|
|
2010-06-24 14:11:06 +02:00
|
|
|
define DNSMASQ_BUILD_CMDS
|
2012-03-13 14:20:15 +01:00
|
|
|
$(DNSMASQ_FIX_PKGCONFIG)
|
2010-06-24 14:11:06 +02:00
|
|
|
$(DNSMASQ_ENABLE_DBUS)
|
2012-03-13 14:20:15 +01:00
|
|
|
$(DNSMASQ_ENABLE_LUA)
|
2012-05-04 05:16:47 +02:00
|
|
|
$(DNSMASQ_ENABLE_CONNTRACK)
|
|
|
|
$(DNSMASQ_MAKE_ENV) $(MAKE) -C $(@D) $(DNSMASQ_MAKE_OPT) all$(DNSMASQ_I18N)
|
2010-06-24 14:11:06 +02:00
|
|
|
endef
|
|
|
|
|
|
|
|
define DNSMASQ_INSTALL_TARGET_CMDS
|
2012-05-04 05:16:47 +02:00
|
|
|
$(DNSMASQ_MAKE_ENV) $(MAKE) -C $(@D) $(DNSMASQ_MAKE_OPT) install$(DNSMASQ_I18N)
|
2011-12-02 11:49:11 +01:00
|
|
|
mkdir -p $(TARGET_DIR)/var/lib/misc/
|
2010-06-24 14:11:06 +02:00
|
|
|
endef
|
|
|
|
|
|
|
|
define DNSMASQ_UNINSTALL_TARGET_CMDS
|
2009-09-01 23:02:06 +02:00
|
|
|
rm -f $(TARGET_DIR)/usr/sbin/dnsmasq
|
|
|
|
rm -f $(TARGET_DIR)/usr/share/man/man8/dnsmasq.8
|
2010-06-24 14:11:06 +02:00
|
|
|
endef
|
|
|
|
|
2011-09-29 21:57:42 +02:00
|
|
|
$(eval $(call GENTARGETS))
|