meso: commit mostly-working build system

This commit is contained in:
Michael Scire
2020-10-27 12:59:40 -07:00
parent a8a90e6324
commit f92de24164
6 changed files with 120 additions and 55 deletions

View File

@@ -8,7 +8,7 @@ ATMOSPHERE_BUILD_CONFIGS += $(strip $1)
$(strip $1): mesosphere$(strip $2).bin
mesosphere$(strip $2).bin: kernel/kernel$(strip $2).bin kernel_ldr/kernel_ldr$(strip $2).bin
@python build_mesosphere.py kernel/kernel$(strip $2).bin kernel_ldr/kernel_ldr$(strip $2).bin mesosphere$(strip $2).bin
@python build_mesosphere.py kernel_ldr/kernel_ldr$(strip $2).bin kernel/kernel$(strip $2).bin mesosphere$(strip $2).bin
@echo "Built mesosphere$(strip $2).bin..."
kernel/kernel$(strip $2).bin: check_libmeso$(strip $1)
@@ -20,9 +20,10 @@ kernel_ldr/kernel_ldr$(strip $2).bin: check_libmeso$(strip $1)
check_libmeso$(strip $1):
@$$(MAKE) -C ../libraries/libmesosphere $(strip $1)
$(strip $1)-clean:
@$$(MAKE) -C kernel $(strip $1)-clean
@$$(MAKE) -C kernel_ldr $(strip $1)-clean
clean-$(strip $1):
@$$(MAKE) -C ../libraries/libmesosphere clean-$(strip $1)
@$$(MAKE) -C kernel clean-$(strip $1)
@$$(MAKE) -C kernel_ldr clean-$(strip $1)
@rm -f mesosphere$(strip $2).bin
endef
@@ -31,6 +32,10 @@ $(eval $(call ATMOSPHERE_ADD_TARGET, release, ,))
$(eval $(call ATMOSPHERE_ADD_TARGET, debug, _debug,))
$(eval $(call ATMOSPHERE_ADD_TARGET, audit, _audit,))
clean: $(foreach config,$(ATMOSPHERE_BUILD_CONFIGS),$(config)-clean)
clean:
@$(MAKE) -C ../libraries/libmesosphere clean
@$(MAKE) -C kernel clean
@$(MAKE) -C kernel_ldr clean
@rm -f mesosphere*.bin
.PHONY: all clean $(ATMOSPHERE_BUILD_CONFIGS) $(foreach config,$(ATMOSPHERE_BUILD_CONFIGS),$(target)-clean)
.PHONY: all clean $(foreach config,$(ATMOSPHERE_BUILD_CONFIGS),$(config) clean-$(config))