Skip to content

Commit dc6e5a3

Browse files
author
William Breathitt Gray
committed
makefile: Implement bootstrap-minimal target
The bootstrap-minimal target builds a bootstrap fbc with only the minimal features necessary to build another fbc.
1 parent 9d996f4 commit dc6e5a3

File tree

1 file changed

+12
-4
lines changed

1 file changed

+12
-4
lines changed

makefile

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -64,8 +64,9 @@
6464
# warning-tests
6565
# clean-tests
6666
#
67-
# bootstrap-dist Create source package with precompiled fbc sources
68-
# bootstrap Build fbc from the precompiled sources (only if precompiled sources exist)
67+
# bootstrap-dist Create source package with precompiled fbc sources
68+
# bootstrap Build fbc from the precompiled sources (only if precompiled sources exist)
69+
# bootstrap-minimal Build fbc from the precompiled sources (only if precompiled sources exist) with only the minimal features needed to compile another fbc
6970
#
7071
# makefile configuration:
7172
# FB[C|L]FLAGS to set -g -exx etc. for the compiler build and/or link
@@ -368,6 +369,11 @@ ALLFBCFLAGS += -e -m fbc -w pedantic
368369
ALLFBLFLAGS += -e -m fbc -w pedantic
369370
ALLCFLAGS += -Wall -Wextra -Wno-unused-parameter -Werror-implicit-function-declaration
370371

372+
ifneq ($(filter bootstrap-minimal, $(MAKECMDGOALS)),)
373+
# Disable features not needed to compile a minimal bootstrap fbc
374+
ALLCFLAGS += -DDISABLE_GPM -DDISABLE_FFI -DDISABLE_X11
375+
endif
376+
371377
ifeq ($(TARGET_OS),xbox)
372378
ifeq ($(OPENXDK),)
373379
$(error Please set OPENXDK=<OpenXDK directory>)
@@ -1061,9 +1067,11 @@ bootstrap-dist:
10611067
# Build the fbc[.exe] binary from the precompiled sources in the bootstrap/
10621068
# directory.
10631069
#
1070+
.PHONY: bootstrap bootstrap-minimal
1071+
bootstrap: gfxlib2 bootstrap-minimal
1072+
10641073
BOOTSTRAP_FBC := bootstrap/fbc$(EXEEXT)
1065-
.PHONY: bootstrap
1066-
bootstrap: gfxlib2 $(BOOTSTRAP_FBC)
1074+
bootstrap-minimal: $(BOOTSTRAP_FBC)
10671075
mkdir -p bin
10681076
cp $(BOOTSTRAP_FBC) $(FBC_EXE)
10691077

0 commit comments

Comments
 (0)