Skip to content

Commit 30e0c4e

Browse files
committed
Improved main makefile and readme.
Also updated KallistiOS.
1 parent 5d6b78f commit 30e0c4e

File tree

3 files changed

+61
-16
lines changed

3 files changed

+61
-16
lines changed

Makefile

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -211,6 +211,32 @@ release: build cdi
211211
@echo
212212
@echo "\033[42m Complete $(DS_BASE)/release \033[0m"
213213

214+
update:
215+
@echo Fetching DreamShell from GitHub...
216+
@git fetch && git checkout origin/master
217+
@echo Fetching KallistiOS from GitHub...
218+
@cd $(KOS_BASE) && git fetch && git checkout `cat $(DS_BASE)/sdk/doc/KallistiOS.txt`
219+
@echo Fetching kos-ports from GitHub...
220+
@cd $(KOS_BASE)/../kos-ports && git fetch && git checkout origin/master
221+
222+
update-build:
223+
@echo Fetching DreamShell from GitHub...
224+
@git fetch && git checkout origin/master
225+
@echo Fetching and build KallistiOS from GitHub...
226+
@cd $(KOS_BASE) && git fetch && git checkout `cat $(DS_BASE)/sdk/doc/KallistiOS.txt` && make clean && make
227+
@echo Fetching and build kos-ports from GitHub...
228+
@mv include include_
229+
@cd $(KOS_BASE)/../kos-ports && git fetch && git checkout origin/master && ./utils/build-all.sh
230+
@mv include_ include
231+
@echo Building DreamShell...
232+
@make clean-all && make build
233+
234+
toolchain:
235+
@cp $(DS_SDK)/toolchain/environ.sh $(KOS_BASE)/environ.sh
236+
@cp $(DS_SDK)/toolchain/patches/*.diff $(KOS_BASE)/utils/dc-chain/patches
237+
@source $(KOS_BASE)/environ.sh
238+
@cd $(KOS_BASE)/utils/dc-chain && cp Makefile.default.cfg Makefile.cfg && make
239+
214240
$(TARGET): libs $(TARGET_BIN) make-build
215241

216242
$(TARGET).elf: $(OBJS)

README.md

Lines changed: 34 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,9 @@ There are also large subproject is the ISO Loader, which contains emulation of B
1515
sudo apt-get install -y genisoimage squashfs-tools texinfo git
1616
sudo apt-get install -y libpng-dev libjpeg-dev liblzo2-dev liblua5.2-dev
1717
sudo apt-get install -y libmpc-dev
18-
cd /tmp && git clone https://github.com/LuaDist/tolua.git && cd tolua
19-
mkdir build && cd ./build
18+
cd /tmp
19+
git clone https://github.com/LuaDist/tolua.git
20+
cd /tmp/tolua && mkdir build && cd ./build
2021
cmake ../ && make && sudo make install
2122
```
2223
##### Code
@@ -25,7 +26,8 @@ sudo mkdir -p /usr/local/dc/kos
2526
sudo chown -R $(id -u):$(id -g) /usr/local/dc
2627
cd /usr/local/dc/kos
2728
git clone https://github.com/KallistiOS/kos-ports.git
28-
git clone https://github.com/KallistiOS/KallistiOS.git kos && cd kos
29+
git clone https://github.com/KallistiOS/KallistiOS.git kos
30+
cd /usr/local/dc/kos/kos
2931
git clone https://github.com/DC-SWAT/DreamShell.git ds
3032
git checkout `cat ds/sdk/doc/KallistiOS.txt`
3133
cp ds/sdk/toolchain/environ.sh environ.sh
@@ -37,7 +39,7 @@ sudo mkdir -p /opt/toolchains/dc
3739
sudo chown -R $(id -u):$(id -g) /opt/toolchains/dc
3840
cd /usr/local/dc/kos/kos/utils/dc-chain
3941
cp Makefile.default.cfg Makefile.cfg
40-
make && cd ../../
42+
make
4143
```
4244
##### SDK
4345
```console
@@ -58,35 +60,52 @@ cd /usr/local/dc/kos/kos/ds && source ../environ.sh
5860
```
5961

6062
### Build code
61-
##### Core and libraries
63+
##### Full build
64+
```console
65+
make build
66+
```
67+
##### Full clean
68+
```console
69+
make clean-all
70+
```
71+
##### Make release package
72+
```console
73+
make release
74+
```
75+
##### Update code from GitHub
76+
```console
77+
make update
78+
```
79+
##### Update code from GitHub and re-build
80+
```console
81+
make update-build
82+
```
83+
##### Re-build toochain (if updated)
84+
```console
85+
make toolchain
86+
```
87+
##### Core and libraries only
6288
```console
6389
make
6490
```
65-
##### Modules, applications and commands
91+
##### Modules, applications and commands only
6692
```console
6793
cd ${KOS_BASE}/ds/modules && make
6894
cd ${KOS_BASE}/ds/commands && make
6995
cd ${KOS_BASE}/ds/applications && make
7096
```
71-
##### Firmwares
97+
##### Firmwares only
7298
```console
7399
cd ${KOS_BASE}/ds/firmware/bootloader && make && make release
74100
cd ${KOS_BASE}/ds/firmware/isoldr && make && make install
75101
```
76-
##### Full build (modules, apps etc)
77-
```console
78-
make build
79-
```
80-
##### Make release package
81-
```console
82-
make release
83-
```
84102

85103
### Running
86104
- dc-tool-ip: `make run`
87105
- dc-tool-serial: `make run-serial`
88106
- lxdream emulator: `make lxdream`
89107
- nulldc emulator: `make nulldc`
108+
- flycast emulator: `make flycast`
90109
- make cdi image: `make cdi`
91110

92111
## Links

sdk/doc/KallistiOS.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
2751f20f40083c856e767b90eff4c64206987b68
1+
4346a85740d341587fd151cf47475b74fff9eeb4

0 commit comments

Comments
 (0)