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