2018-10-17 02:41:06 +00:00
|
|
|
TOPTARGETS := all clean dist
|
2018-11-08 09:27:36 +00:00
|
|
|
AMSBRANCH := $(shell git symbolic-ref --short HEAD)
|
2019-02-25 04:22:38 +00:00
|
|
|
AMSHASH := $(shell git rev-parse --short HEAD)
|
|
|
|
AMSREV := $(AMSBRANCH)-$(AMSHASH)
|
2018-11-08 09:27:36 +00:00
|
|
|
|
2018-10-21 20:59:59 +00:00
|
|
|
ifneq (, $(strip $(shell git status --porcelain 2>/dev/null)))
|
|
|
|
AMSREV := $(AMSREV)-dirty
|
|
|
|
endif
|
2018-04-23 18:07:49 +00:00
|
|
|
|
2019-12-10 03:13:13 +00:00
|
|
|
COMPONENTS := fusee stratosphere exosphere thermosphere troposphere libraries
|
2019-01-25 17:33:35 +00:00
|
|
|
|
|
|
|
all: $(COMPONENTS)
|
2018-10-30 18:25:21 +00:00
|
|
|
|
|
|
|
thermosphere:
|
|
|
|
$(MAKE) -C thermosphere all
|
|
|
|
|
|
|
|
exosphere: thermosphere
|
|
|
|
$(MAKE) -C exosphere all
|
2018-04-23 18:07:49 +00:00
|
|
|
|
2019-12-10 03:13:13 +00:00
|
|
|
stratosphere: exosphere libraries
|
2018-10-30 18:25:21 +00:00
|
|
|
$(MAKE) -C stratosphere all
|
|
|
|
|
2019-01-24 17:05:06 +00:00
|
|
|
troposphere: stratosphere
|
|
|
|
$(MAKE) -C troposphere all
|
|
|
|
|
2019-02-20 21:50:18 +00:00
|
|
|
sept: exosphere
|
|
|
|
$(MAKE) -C sept all
|
|
|
|
|
|
|
|
fusee: exosphere stratosphere sept
|
2018-10-30 18:25:21 +00:00
|
|
|
$(MAKE) -C $@ all
|
2018-10-17 02:41:06 +00:00
|
|
|
|
2019-12-10 03:13:13 +00:00
|
|
|
libraries:
|
|
|
|
$(MAKE) -C libraries all
|
|
|
|
|
2018-05-18 22:54:38 +00:00
|
|
|
clean:
|
|
|
|
$(MAKE) -C fusee clean
|
2018-10-17 02:43:57 +00:00
|
|
|
rm -rf out
|
2019-01-25 17:33:35 +00:00
|
|
|
|
2018-10-30 18:25:21 +00:00
|
|
|
dist: all
|
2019-12-09 11:58:48 +00:00
|
|
|
$(eval MAJORVER = $(shell grep 'define ATMOSPHERE_RELEASE_VERSION_MAJOR\b' libraries/libvapours/include/vapours/ams/ams_api_version.h \
|
2018-10-17 02:41:06 +00:00
|
|
|
| tr -s [:blank:] \
|
|
|
|
| cut -d' ' -f3))
|
2019-12-09 11:58:48 +00:00
|
|
|
$(eval MINORVER = $(shell grep 'define ATMOSPHERE_RELEASE_VERSION_MINOR\b' libraries/libvapours/include/vapours/ams/ams_api_version.h \
|
2018-10-17 02:41:06 +00:00
|
|
|
| tr -s [:blank:] \
|
|
|
|
| cut -d' ' -f3))
|
2019-12-09 11:58:48 +00:00
|
|
|
$(eval MICROVER = $(shell grep 'define ATMOSPHERE_RELEASE_VERSION_MICRO\b' libraries/libvapours/include/vapours/ams/ams_api_version.h \
|
2018-10-17 02:41:06 +00:00
|
|
|
| tr -s [:blank:] \
|
|
|
|
| cut -d' ' -f3))
|
2018-10-21 20:59:59 +00:00
|
|
|
$(eval AMSVER = $(MAJORVER).$(MINORVER).$(MICROVER)-$(AMSREV))
|
2018-10-17 02:41:06 +00:00
|
|
|
rm -rf atmosphere-$(AMSVER)
|
2018-10-17 02:43:57 +00:00
|
|
|
rm -rf out
|
2018-10-17 02:41:06 +00:00
|
|
|
mkdir atmosphere-$(AMSVER)
|
|
|
|
mkdir atmosphere-$(AMSVER)/atmosphere
|
2019-02-20 21:42:05 +00:00
|
|
|
mkdir atmosphere-$(AMSVER)/sept
|
2019-01-24 17:05:06 +00:00
|
|
|
mkdir atmosphere-$(AMSVER)/switch
|
2019-10-28 04:43:01 +00:00
|
|
|
mkdir -p atmosphere-$(AMSVER)/atmosphere/contents/0100000000000008
|
|
|
|
mkdir -p atmosphere-$(AMSVER)/atmosphere/contents/010000000000000D
|
|
|
|
mkdir -p atmosphere-$(AMSVER)/atmosphere/contents/0100000000000032
|
|
|
|
mkdir -p atmosphere-$(AMSVER)/atmosphere/contents/0100000000000034
|
|
|
|
mkdir -p atmosphere-$(AMSVER)/atmosphere/contents/0100000000000036
|
|
|
|
mkdir -p atmosphere-$(AMSVER)/atmosphere/contents/0100000000000037
|
2019-04-12 22:28:46 +00:00
|
|
|
mkdir -p atmosphere-$(AMSVER)/atmosphere/fatal_errors
|
2019-11-27 21:44:09 +00:00
|
|
|
mkdir -p atmosphere-$(AMSVER)/atmosphere/config_templates
|
2019-12-06 11:29:14 +00:00
|
|
|
mkdir -p atmosphere-$(AMSVER)/atmosphere/config
|
2019-01-24 16:21:52 +00:00
|
|
|
cp fusee/fusee-primary/fusee-primary.bin atmosphere-$(AMSVER)/atmosphere/reboot_payload.bin
|
2019-08-06 02:37:02 +00:00
|
|
|
cp fusee/fusee-mtc/fusee-mtc.bin atmosphere-$(AMSVER)/atmosphere/fusee-mtc.bin
|
2018-12-04 11:54:25 +00:00
|
|
|
cp fusee/fusee-secondary/fusee-secondary.bin atmosphere-$(AMSVER)/atmosphere/fusee-secondary.bin
|
2019-02-20 21:42:05 +00:00
|
|
|
cp fusee/fusee-secondary/fusee-secondary.bin atmosphere-$(AMSVER)/sept/payload.bin
|
2019-02-20 21:50:18 +00:00
|
|
|
cp sept/sept-primary/sept-primary.bin atmosphere-$(AMSVER)/sept/sept-primary.bin
|
|
|
|
cp sept/sept-secondary/sept-secondary.bin atmosphere-$(AMSVER)/sept/sept-secondary.bin
|
2019-06-19 06:54:53 +00:00
|
|
|
cp sept/sept-secondary/sept-secondary_00.enc atmosphere-$(AMSVER)/sept/sept-secondary_00.enc
|
|
|
|
cp sept/sept-secondary/sept-secondary_01.enc atmosphere-$(AMSVER)/sept/sept-secondary_01.enc
|
2019-12-09 11:58:48 +00:00
|
|
|
cp config_templates/BCT.ini atmosphere-$(AMSVER)/atmosphere/config/BCT.ini
|
|
|
|
cp config_templates/override_config.ini atmosphere-$(AMSVER)/atmosphere/config_templates/override_config.ini
|
|
|
|
cp config_templates/system_settings.ini atmosphere-$(AMSVER)/atmosphere/config_templates/system_settings.ini
|
|
|
|
cp -r config_templates/kip_patches atmosphere-$(AMSVER)/atmosphere/kip_patches
|
|
|
|
cp -r config_templates/hbl_html atmosphere-$(AMSVER)/atmosphere/hbl_html
|
2019-10-28 04:43:01 +00:00
|
|
|
cp stratosphere/boot2/boot2.nsp atmosphere-$(AMSVER)/atmosphere/contents/0100000000000008/exefs.nsp
|
|
|
|
cp stratosphere/dmnt/dmnt.nsp atmosphere-$(AMSVER)/atmosphere/contents/010000000000000D/exefs.nsp
|
|
|
|
cp stratosphere/eclct.stub/eclct.stub.nsp atmosphere-$(AMSVER)/atmosphere/contents/0100000000000032/exefs.nsp
|
|
|
|
cp stratosphere/fatal/fatal.nsp atmosphere-$(AMSVER)/atmosphere/contents/0100000000000034/exefs.nsp
|
|
|
|
cp stratosphere/creport/creport.nsp atmosphere-$(AMSVER)/atmosphere/contents/0100000000000036/exefs.nsp
|
|
|
|
cp stratosphere/ro/ro.nsp atmosphere-$(AMSVER)/atmosphere/contents/0100000000000037/exefs.nsp
|
|
|
|
mkdir -p atmosphere-$(AMSVER)/atmosphere/contents/0100000000000032/flags
|
|
|
|
touch atmosphere-$(AMSVER)/atmosphere/contents/0100000000000032/flags/boot2.flag
|
|
|
|
mkdir -p atmosphere-$(AMSVER)/atmosphere/contents/0100000000000037/flags
|
|
|
|
touch atmosphere-$(AMSVER)/atmosphere/contents/0100000000000037/flags/boot2.flag
|
2019-04-22 08:54:44 +00:00
|
|
|
cp troposphere/reboot_to_payload/reboot_to_payload.nro atmosphere-$(AMSVER)/switch/reboot_to_payload.nro
|
2018-10-17 02:41:06 +00:00
|
|
|
cd atmosphere-$(AMSVER); zip -r ../atmosphere-$(AMSVER).zip ./*; cd ../;
|
|
|
|
rm -r atmosphere-$(AMSVER)
|
2018-10-17 02:43:57 +00:00
|
|
|
mkdir out
|
|
|
|
mv atmosphere-$(AMSVER).zip out/atmosphere-$(AMSVER).zip
|
|
|
|
cp fusee/fusee-primary/fusee-primary.bin out/fusee-primary.bin
|
2018-04-23 18:07:49 +00:00
|
|
|
|
2019-01-25 17:33:35 +00:00
|
|
|
|
|
|
|
.PHONY: $(TOPTARGETS) $(COMPONENTS)
|