summaryrefslogtreecommitdiff
path: root/package/busybox/Makefile
blob: e8edcd12b21158f4fc35f25c2567f86b0002ff0d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
# $Id$
#-
# This file is part of the OpenADK project. OpenADK is copyrighted
# material, please see the LICENCE file in the top-level directory.

include $(TOPDIR)/rules.mk

PKG_NAME:=		busybox
PKG_VERSION:=		1.13.4
PKG_RELEASE:=		1
PKG_MD5SUM:=		6f86b4aa466f4b492c9468ba9500976a
MASTER_SITES:=		http://www.busybox.net/downloads/

include $(TOPDIR)/mk/package.mk

$(eval $(call PKG_template,BUSYBOX,$(PKG_NAME),$(PKG_VERSION)-$(PKG_RELEASE)))

#rebuild:
#	@rm $(WRKBUILD)/.configure_done

do-configure:
	grep BUSYBOX_ $(TOPDIR)/.config|sed -e 's/BUSYBOX_/CONFIG_/' > \
		${WRKBUILD}/.config
	$(SED) 's@IDIR@${WRKINST}' ${WRKBUILD}/.config
ifeq ($(ADK_NATIVE),y)
	yes '' | \
	$(MAKE) V=1 \
	    IPKG_ARCH="$(ARCH)" \
	    ARCH="$(ARCH)" -C $(WRKBUILD) oldconfig
else
	yes '' | \
	$(MAKE) V=1 CROSS_COMPILE="$(TARGET_CROSS)" \
	    EXTRA_CFLAGS="$(TARGET_CFLAGS)" IPKG_ARCH="$(ARCH)" \
	    ARCH="$(ARCH)" -C $(WRKBUILD) oldconfig
endif

do-build:
ifeq ($(ADK_NATIVE),y)
	$(MAKE) V=1 \
	    IPKG_ARCH="$(ARCH)" ARCH="$(ARCH)" -C $(WRKBUILD)
else
	$(MAKE) V=1 CROSS_COMPILE="$(TARGET_CROSS)" \
	    IPKG_ARCH="$(ARCH)" ARCH="$(ARCH)" -C $(WRKBUILD)
endif

do-install: ${TOPDIR}/.config
ifeq ($(ADK_NATIVE),y)
	$(MAKE) V=1 \
	    IPKG_ARCH="$(ARCH)" ARCH="$(ARCH)" -C $(WRKBUILD) install
else
	$(MAKE) V=1 CROSS_COMPILE="$(TARGET_CROSS)" \
	    IPKG_ARCH="$(ARCH)" ARCH="$(ARCH)" -C $(WRKBUILD) install
endif
ifeq ($(DEBUG),1)
	${INSTALL_BIN} $(WRKBUILD)/busybox_unstripped \
		$(IDIR_BUSYBOX)/bin/busybox
endif
	$(CP) $(WRKINST)/* $(IDIR_BUSYBOX)/
	$(INSTALL_DIR) $(IDIR_BUSYBOX)/etc/init.d/
	$(INSTALL_BIN) ./files/syslog.init \
		$(IDIR_BUSYBOX)/etc/init.d/syslog
	$(INSTALL_BIN) ./files/network.init \
		$(IDIR_BUSYBOX)/etc/init.d/network
	$(INSTALL_BIN) ./files/crond.init \
		$(IDIR_BUSYBOX)/etc/init.d/crond
	${INSTALL_BIN} files/inetd.init \
		${IDIR_BUSYBOX}/etc/init.d/inetd

include ${TOPDIR}/mk/pkg-bottom.mk