1 #############################################################
5 #############################################################
7 TFTP_HPA_SOURCE
:=tftp-hpa-
$(TFTP_HPA_VER
).
tar.bz2
8 TFTP_HPA_SITE
:=http
://www.kernel.org
/pub
/software
/network
/tftp
/
9 TFTP_HPA_DIR
:=$(BUILD_DIR
)/tftp-hpa-
$(TFTP_HPA_VER
)
11 TFTP_HPA_BINARY
:=tftpd
/tftpd
12 TFTP_HPA_TARGET_BINARY
:=usr
/sbin
/in.tftpd
14 $(DL_DIR
)/$(TFTP_HPA_SOURCE
):
15 $(WGET
) -P
$(DL_DIR
) $(TFTP_HPA_SITE
)/$(TFTP_HPA_SOURCE
)
17 tftpd-source
: $(DL_DIR
)/$(TFTP_HPA_SOURCE
)
19 $(TFTP_HPA_DIR
)/.unpacked
: $(DL_DIR
)/$(TFTP_HPA_SOURCE
)
20 $(TFTP_HPA_CAT
) $(DL_DIR
)/$(TFTP_HPA_SOURCE
) |
tar -C
$(BUILD_DIR
) $(TAR_OPTIONS
) -
21 toolchain
/patch-kernel.sh
$(TFTP_HPA_DIR
) package
/tftpd
/ tftpd\
*.patch
22 touch
$(TFTP_HPA_DIR
)/.unpacked
24 $(TFTP_HPA_DIR
)/.configured
: $(TFTP_HPA_DIR
)/.unpacked
25 (cd
$(TFTP_HPA_DIR
); rm -rf config.cache
; \
26 $(TARGET_CONFIGURE_OPTS
) \
27 CFLAGS
="$(TARGET_CFLAGS)" \
29 --target
=$(GNU_TARGET_NAME
) \
30 --host
=$(GNU_TARGET_NAME
) \
31 --build
=$(GNU_HOST_NAME
) \
36 --libexecdir
=/usr
/lib \
38 --datadir=/usr
/share \
39 --localstatedir
=/var \
42 $(DISABLE_LARGEFILE
) \
43 --without-tcpwrappers \
45 touch
$(TFTP_HPA_DIR
)/.configured
47 $(TFTP_HPA_DIR
)/$(TFTP_HPA_BINARY
): $(TFTP_HPA_DIR
)/.configured
48 $(MAKE
) -C
$(TFTP_HPA_DIR
)
50 # This stuff is needed to work around GNU make deficiencies
51 $(TARGET_DIR
)/$(TFTP_HPA_TARGET_BINARY
): $(TFTP_HPA_DIR
)/$(TFTP_HPA_BINARY
)
52 @if
[ -L
$(TARGET_DIR
)/$(TFTP_HPA_TARGET_BINARY
) ] ; then \
53 rm -f
$(TARGET_DIR
)/$(TFTP_HPA_TARGET_BINARY
); fi
;
54 @if
[ ! -f
$(TFTP_HPA_DIR
)/$(TFTP_HPA_BINARY
) -o
$(TARGET_DIR
)/$(TFTP_HPA_TARGET_BINARY
) \
55 -ot
$(TFTP_HPA_DIR
)/$(TFTP_HPA_BINARY
) ] ; then \
57 rm -f
$(TARGET_DIR
)/$(TFTP_HPA_TARGET_BINARY
); \
58 cp
-a
$(TFTP_HPA_DIR
)/$(TFTP_HPA_BINARY
) $(TARGET_DIR
)/$(TFTP_HPA_TARGET_BINARY
); fi
;
59 -mkdir
$(TARGET_DIR
)/var
/lib
/tftpboot
60 $(INSTALL
) -D
-m
0755 package
/tftpd
/init-tftpd
$(TARGET_DIR
)/etc
/init.d
/S80tftpd-hpa
62 tftpd
: uclibc
$(TARGET_DIR
)/$(TFTP_HPA_TARGET_BINARY
)
65 $(MAKE
) DESTDIR
=$(TARGET_DIR
) -C
$(TFTP_HPA_DIR
) uninstall
66 -$(MAKE
) -C
$(TFTP_HPA_DIR
) clean
69 rm -rf
$(TFTP_HPA_DIR
)
71 #############################################################
73 # Toplevel Makefile options
75 #############################################################
76 ifeq ($(strip $(BR2_PACKAGE_TFTPD
)),y
)