2020-10-27 20:55:19 +00:00
|
|
|
ATMOSPHERE_BUILD_CONFIGS :=
|
|
|
|
all: release
|
2019-12-17 22:36:42 +00:00
|
|
|
|
2020-10-27 20:55:19 +00:00
|
|
|
define ATMOSPHERE_ADD_TARGET
|
2019-12-17 22:36:42 +00:00
|
|
|
|
2020-10-27 20:55:19 +00:00
|
|
|
ATMOSPHERE_BUILD_CONFIGS += $(strip $1)
|
2019-12-17 22:36:42 +00:00
|
|
|
|
2020-10-27 20:55:19 +00:00
|
|
|
$(strip $1): mesosphere$(strip $2).bin
|
2019-12-17 22:36:42 +00:00
|
|
|
|
2020-10-27 20:55:19 +00:00
|
|
|
mesosphere$(strip $2).bin: kernel/kernel$(strip $2).bin kernel_ldr/kernel_ldr$(strip $2).bin
|
2021-10-21 04:53:42 +01:00
|
|
|
@python build_mesosphere.py kernel_ldr/kernel_ldr$(strip $2).bin kernel/kernel$(strip $2).bin mesosphere$(strip $2).bin $(4)
|
2020-10-27 20:55:19 +00:00
|
|
|
@echo "Built mesosphere$(strip $2).bin..."
|
2019-12-17 22:36:42 +00:00
|
|
|
|
2020-10-27 20:55:19 +00:00
|
|
|
kernel/kernel$(strip $2).bin: check_libmeso$(strip $1)
|
2021-10-21 04:53:42 +01:00
|
|
|
@$$(MAKE) -C kernel $(strip $1) $(3)
|
2020-01-29 13:37:14 +00:00
|
|
|
|
2020-10-27 20:55:19 +00:00
|
|
|
kernel_ldr/kernel_ldr$(strip $2).bin: check_libmeso$(strip $1)
|
2021-10-21 04:53:42 +01:00
|
|
|
@$$(MAKE) -C kernel_ldr $(strip $1) $(3)
|
2020-01-24 02:13:32 +00:00
|
|
|
|
2020-10-27 20:55:19 +00:00
|
|
|
check_libmeso$(strip $1):
|
2021-10-21 04:53:42 +01:00
|
|
|
@$$(MAKE) -C ../libraries/libmesosphere $(strip $1) $(3)
|
2020-01-24 02:13:32 +00:00
|
|
|
|
2020-10-27 20:55:19 +00:00
|
|
|
clean-$(strip $1):
|
2021-10-21 04:53:42 +01:00
|
|
|
@$$(MAKE) -C ../libraries/libmesosphere clean-$(strip $1) $(3)
|
|
|
|
@$$(MAKE) -C kernel clean-$(strip $1) $(3)
|
|
|
|
@$$(MAKE) -C kernel_ldr clean-$(strip $1) $(3)
|
2020-10-27 20:55:19 +00:00
|
|
|
@rm -f mesosphere$(strip $2).bin
|
|
|
|
|
|
|
|
endef
|
|
|
|
|
2021-10-21 04:53:42 +01:00
|
|
|
$(eval $(call ATMOSPHERE_ADD_TARGET, release, ,,))
|
|
|
|
$(eval $(call ATMOSPHERE_ADD_TARGET, debug, _debug,,))
|
|
|
|
$(eval $(call ATMOSPHERE_ADD_TARGET, audit, _audit,,))
|
|
|
|
|
|
|
|
$(eval $(call ATMOSPHERE_ADD_TARGET, qemu_virt_release, _qemu_virt, \
|
|
|
|
ATMOSPHERE_BOARD="qemu-virt" \
|
|
|
|
ATMOSPHERE_CPU="arm-cortex-a57" \
|
|
|
|
, ../tests/TestSvc/TestSvc.kip \
|
|
|
|
))
|
|
|
|
|
|
|
|
$(eval $(call ATMOSPHERE_ADD_TARGET, qemu_virt_debug, _qemu_virt_debug, \
|
|
|
|
ATMOSPHERE_BOARD="qemu-virt" \
|
|
|
|
ATMOSPHERE_CPU="arm-cortex-a57" \
|
|
|
|
, ../tests/TestSvc/TestSvc.kip \
|
|
|
|
))
|
|
|
|
|
|
|
|
$(eval $(call ATMOSPHERE_ADD_TARGET, qemu_virt_audit, _qemu_virt_audit, \
|
|
|
|
ATMOSPHERE_BOARD="qemu-virt" \
|
|
|
|
ATMOSPHERE_CPU="arm-cortex-a57" \
|
|
|
|
, ../tests/TestSvc/TestSvc.kip \
|
|
|
|
))
|
2020-10-27 20:55:19 +00:00
|
|
|
|
|
|
|
clean:
|
|
|
|
@$(MAKE) -C ../libraries/libmesosphere clean
|
|
|
|
@$(MAKE) -C kernel clean
|
|
|
|
@$(MAKE) -C kernel_ldr clean
|
|
|
|
@rm -f mesosphere*.bin
|
|
|
|
|
|
|
|
.PHONY: all clean $(foreach config,$(ATMOSPHERE_BUILD_CONFIGS),$(config) clean-$(config))
|