aboutsummaryrefslogtreecommitdiffstats
path: root/sub/busybox/Makefile
diff options
context:
space:
mode:
authorLaurent Bercot <ska-skaware@skarnet.org>2020-01-23 16:31:46 +0000
committerLaurent Bercot <ska-skaware@skarnet.org>2020-01-23 16:31:46 +0000
commitb6da3ac2d9d45831605d6d83c5fdc94987dc5393 (patch)
treea96af3567da5f6c8f70f8368b8ff82c6f725a415 /sub/busybox/Makefile
parent573817bc72b5f3273bcf2bca6e2d98e105c976b5 (diff)
downloadlh-bootstrap-b6da3ac2d9d45831605d6d83c5fdc94987dc5393.tar.gz
Allow for static and dynamic builds
Diffstat (limited to 'sub/busybox/Makefile')
-rw-r--r--sub/busybox/Makefile4
1 files changed, 4 insertions, 0 deletions
diff --git a/sub/busybox/Makefile b/sub/busybox/Makefile
index d516be0..8422f5e 100644
--- a/sub/busybox/Makefile
+++ b/sub/busybox/Makefile
@@ -25,7 +25,11 @@ $(OUTPUT)/build-host/.lh_bb_copied: $(OUTPUT)/sources/.lh_bb_dled | $(OUTPUT)/bu
exec setuidgid $(NORMALUSER) s6-touch $@
$(OUTPUT)/build-host/busybox-$(BUSYBOX_VERSION)/.config: $(OUTPUT)/build-host/.lh_bb_copied sub/busybox/host-full-config | $(OUTPUT)/build-build/.lh_skarnet_installed $(OUTPUT)/tmp/.lh_prepared
+ifeq ($(BUILD_HOST_STATIC),true)
+ exec setuidgid $(NORMALUSER) sed -e "s/# CONFIG_STATIC is not set/CONFIG_STATIC=y/" $(WD)/sub/busybox/host-full-config $@
+else
exec setuidgid $(NORMALUSER) cp -f $(WD)/sub/busybox/host-full-config $@
+endif
$(OUTPUT)/build-host/.lh_bb_built: $(OUTPUT)/build-host/busybox-$(BUSYBOX_VERSION)/.config | $(OUTPUT)/build-build/.lh_skarnet_installed
exec setuidgid $(NORMALUSER) cd $(OUTPUT)/build-host/busybox-$(BUSYBOX_VERSION) $(MAKE) -j1 busybox install CROSS_COMPILE=$(TRIPLE)- CC="$(BUILD_HOST_CC)" HOSTCC="$(BUILD_BUILD_CC)"