-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
28 lines (21 loc) · 875 Bytes
/
Makefile
File metadata and controls
28 lines (21 loc) · 875 Bytes
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
TOOLPATH = ./tools/
MAKE = $(TOOLPATH)make/make.exe --no-builtin-rules
NASM = $(TOOLPATH)nasm/nasm.exe
FATIMG = $(TOOLPATH)fat_imgen/fat_imgen.exe
LD = $(TOOLPATH)i686-elf-tools-windows/bin/i686-elf-ld.exe
default : ./bin/cloudos.img
./bin/cloudos.img : ./bin/ipl.bin ./bin/boot.bin
$(FATIMG) -c -F -f ./bin/cloudos.img -s ./bin/ipl.bin
$(FATIMG) -m -F -f ./bin/cloudos.img -i ./bin/boot.bin -n BOOT.BIN
./bin/ipl.bin : ./src/ipl.asm
cmd /C if not exist bin md bin
$(NASM) -i./src/include/ ./src/ipl.asm -o ./bin/ipl.bin
./bin/boot.bin : ./bin/boot.o ./src/boot_linker.ld
cmd /C if not exist bin md bin
$(LD) -T ./src/boot_linker.ld -nostdlib ./bin/boot.o -o ./bin/boot.bin
./bin/boot.o : ./src/boot.asm
cmd /C if not exist bin md bin
$(NASM) -i./src/include/ ./src/boot.asm -f elf -o ./bin/boot.o
.PHONY: clean
clean:
cmd /C del /Q /S .\bin