Mercurial > hg > Members > mitsuki > haribote
view Makefile @ 4:8bfcd14edc47 default tip
merge
author | mir3636 |
---|---|
date | Tue, 16 Oct 2018 23:00:00 +0900 |
parents | 74b19f0bedc5 |
children |
line wrap: on
line source
CLANG=/Users/mitsuki/workspace/llvm/CbC_build/bin/clang -target i386-pc-linux CSO=bootpack.c OBJ=bootpack.o nasmfunc.o CBCOBJ=c/haribote-context.o # dependencies asmhead.bin : asmhead.asm nasm -f elf32 -g -o asmhead.bin asmhead.asm nasmfunc.o : nasmfunc.asm nasm -f elf32 -g -o nasmfunc.o nasmfunc.asm %.c : %.cbc perl generate_stub_haribote.pl -o $*.c $*.cbc haribote-context.c : $(CSO) perl generate_context_harib.pl -o haribote $(CSO) haribote-context.o : haribote-context.c $(CLANG) -g -c -Wall c/haribote-context.c -o c/haribote-context.o %.o : %.c $(CLANG) -c $*.c -o $*.o bootpack.bin : $(OBJ) i386-elf-ld -m elf_i386 -e HariMain -o bootpack.bin -T os.ls $(OBJ) haribote.sys : asmhead.bin bootpack.bin cat asmhead.bin bootpack.bin > haribote.sys iplelf.bin : iplelf.asm nasm -o iplelf.bin iplelf.asm ipl10.bin : ipl10.asm nasm -o ipl10.bin ipl10.asm haribote.img : ipl10.bin haribote.sys mformat -f 1440 -C -B ipl10.bin -i haribote.img :: mcopy -i haribote.img haribote.sys :: img : make -r haribote.img kernel.elf: asmhead.bin bootpack.o nasmfunc.o i386-elf-ld -m elf_i386 -e asmhead -o kernel.elf -T os.ls asmhead.bin $(OBJ) -Map kernel.map elf.img : iplelf.bin kernel.elf mformat -f 1440 -C -B iplelf.bin -i elf.img :: mcopy -i elf.img kernel.elf :: clean: -rm *.bin -rm *.o -rm *.sys -rm *.img src_only : make clean rm haribote.img elf: elf.img qemu-system-i386 -fda elf.img -m 512M elfd: elf.img qemu-system-i386 -fda elf.img -m 512M -gdb tcp::1233 -S do: haribote.img qemu-system-i386 -fda haribote.img -m 512M