Update nmap to latest version
[gumsense-br.git] / package / ntp / ntp.mk
blobaf69e7d26fbe27f798f26443f17f77f63e887dab
1 #############################################################
3 # ntp
5 #############################################################
6 NTP_VERSION:=4.2.0
7 NTP_SOURCE:=ntp-$(NTP_VERSION).tar.gz
8 NTP_SITE:=http://www.eecis.udel.edu/~ntp/ntp_spool/ntp4
9 NTP_DIR:=$(BUILD_DIR)/ntp-$(NTP_VERSION)
10 NTP_CAT:=zcat
11 NTP_BINARY:=ntpdate/ntpdate
12 NTP_TARGET_BINARY:=usr/bin/ntpdate
14 $(DL_DIR)/$(NTP_SOURCE):
15 $(WGET) -P $(DL_DIR) $(NTP_SITE)/$(NTP_SOURCE)
17 ntp-source: $(DL_DIR)/$(NTP_SOURCE)
19 $(NTP_DIR)/.unpacked: $(DL_DIR)/$(NTP_SOURCE)
20 $(NTP_CAT) $(DL_DIR)/$(NTP_SOURCE) | tar -C $(BUILD_DIR) $(TAR_OPTIONS) -
21 toolchain/patch-kernel.sh $(NTP_DIR) package/ntp/ ntp\*.patch
22 $(SED) "s,^#if.*__GLIBC__.*_BSD_SOURCE.*$$,#if 0," \
23 $(NTP_DIR)/ntpd/refclock_pcf.c;
24 touch $(NTP_DIR)/.unpacked
26 $(NTP_DIR)/.configured: $(NTP_DIR)/.unpacked
27 (cd $(NTP_DIR); rm -rf config.cache; \
28 $(TARGET_CONFIGURE_OPTS) \
29 CFLAGS="$(TARGET_CFLAGS)" \
30 ac_cv_lib_md5_MD5Init=no \
31 ./configure \
32 --target=$(GNU_TARGET_NAME) \
33 --host=$(GNU_TARGET_NAME) \
34 --build=$(GNU_HOST_NAME) \
35 --prefix=/usr \
36 --exec-prefix=/usr \
37 --bindir=/usr/bin \
38 --sbindir=/usr/sbin \
39 --libexecdir=/usr/lib \
40 --sysconfdir=/etc \
41 --datadir=/usr/share \
42 --localstatedir=/var \
43 --mandir=/usr/man \
44 --infodir=/usr/info \
45 $(DISABLE_NLS) \
46 --with-shared \
47 --program-transform-name=s,,, \
48 --without-crypto \
49 --disable-all-clocks \
50 --disable-parse-clocks \
51 --disable-debugging \
52 --disable-errorcache \
53 --enable-LOCAL-CLOCK \
54 --enable-NMEA \
56 touch $(NTP_DIR)/.configured
58 $(NTP_DIR)/$(NTP_BINARY): $(NTP_DIR)/.configured
59 $(MAKE) -C $(NTP_DIR)
61 $(TARGET_DIR)/$(NTP_TARGET_BINARY): $(NTP_DIR)/$(NTP_BINARY)
62 install -m 755 $(NTP_DIR)/ntpd/ntpd $(TARGET_DIR)/usr/sbin/ntpd
63 install -m 755 $(NTP_DIR)/$(NTP_BINARY) $(TARGET_DIR)/$(NTP_TARGET_BINARY)
65 ntp: uclibc $(TARGET_DIR)/$(NTP_TARGET_BINARY)
67 ntp-clean:
68 rm -f $(TARGET_DIR)/usr/sbin/ntpd
69 rm -f $(TARGET_DIR)/$(NTP_TARGET_BINARY)
70 -$(MAKE) -C $(NTP_DIR) clean
72 ntp-dirclean:
73 rm -rf $(NTP_DIR)
75 #############################################################
77 # Toplevel Makefile options
79 #############################################################
80 ifeq ($(strip $(BR2_PACKAGE_NTP)),y)
81 TARGETS+=ntp
82 endif