-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathbusybox.mak
39 lines (34 loc) · 1.16 KB
/
busybox.mak
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
NAME := busybox
BUSYBOX_VERSION := 1.35.0
BUSYBOX_URL := https://busybox.net/downloads/busybox-$(BUSYBOX_VERSION).tar.bz2
BUSYBOX_PROGRAMS := busybox
BUSYBOX_LIBRARIES :=
BUSYBOX_CONFIG =
$(eval $(call create_recipes, \
$(NAME), \
$(BUSYBOX_VERSION), \
$(BUSYBOX_URL), \
$(BUSYBOX_PROGRAMS), \
$(BUSYBOX_LIBRARIES), \
))
# The CONFIG_ options need to be passed to almost every make
# invocation unless we modify the config files directly.
BUSYBOX_DEFAULTS := CONFIG_PREFIX="$(SYSROOT)" CONFIG_STATIC="y"
BUSYBOX_DEFAULTS += CONFIG_INSTALL_APPLET_DONT="y"
BUSYBOX_DEFAULTS += CONFIG_INSTALL_APPLET_SYMLINKS="n"
# NOTE: the busybox makefile doesn't respect our exported toolchain
# variables (CC, LD, etc) so the build must use make's -e flag to
# force our environment variables to take precedence.
$(BUILD_FLAG):
$(eval $(call activate_toolchain,$@))
$(MAKE) -C "$(SRC)" clean
$(MAKE) -C "$(SRC)" defconfig
$(MAKE) -C "$(SRC)" -e \
$(BUSYBOX_DEFAULTS) \
$(BUSYBOX_CONFIG) \
CFLAGS="$(CFLAGS)" LDFLAGS="$(LDFLAGS)"
$(MAKE) -C "$(SRC)" -e install \
$(BUSYBOX_DEFAULTS) \
$(BUSYBOX_CONFIG)
ALL_PROGRAMS += $(BUSYBOX_PROGRAMS)
DEFAULT_PROGRAMS += $(BUSYBOX_PROGRAMS)