PageRenderTime 242ms CodeModel.GetById 141ms app.highlight 2ms RepoModel.GetById 98ms app.codeStats 0ms

/asm/boot/gas/Makefile

http://github.com/dennis-gemini/tests
Makefile | 23 lines | 16 code | 6 blank | 1 comment | 0 complexity | 92594dd2cb493696c540c4afb1bd0107 MD5 | raw file
 1CC=gcc
 2LD=ld
 3LDFILE=boot.ld
 4OBJCOPY=objcopy
 5
 6all: boot.img
 7
 8boot.o: boot.S
 9	$(CC) -c boot.S -o $@
10
11boot.elf: boot.o
12	$(LD) boot.o -o boot.elf -T$(LDFILE)
13#	$(LD) boot.o -o boot.elf -Ttext 0x7c00
14
15boot.bin: boot.elf
16	$(OBJCOPY) -R .pdr -R .comment -R .note -S -O binary boot.elf boot.bin
17
18boot.img: boot.bin
19	dd if=boot.bin of=boot.img bs=512 count=1
20	dd if=/dev/zero of=boot.img seek=1 bs=512 count=2879
21
22clean:
23	rm -f boot.o boot.elf boot.bin boot.img bochsout.txt