forked from cathery/sys-con
-
Notifications
You must be signed in to change notification settings - Fork 5
/
Makefile
56 lines (46 loc) · 1.94 KB
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
.PHONY: all build clean mrproper dist distclean
GIT_TAG := $(shell git describe --tags `git rev-list --tags --max-count=1`)
GIT_TAG_COMMIT_COUNT := +$(shell git rev-list `git rev-list --tags --no-walk --max-count=1`..HEAD --count)
ifeq ($(GIT_TAG_COMMIT_COUNT),+0)
GIT_TAG_COMMIT_COUNT :=
endif
ATMOSPHERE_VERSION ?= 1.7.x
SOURCE_DIR := source
OUT_DIR := out
DIST_DIR := dist
OUT_ZIP := sys-con-$(GIT_TAG)$(GIT_TAG_COMMIT_COUNT)-ATMOSPHERE-$(ATMOSPHERE_VERSION).zip
all: build
rm -rf $(OUT_DIR)
mkdir -p $(OUT_DIR)/atmosphere/contents/690000000000000D/flags
mkdir -p $(OUT_DIR)/config/sys-con
mkdir -p $(OUT_DIR)/switch/
touch $(OUT_DIR)/atmosphere/contents/690000000000000D/flags/boot2.flag
cp $(SOURCE_DIR)/Sysmodule/sys-con.nsp $(OUT_DIR)/atmosphere/contents/690000000000000D/exefs.nsp
cp $(SOURCE_DIR)/AppletCompanion/sys-con.nro $(OUT_DIR)/switch/sys-con.nro
cp -r $(DIST_DIR)/. $(OUT_DIR)/
@echo [DONE] sys-con compiled successfully. All files have been placed in $(OUT_DIR)/
build:
$(MAKE) -C $(SOURCE_DIR) ATMOSPHERE_VERSION=$(ATMOSPHERE_VERSION)
clean:
$(MAKE) -C $(SOURCE_DIR) clean
rm -rf $(OUT_DIR)
rm -f $(OUT_ZIP)
mrproper: clean
$(MAKE) -C $(SOURCE_DIR) mrproper
rm -rf $(OUT_DIR)
rm -f $(OUT_ZIP)
dist: clean all
cd $(OUT_DIR)/ && zip -r ../$(OUT_ZIP) .
atmosphere_1.5.x-1.6.x:
cd lib/Atmosphere-libs && \
git reset --hard && \
git checkout a55e74aec3ff24112c981e8e2f677113df045b4c && \
sed -i 's/Order != Order/false/' libvapours/include/vapours/util/arch/arm64/util_atomic.hpp && \
sed -i 's/TransferMode != TransferMode/false/' libstratosphere/include/stratosphere/sf/sf_buffers.hpp
atmosphere_1.7.x-1.8.x:
cd lib/Atmosphere-libs && \
git reset --hard && \
git checkout 989fb7be0c68bf229fe6789428b6c448b6de142a && \
sed -i 's/static_assert/\/\/static_assert/' libstratosphere/source/ldr/ldr_pm_api.os.horizon.cpp
distclean: mrproper atmosphere_$(ATMOSPHERE_VERSION) all
cd $(OUT_DIR)/ && zip -r ../$(OUT_ZIP) .