diff options
author | Benji Dial <benji6283@gmail.com> | 2021-01-24 12:00:11 -0500 |
---|---|---|
committer | Benji Dial <benji6283@gmail.com> | 2021-01-24 12:00:11 -0500 |
commit | bce944d1498eaa3b6940ee234c863b3548a66b37 (patch) | |
tree | ea40c087ab4f0f236aee8d158cf68550f5209f72 /makefile | |
parent | ca731aa747214919df7b3dfe3478dbe787ce5b68 (diff) | |
download | portland-os-bce944d1498eaa3b6940ee234c863b3548a66b37.tar.gz |
graphics!
Diffstat (limited to 'makefile')
-rw-r--r-- | makefile | 66 |
1 files changed, 32 insertions, 34 deletions
@@ -1,5 +1,6 @@ -kgccargs = -Wall -Wsuggest-attribute=pure -Wsuggest-attribute=const -m32 -Og -ffreestanding -fno-asynchronous-unwind-tables +kgccargs = -Wall -Wsuggest-attribute=pure -Wsuggest-attribute=const -m32 -mno-sse -Og -ggdb -ffreestanding -fno-asynchronous-unwind-tables -fno-pic -Isrc/shared/include -Isrc/lib ugccargs = ${kgccargs} -Isrc/user/include +ugppargs = ${ugccargs} -fno-rtti -Isrc/user/include/c++ nasmargs = -f elf32 partlink = -r -m elf_i386 @@ -9,7 +10,7 @@ out/disk.vdi: out/disk.img out/disk.img: out/kernel.bin out/boot.bin out/fs mkdir -p obj - /sbin/mkfs.fat -C -f 1 -F 16 -n "PORTLAND OS" -R 65 -s 1 -S 512 obj/shadow.img 8192 + mkfs.fat -C -f 1 -F 16 -n "PORTLAND OS" -R 65 -s 1 -S 512 obj/shadow.img 8192 echo -n -e '\xeb\x3c' > obj/jmp.bin dd if=obj/jmp.bin of=obj/shadow.img obs=2 conv=notrunc dd if=out/boot.bin of=obj/shadow.img obs=1 seek=62 conv=notrunc @@ -17,12 +18,15 @@ out/disk.img: out/kernel.bin out/boot.bin out/fs mv obj/shadow.img out/disk.img mcopy -i out/disk.img -s out/fs/* ::/ -debug: out/disk.img - gdb -x qemu-debug.gdb - clean: rm -r obj out || true +qemu: out/disk.img + qemu-system-i386 -m 512 -s -S out/disk.img + +bochs: out/disk.img + bochs -q + out/fs/bin/%: obj/%.elf mkdir -p $(shell dirname $@) objcopy -S $< $@ @@ -31,10 +35,7 @@ out/fs/man/%.man: src/man/%.pre mkdir -p $(shell dirname $@) python3 tools/man-gen.py $< $@ -out/fs: out/fs/bin/init out/fs/bin/meminfo out/fs/bin/highway \ - out/fs/bin/hello out/fs/bin/dumptext out/fs/bin/dumphex \ - out/fs/bin/dirinfo out/fs/bin/fileman out/fs/bin/manual \ - out/fs/man/index.man out/fs/man/dev/kmemmap.man +out/fs: out/fs/bin/init out/fs/bin/highway out/fs/bin/meminfo touch out/fs cp -r fs-skel/* out/fs/ @@ -50,7 +51,7 @@ out/kernel.bin: obj/kernel/drive.ko obj/kernel/fat.ko obj/kernel/ide.ko \ obj/kernel/idt.ko obj/kernel/log.ko obj/kernel/main.ko \ obj/kernel/panic.ko obj/kernel/pci.ko obj/kernel/elf.ko \ obj/kernel/serial.ko obj/kernel/task.ko obj/kernel/util.ko \ - obj/kernel/vga.ko obj/kernel/isrs.kao obj/kernel/kbd.ko \ + obj/kernel/window.ko obj/kernel/isrs.kao obj/kernel/kbd.ko \ obj/kernel/pmap.ko obj/kernel/paging.ko mkdir -p out ld -T src/kernel/elf-link.ld $^ -o obj/kernel.elf @@ -68,41 +69,38 @@ obj/%.ao: src/user/%.asm mkdir -p $(shell dirname $@) nasm ${nasmargs} $< -o $@ -obj/c.rto: obj/runtimes/c/entry.ao - ld ${partlink} obj/runtimes/c/* -o obj/c.rto +obj/%.po: src/user/%.cpp + mkdir -p $(shell dirname $@) + g++ ${ugppargs} -c $< -o $@ + +obj/c.rto: obj/runtimes/c/pcrt.ao + ld ${partlink} $^ -o $@ obj/cpp.rto: #TODO -obj/knob.so: obj/knob/env.o obj/knob/file.o obj/knob/format.o \ - obj/knob/heap.o obj/knob/user.o obj/knob/task.o \ - obj/knob/block.o +obj/knob.so: obj/knob/file.o obj/knob/format.o \ + obj/knob/heap.o obj/knob/ipc.o obj/knob/task.o \ + obj/knob/block.o obj/knob/key.o obj/knob/panic.o ld ${partlink} $^ -o $@ -obj/init.elf: obj/init/init.o obj/knob.so obj/c.rto - ld -T src/user/runtimes/c/elf.ld $^ -o $@ - -obj/meminfo.elf: obj/meminfo/meminfo.o obj/knob.so obj/c.rto - ld -T src/user/runtimes/c/elf.ld $^ -o $@ - -obj/highway.elf: obj/highway/main.o obj/highway/cmds.o obj/highway/line.o \ - obj/highway/vars.o obj/knob.so obj/c.rto - ld -T src/user/runtimes/c/elf.ld $^ -o $@ - -obj/hello.elf: obj/hello/hello.ao - ld -T src/user/runtimes/asm/elf.ld $^ -o $@ +obj/terminal.so: obj/terminal/readline.o obj/terminal/terminal.o + ld ${partlink} $^ -o $@ -obj/dumptext.elf: obj/dumptext/dumptext.o obj/knob.so obj/c.rto - ld -T src/user/runtimes/c/elf.ld $^ -o $@ +obj/libfont.so: obj/libfont/bdf.o obj/libfont/fonts.o obj/libfont/filist.o + ld ${partlink} $^ -o $@ -obj/dumphex.elf: obj/dumphex/dumphex.o obj/knob.so obj/c.rto - ld -T src/user/runtimes/c/elf.ld $^ -o $@ +obj/popups.so: obj/popups/info.o obj/popups/popup.o + ld ${partlink} $^ -o $@ -obj/dirinfo.elf: obj/dirinfo/dirinfo.o obj/knob.so obj/c.rto +obj/init.elf: obj/init/init.o obj/knob.so obj/c.rto ld -T src/user/runtimes/c/elf.ld $^ -o $@ -obj/fileman.elf: obj/fileman/fileman.o obj/knob.so obj/c.rto +obj/highway.elf: obj/highway/main.o obj/highway/cmds.o obj/highway/line.o \ + obj/highway/vars.o obj/knob.so obj/terminal.so \ + obj/libfont.so obj/c.rto ld -T src/user/runtimes/c/elf.ld $^ -o $@ -obj/manual.elf: obj/manual/manual.o obj/knob.so obj/c.rto +obj/meminfo.elf: obj/meminfo/meminfo.o obj/popups.so obj/libfont.so \ + obj/knob.so obj/c.rto ld -T src/user/runtimes/c/elf.ld $^ -o $@
\ No newline at end of file |