2003-01-18 22:27:22 +01:00
|
|
|
#############################################################
|
|
|
|
#
|
|
|
|
# ntp
|
|
|
|
#
|
|
|
|
#############################################################
|
2004-12-24 07:25:25 +01:00
|
|
|
NTP_VERSION:=4.2.0
|
|
|
|
NTP_SOURCE:=ntp-$(NTP_VERSION).tar.gz
|
2003-01-18 22:27:22 +01:00
|
|
|
NTP_SITE:=http://www.eecis.udel.edu/~ntp/ntp_spool/ntp4
|
2004-12-24 07:25:25 +01:00
|
|
|
NTP_DIR:=$(BUILD_DIR)/ntp-$(NTP_VERSION)
|
2003-06-23 08:47:34 +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)
|
|
|
|
|
|
|
|
$(NTP_DIR)/.unpacked: $(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," \
|
2003-01-18 22:27:22 +01:00
|
|
|
$(NTP_DIR)/ntpd/refclock_pcf.c;
|
|
|
|
touch $(NTP_DIR)/.unpacked
|
|
|
|
|
|
|
|
$(NTP_DIR)/.configured: $(NTP_DIR)/.unpacked
|
|
|
|
(cd $(NTP_DIR); rm -rf config.cache; \
|
2003-03-04 20:16:19 +01:00
|
|
|
$(TARGET_CONFIGURE_OPTS) \
|
2004-12-24 07:25:25 +01:00
|
|
|
CFLAGS="$(TARGET_CFLAGS)" \
|
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 \
|
|
|
|
--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) \
|
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 \
|
2003-01-18 22:27:22 +01:00
|
|
|
);
|
2004-12-24 07:25:25 +01:00
|
|
|
touch $(NTP_DIR)/.configured
|
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)
|
2003-01-18 22:27:22 +01:00
|
|
|
|
|
|
|
ntp: uclibc $(TARGET_DIR)/$(NTP_TARGET_BINARY)
|
|
|
|
|
|
|
|
ntp-clean:
|
2004-12-24 07:25:25 +01:00
|
|
|
rm -f $(TARGET_DIR)/usr/sbin/ntpd
|
|
|
|
rm -f $(TARGET_DIR)/$(NTP_TARGET_BINARY)
|
2003-01-18 22:27:22 +01:00
|
|
|
-$(MAKE) -C $(NTP_DIR) clean
|
|
|
|
|
|
|
|
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
|