2003-01-18 22:27:22 +01:00
|
|
|
#############################################################
|
|
|
|
#
|
|
|
|
# ntp
|
|
|
|
#
|
|
|
|
#############################################################
|
2007-06-27 11:18:58 +02:00
|
|
|
NTP_VERSION:=4.2.4p2
|
2004-12-24 07:25:25 +01:00
|
|
|
NTP_SOURCE:=ntp-$(NTP_VERSION).tar.gz
|
2006-04-29 15:15:17 +02:00
|
|
|
NTP_SITE:=http://www.eecis.udel.edu/~ntp/ntp_spool/ntp4/ntp-4.2
|
2004-12-24 07:25:25 +01:00
|
|
|
NTP_DIR:=$(BUILD_DIR)/ntp-$(NTP_VERSION)
|
2006-10-01 17:17:52 +02:00
|
|
|
NTP_CAT:=$(ZCAT)
|
2003-01-18 22:27:22 +01:00
|
|
|
NTP_BINARY:=ntpdate/ntpdate
|
2004-04-16 16:32:59 +02:00
|
|
|
NTP_TARGET_BINARY:=usr/bin/ntpdate
|
2003-01-18 22:27:22 +01:00
|
|
|
|
|
|
|
$(DL_DIR)/$(NTP_SOURCE):
|
2004-12-24 07:25:25 +01:00
|
|
|
$(WGET) -P $(DL_DIR) $(NTP_SITE)/$(NTP_SOURCE)
|
2003-01-18 22:27:22 +01:00
|
|
|
|
|
|
|
ntp-source: $(DL_DIR)/$(NTP_SOURCE)
|
|
|
|
|
2007-06-26 17:41:01 +02:00
|
|
|
$(NTP_DIR)/.patched: $(DL_DIR)/$(NTP_SOURCE)
|
2004-10-09 23:19:47 +02:00
|
|
|
$(NTP_CAT) $(DL_DIR)/$(NTP_SOURCE) | tar -C $(BUILD_DIR) $(TAR_OPTIONS) -
|
2005-09-08 02:51:14 +02:00
|
|
|
toolchain/patch-kernel.sh $(NTP_DIR) package/ntp/ ntp\*.patch
|
2003-11-19 18:17:56 +01:00
|
|
|
$(SED) "s,^#if.*__GLIBC__.*_BSD_SOURCE.*$$,#if 0," \
|
2007-08-21 21:20:18 +02:00
|
|
|
$(NTP_DIR)/ntpd/refclock_pcf.c
|
2007-06-26 17:41:01 +02:00
|
|
|
$(SED) '/[[:space:](]index[[:space:]]*(/s/[[:space:]]*index[[:space:]]*(/ strchr(/g' $(NTP_DIR)/libisc/*.c $(NTP_DIR)/arlib/sample.c
|
|
|
|
$(SED) '/[[:space:](]rindex[[:space:]]*(/s/[[:space:]]*rindex[[:space:]]*(/ strrchr(/g' $(NTP_DIR)/ntpd/*.c
|
|
|
|
#$(SED) 's/\(^#[[:space:]]*include[[:space:]]*<sys\/var.h>\)/\/\/ \1/' $(NTP_DIR)/util/tickadj.c
|
2007-07-28 18:41:44 +02:00
|
|
|
$(CONFIG_UPDATE) $(NTP_DIR)
|
|
|
|
$(CONFIG_UPDATE) $(NTP_DIR)/sntp
|
2007-06-26 17:41:01 +02:00
|
|
|
touch $@
|
2003-01-18 22:27:22 +01:00
|
|
|
|
2007-06-26 17:41:01 +02:00
|
|
|
$(NTP_DIR)/.configured: $(NTP_DIR)/.patched
|
2003-01-18 22:27:22 +01:00
|
|
|
(cd $(NTP_DIR); rm -rf config.cache; \
|
2003-03-04 20:16:19 +01:00
|
|
|
$(TARGET_CONFIGURE_OPTS) \
|
2007-06-27 14:01:27 +02:00
|
|
|
$(TARGET_CONFIGURE_ARGS) \
|
2005-09-08 02:51:14 +02:00
|
|
|
ac_cv_lib_md5_MD5Init=no \
|
2003-01-18 22:27:22 +01:00
|
|
|
./configure \
|
|
|
|
--target=$(GNU_TARGET_NAME) \
|
2003-03-04 20:16:19 +01:00
|
|
|
--host=$(GNU_TARGET_NAME) \
|
|
|
|
--build=$(GNU_HOST_NAME) \
|
2003-01-18 22:27:22 +01:00
|
|
|
--prefix=/usr \
|
|
|
|
--exec-prefix=/usr \
|
|
|
|
--bindir=/usr/bin \
|
|
|
|
--sbindir=/usr/sbin \
|
2007-01-14 04:52:21 +01:00
|
|
|
--libdir=/lib \
|
2003-01-18 22:27:22 +01:00
|
|
|
--libexecdir=/usr/lib \
|
|
|
|
--sysconfdir=/etc \
|
|
|
|
--datadir=/usr/share \
|
|
|
|
--localstatedir=/var \
|
|
|
|
--mandir=/usr/man \
|
|
|
|
--infodir=/usr/info \
|
2003-09-03 09:18:18 +02:00
|
|
|
$(DISABLE_NLS) \
|
2007-06-26 17:41:01 +02:00
|
|
|
$(DISABLE_IPV6) \
|
2003-01-18 22:27:22 +01:00
|
|
|
--with-shared \
|
2004-04-16 16:32:59 +02:00
|
|
|
--program-transform-name=s,,, \
|
2005-09-08 02:51:14 +02:00
|
|
|
--without-crypto \
|
2007-06-27 11:18:58 +02:00
|
|
|
--disable-tickadj \
|
2007-08-21 21:20:18 +02:00
|
|
|
)
|
2007-06-26 17:41:01 +02:00
|
|
|
touch $@
|
2003-01-18 22:27:22 +01:00
|
|
|
|
|
|
|
$(NTP_DIR)/$(NTP_BINARY): $(NTP_DIR)/.configured
|
2005-09-08 02:51:14 +02:00
|
|
|
$(MAKE) -C $(NTP_DIR)
|
2003-01-18 22:27:22 +01:00
|
|
|
|
|
|
|
$(TARGET_DIR)/$(NTP_TARGET_BINARY): $(NTP_DIR)/$(NTP_BINARY)
|
2004-12-24 07:25:25 +01:00
|
|
|
install -m 755 $(NTP_DIR)/ntpd/ntpd $(TARGET_DIR)/usr/sbin/ntpd
|
2004-04-16 16:32:59 +02:00
|
|
|
install -m 755 $(NTP_DIR)/$(NTP_BINARY) $(TARGET_DIR)/$(NTP_TARGET_BINARY)
|
2007-06-26 17:41:01 +02:00
|
|
|
ifeq ($(BR2_PACKAGE_NTP_SNTP),y)
|
|
|
|
install -m 755 $(NTP_DIR)/sntp/sntp $(TARGET_DIR)/usr/bin/sntp
|
|
|
|
endif
|
2007-06-25 20:27:58 +02:00
|
|
|
install -m 755 package/ntp/ntp.sysvinit $(TARGET_DIR)/etc/init.d/S49ntp
|
2003-01-18 22:27:22 +01:00
|
|
|
|
|
|
|
ntp: uclibc $(TARGET_DIR)/$(NTP_TARGET_BINARY)
|
|
|
|
|
|
|
|
ntp-clean:
|
2007-06-26 17:41:01 +02:00
|
|
|
rm -f $(TARGET_DIR)/usr/sbin/ntpd $(TARGET_DIR)/usr/bin/sntp \
|
|
|
|
$(TARGET_DIR)/etc/init.d/S49ntp \
|
|
|
|
$(TARGET_DIR)/$(NTP_TARGET_BINARY)
|
2007-08-22 14:35:41 +02:00
|
|
|
-$(MAKE) -C $(NTP_DIR) clean
|
2003-01-18 22:27:22 +01:00
|
|
|
|
|
|
|
ntp-dirclean:
|
|
|
|
rm -rf $(NTP_DIR)
|
|
|
|
|
2005-02-10 04:06:39 +01:00
|
|
|
#############################################################
|
|
|
|
#
|
|
|
|
# Toplevel Makefile options
|
|
|
|
#
|
|
|
|
#############################################################
|
|
|
|
ifeq ($(strip $(BR2_PACKAGE_NTP)),y)
|
|
|
|
TARGETS+=ntp
|
|
|
|
endif
|