forked from SciresM/boot9strap
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
42 lines (32 loc) · 996 Bytes
/
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
rwildcard = $(foreach d, $(wildcard $1*), $(filter $(subst *, %, $2), $d) $(call rwildcard, $d/, $2))
ifeq ($(strip $(DEVKITARM)),)
$(error "Please set DEVKITARM in your environment. export DEVKITARM=<path to>devkitARM")
endif
include $(DEVKITARM)/base_tools
name := boot9strap
dir_arm9_stage2 := stage2/arm9
dir_arm11_stage2 := stage2/arm11
.PHONY: $(dir_out)
.PHONY: $(dir_build)
.PHONY: $(dir_arm9_stage2)
.PHONY: $(dir_arm11_stage2)
.PHONY: build_boot9strap_firm.py
.PHONY: boot9strap.s
.PHONY: all
.PHONY: boot9strap
.PHONY: clean
all: boot9strap
boot9strap: build_boot9strap_firm.py boot9strap.s $(dir_arm9_stage2)/out/arm9.bin $(dir_arm11_stage2)/out/arm11.bin
@mkdir -p "out"
@mkdir -p "build"
@armips boot9strap.s
@python $^
$(dir_arm9_stage2)/out/arm9.bin: $(dir_arm9_stage2)
@$(MAKE) -C $<
$(dir_arm11_stage2)/out/arm11.bin: $(dir_arm11_stage2)
@$(MAKE) -C $<
clean:
@$(MAKE) -C $(dir_arm9_stage2) clean
@$(MAKE) -C $(dir_arm11_stage2) clean
rm -rf out
rm -rf build