2004-04-04 04:33:03 +02:00
|
|
|
#############################################################
|
|
|
|
#
|
|
|
|
# dnsmasq
|
|
|
|
#
|
|
|
|
#############################################################
|
|
|
|
|
2010-06-24 14:11:06 +02:00
|
|
|
DNSMASQ_VERSION = 2.55
|
2009-09-01 23:02:06 +02:00
|
|
|
DNSMASQ_SITE = http://thekelleys.org.uk/dnsmasq
|
2010-04-01 17:44:28 +02:00
|
|
|
DNSMASQ_MAKE_ENV = CC="$(TARGET_CC)" LDFLAGS="$(TARGET_LDFLAGS)"
|
|
|
|
DNSMASQ_MAKE_OPT = COPTS="$(DNSMASQ_COPTS)" PREFIX=/usr CFLAGS="$(TARGET_CFLAGS)"
|
2010-06-24 14:11:06 +02:00
|
|
|
DNSMASQ_MAKE_OPT += DESTDIR=$(TARGET_DIR)
|
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
|
|
|
|
|
2009-11-13 16:12:09 +01:00
|
|
|
ifeq ($(BR2_PACKAGE_DNSMASQ_IDN),y)
|
2010-06-24 14:11:06 +02:00
|
|
|
DNSMASQ_MAKE_OPT += all-i18n
|
|
|
|
DNSMASQ_DEPENDENCIES += libidn libintl
|
|
|
|
DNSMASQ_MAKE_ENV += LDFLAGS+="-lintl"
|
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
|
|
|
|
|
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
|
2009-09-01 23:02:06 +02:00
|
|
|
$(SED) 's^PKG_CONFIG = pkg-config^PKG_CONFIG = $(PKG_CONFIG_HOST_BINARY)^' \
|
|
|
|
$(DNSMASQ_DIR)/Makefile
|
|
|
|
$(SED) 's^--cflags dbus-1^--cflags dbus-1 \| sed s\\\#-I/\\\#-I$(STAGING_DIR)/\\\#g^' \
|
|
|
|
$(DNSMASQ_DIR)/Makefile
|
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
|
|
|
|
$(DNSMASQ_ENABLE_DBUS)
|
|
|
|
$(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
|
|
|
|
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
|
|
|
|
|
|
|
|
$(eval $(call GENTARGETS,package,dnsmasq))
|