2020-11-14 22:40:16 +00:00
|
|
|
ATMOSPHERE_BUILD_CONFIGS :=
|
|
|
|
all: release
|
2020-05-05 07:33:16 +01:00
|
|
|
|
2020-11-14 22:40:16 +00:00
|
|
|
define ATMOSPHERE_ADD_TARGET
|
2020-05-05 07:33:16 +01:00
|
|
|
|
2020-11-14 22:40:16 +00:00
|
|
|
ATMOSPHERE_BUILD_CONFIGS += $(strip $1)
|
2020-05-05 07:33:16 +01:00
|
|
|
|
2020-11-14 22:40:16 +00:00
|
|
|
$(strip $1): exosphere$(strip $2).bin warmboot/warmboot$(strip $2).bin
|
|
|
|
@cp warmboot/warmboot$(strip $2).bin warmboot$(strip $2).bin
|
2020-05-05 07:33:16 +01:00
|
|
|
|
2020-11-14 22:40:16 +00:00
|
|
|
exosphere$(strip $2).bin: loader_stub/loader_stub$(strip $2).bin
|
|
|
|
@cp loader_stub/loader_stub$(strip $2).bin exosphere$(strip $2).bin
|
|
|
|
@printf LENY >> exosphere$(strip $2).bin
|
|
|
|
@echo "Built exosphere$(strip $2).bin..."
|
2020-05-05 07:33:16 +01:00
|
|
|
|
2020-11-14 22:40:16 +00:00
|
|
|
warmboot/warmboot$(strip $2).bin:
|
|
|
|
@$$(MAKE) -C warmboot $(strip $1)
|
2020-05-05 07:33:16 +01:00
|
|
|
|
2020-11-14 22:40:16 +00:00
|
|
|
loader_stub/loader_stub$(strip $2).bin:
|
|
|
|
@$$(MAKE) -C loader_stub $(strip $1)
|
2020-06-12 08:46:21 +01:00
|
|
|
|
2020-11-14 22:40:16 +00:00
|
|
|
clean-$(strip $1): clean-program-$(strip $1) clean-loader_stub-$(strip $1) clean-warmboot-$(strip $1)
|
|
|
|
@rm -rf exosphere$(strip $2).bin warmboot$(strip $2).bin
|
2020-05-05 07:33:16 +01:00
|
|
|
|
2020-11-14 22:40:16 +00:00
|
|
|
clean-program-$(strip $1):
|
|
|
|
@$$(MAKE) -C program clean-$(strip $1)
|
2020-06-12 14:16:58 +01:00
|
|
|
|
2020-11-14 22:40:16 +00:00
|
|
|
clean-loader_stub-$(strip $1):
|
|
|
|
@$$(MAKE) -C loader_stub clean-$(strip $1)
|
2020-05-05 07:33:16 +01:00
|
|
|
|
2020-11-14 22:40:16 +00:00
|
|
|
clean-warmboot-$(strip $1):
|
|
|
|
@$$(MAKE) -C warmboot clean-$(strip $1)
|
2020-05-05 07:33:16 +01:00
|
|
|
|
2020-11-14 22:40:16 +00:00
|
|
|
endef
|
2020-05-05 07:33:16 +01:00
|
|
|
|
2020-11-14 22:40:16 +00:00
|
|
|
$(eval $(call ATMOSPHERE_ADD_TARGET, release, ))
|
|
|
|
$(eval $(call ATMOSPHERE_ADD_TARGET, debug, _debug))
|
|
|
|
$(eval $(call ATMOSPHERE_ADD_TARGET, audit, _audit))
|
2020-06-11 09:48:36 +01:00
|
|
|
|
2020-11-14 22:40:16 +00:00
|
|
|
clean: clean-program clean-loader_stub clean-warmboot
|
|
|
|
@rm -rf exosphere*.bin warmboot*.bin
|
2020-05-05 07:33:16 +01:00
|
|
|
|
2020-11-14 22:40:16 +00:00
|
|
|
clean-program:
|
|
|
|
@$(MAKE) -C program clean
|
|
|
|
|
|
|
|
clean-loader_stub:
|
|
|
|
@$(MAKE) -C loader_stub clean
|
|
|
|
|
|
|
|
clean-warmboot:
|
|
|
|
@$(MAKE) -C warmboot clean
|
|
|
|
|
|
|
|
.PHONY: all clean clean-program clean-loader_stub clean-warmboot $(foreach config,$(ATMOSPHERE_BUILD_CONFIGS),clean-$(config) clean-program-$(config) clean-loader_stub-$(config) clean-warmboot-$(config))
|