1 #############################################################
5 #############################################################
6 NETKITTELNET_SOURCE
:=netkit-telnet-0.17.
tar.gz
7 NETKITTELNET_SITE
:=ftp
://ftp.uk.linux.org
/pub
/linux
/Networking
/netkit
/
8 NETKITTELNET_DIR
:=$(BUILD_DIR
)/netkit-telnet-0.17
10 NETKITTELNET_BINARY
:=telnetd
/telnetd
11 NETKITTELNET_TARGET_BINARY
:=usr
/sbin
/telnetd
13 $(DL_DIR
)/$(NETKITTELNET_SOURCE
):
14 $(WGET
) -P
$(DL_DIR
) $(NETKITTELNET_SITE
)/$(NETKITTELNET_SOURCE
)
16 netkittelnet-source
: $(DL_DIR
)/$(NETKITTELNET_SOURCE
)
18 $(NETKITTELNET_DIR
)/.unpacked
: $(DL_DIR
)/$(NETKITTELNET_SOURCE
)
19 $(NETKITTELNET_CAT
) $(DL_DIR
)/$(NETKITTELNET_SOURCE
) |
tar -C
$(BUILD_DIR
) $(TAR_OPTIONS
) -
21 $(SED
) "s/main()/main(void)/;" $(NETKITTELNET_DIR
)/configure
22 # Disable termcap support
23 $(SED
) "s~\(.*termcap\.h.*\)~/* \1 */~;" $(NETKITTELNET_DIR
)/telnetd
/telnetd.c
24 # don't try to run cross compiled binaries while configuring things
25 toolchain
/patch-kernel.sh
$(NETKITTELNET_DIR
) package
/netkittelnet
/ netkittelnet\
*.patch
26 touch
$(NETKITTELNET_DIR
)/.unpacked
28 $(NETKITTELNET_DIR
)/.configured
: $(NETKITTELNET_DIR
)/.unpacked
29 (cd
$(NETKITTELNET_DIR
); PATH
=$(TARGET_PATH
) CC
=$(TARGET_CC
) CFLAGS
="$(TARGET_CFLAGS)" \
30 .
/configure
--installroot
=$(TARGET_DIR
) --with-c-compiler
=$(TARGET_CC
) \
32 touch
$(NETKITTELNET_DIR
)/.configured
34 $(NETKITTELNET_DIR
)/$(NETKITTELNET_BINARY
): $(NETKITTELNET_DIR
)/.configured
35 $(MAKE
) SUB
=telnetd CC
=$(TARGET_CC
) CFLAGS
="$(TARGET_CFLAGS)" -C
$(NETKITTELNET_DIR
)
36 $(STRIP
) $(NETKITTELNET_DIR
)/$(NETKITTELNET_BINARY
)
38 $(TARGET_DIR
)/$(NETKITTELNET_TARGET_BINARY
): $(NETKITTELNET_DIR
)/$(NETKITTELNET_BINARY
)
39 # Only install a few selected items...
40 mkdir
-p
$(TARGET_DIR
)/usr
/sbin
41 rm -f
$(TARGET_DIR
)/$(NETKITTELNET_TARGET_BINARY
)
42 cp
$(NETKITTELNET_DIR
)/$(NETKITTELNET_BINARY
) $(TARGET_DIR
)/$(NETKITTELNET_TARGET_BINARY
)
43 # Enable telnet in inetd
44 $(SED
) "s~^#telnet.*~telnet\tstream\ttcp\tnowait\troot\t/usr/sbin/telnetd\t/usr/sbin/telnetd~;" $(TARGET_DIR
)/etc
/inetd.conf
45 #$(MAKE) DESTDIR=$(TARGET_DIR) CC=$(TARGET_CC) CFLAGS="$(TARGET_CFLAGS)" -C $(NETKITTELNET_DIR) install
46 #rm -rf $(TARGET_DIR)/share/locale $(TARGET_DIR)/usr/info \
47 # $(TARGET_DIR)/usr/man $(TARGET_DIR)/usr/share/doc
49 netkittelnet
: uclibc netkitbase
$(TARGET_DIR
)/$(NETKITTELNET_TARGET_BINARY
)
52 #$(MAKE) DESTDIR=$(TARGET_DIR) CC=$(TARGET_CC) -C $(NETKITTELNET_DIR) uninstall
53 -rm -f
$(TARGET_DIR
)/usr
/sbin
/telnetd
54 -$(MAKE
) -C
$(NETKITTELNET_DIR
) clean
56 netkittelnet-dirclean
:
57 rm -rf
$(NETKITTELNET_DIR
)
59 #############################################################
61 # Toplevel Makefile options
63 #############################################################
64 ifeq ($(strip $(BR2_PACKAGE_NETKITTELNET
)),y
)