2018-10-17 03:41:06 +01:00
|
|
|
TOPTARGETS := all clean dist
|
2018-11-08 09:27:36 +00:00
|
|
|
AMSBRANCH := $(shell git symbolic-ref --short HEAD)
|
|
|
|
AMSREV := $(AMSBRANCH)-$(shell git rev-parse --short HEAD)
|
|
|
|
|
2018-10-21 21:59:59 +01:00
|
|
|
ifneq (, $(strip $(shell git status --porcelain 2>/dev/null)))
|
|
|
|
AMSREV := $(AMSREV)-dirty
|
|
|
|
endif
|
2018-04-23 19:07:49 +01:00
|
|
|
|
2018-10-30 18:25:21 +00:00
|
|
|
all: fusee stratosphere exosphere thermosphere
|
|
|
|
|
|
|
|
thermosphere:
|
|
|
|
$(MAKE) -C thermosphere all
|
|
|
|
|
|
|
|
exosphere: thermosphere
|
|
|
|
$(MAKE) -C exosphere all
|
2018-04-23 19:07:49 +01:00
|
|
|
|
2018-10-30 18:25:21 +00:00
|
|
|
stratosphere: exosphere
|
|
|
|
$(MAKE) -C stratosphere all
|
|
|
|
|
|
|
|
fusee: exosphere stratosphere
|
|
|
|
$(MAKE) -C $@ all
|
2018-10-17 03:41:06 +01:00
|
|
|
|
2018-05-18 23:54:38 +01:00
|
|
|
clean:
|
|
|
|
$(MAKE) -C fusee clean
|
2018-10-17 03:43:57 +01:00
|
|
|
rm -rf out
|
2018-10-17 03:41:06 +01:00
|
|
|
|
2018-10-30 18:25:21 +00:00
|
|
|
dist: all
|
2018-10-17 03:41:06 +01: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 21:59:59 +01:00
|
|
|
$(eval AMSVER = $(MAJORVER).$(MINORVER).$(MICROVER)-$(AMSREV))
|
2018-10-17 03:41:06 +01:00
|
|
|
rm -rf atmosphere-$(AMSVER)
|
2018-10-17 03:43:57 +01:00
|
|
|
rm -rf out
|
2018-10-17 03:41:06 +01:00
|
|
|
mkdir atmosphere-$(AMSVER)
|
|
|
|
mkdir atmosphere-$(AMSVER)/atmosphere
|
|
|
|
mkdir -p atmosphere-$(AMSVER)/atmosphere/titles/0100000000000036
|
2018-11-10 08:11:38 +00:00
|
|
|
mkdir -p atmosphere-$(AMSVER)/atmosphere/titles/0100000000000034
|
2018-10-30 05:18:59 +00:00
|
|
|
mkdir -p atmosphere-$(AMSVER)/atmosphere/titles/0100000000000032
|
2018-10-17 03:41:06 +01:00
|
|
|
cp fusee/fusee-secondary/fusee-secondary.bin atmosphere-$(AMSVER)/fusee-secondary.bin
|
|
|
|
cp common/defaults/BCT.ini atmosphere-$(AMSVER)/BCT.ini
|
|
|
|
cp common/defaults/loader.ini atmosphere-$(AMSVER)/atmosphere/loader.ini
|
|
|
|
cp stratosphere/creport/creport.nsp atmosphere-$(AMSVER)/atmosphere/titles/0100000000000036/exefs.nsp
|
2018-11-10 08:11:38 +00:00
|
|
|
cp stratosphere/fatal/fatal.nsp atmosphere-$(AMSVER)/atmosphere/titles/0100000000000034/exefs.nsp
|
2018-10-30 05:18:59 +00:00
|
|
|
cp stratosphere/set_mitm/set_mitm.nsp atmosphere-$(AMSVER)/atmosphere/titles/0100000000000032/exefs.nsp
|
2018-10-30 23:39:20 +00:00
|
|
|
touch atmosphere-$(AMSVER)/atmosphere/titles/0100000000000032/boot2.flag
|
2018-10-17 03:41:06 +01:00
|
|
|
cd atmosphere-$(AMSVER); zip -r ../atmosphere-$(AMSVER).zip ./*; cd ../;
|
|
|
|
rm -r atmosphere-$(AMSVER)
|
2018-10-17 03:43:57 +01:00
|
|
|
mkdir out
|
|
|
|
mv atmosphere-$(AMSVER).zip out/atmosphere-$(AMSVER).zip
|
|
|
|
cp fusee/fusee-primary/fusee-primary.bin out/fusee-primary.bin
|
2018-10-17 03:41:06 +01:00
|
|
|
|
2018-04-23 19:07:49 +01:00
|
|
|
|
2018-05-18 23:54:38 +01:00
|
|
|
.PHONY: $(TOPTARGETS) fusee
|