summaryrefslogtreecommitdiff
path: root/makefile
diff options
context:
space:
mode:
authorBenji Dial <benji6283@gmail.com>2021-03-04 19:11:42 -0500
committerBenji Dial <benji6283@gmail.com>2021-03-04 19:11:42 -0500
commit406af09ade55553e2b064506c3ba3c89bd965d73 (patch)
treedd6da93bc329d6b1097aa1afcde2af19491dfc8e /makefile
parent86af7f631080bc4b45846bd7f382c4cedcbec2b4 (diff)
downloadportland-os-406af09ade55553e2b064506c3ba3c89bd965d73.tar.gz
start of a c++ widget toolkit, c++ runtime
Diffstat (limited to 'makefile')
-rw-r--r--makefile46
1 files changed, 29 insertions, 17 deletions
diff --git a/makefile b/makefile
index f71c6eb..83c1013 100644
--- a/makefile
+++ b/makefile
@@ -1,8 +1,10 @@
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++
+ugppargs = ${ugccargs} -fno-rtti -Isrc/user/include/cxx
nasmargs = -f elf32
partlink = -r -m elf_i386
+clink = -T src/user/runtimes/c/elf.ld
+cxxlink = ${clink} src/user/runtimes/cxx/extra.ld
out/disk.vdi: out/disk.img
rm out/disk.vdi || true
@@ -38,7 +40,7 @@ out/fs/bin/%: obj/%.elf
out/fs: out/fs/bin/init out/fs/bin/highway out/fs/bin/meminfo \
out/fs/bin/terminal out/fs/bin/hello out/fs/bin/mkpopup \
out/fs/bin/dirlist out/fs/bin/ttt out/fs/bin/time \
- out/fs/bin/filetest out/fs/bin/mdemo
+ out/fs/bin/filetest out/fs/bin/mdemo out/fs/bin/rhello
touch out/fs
cp -r fs-skel/* out/fs/
@@ -80,8 +82,9 @@ obj/%.po: src/user/%.cpp
obj/c.rto: obj/runtimes/c/pcrt.ao
ld ${partlink} $^ -o $@
-obj/cpp.rto:
- #TODO
+obj/cxx.rto: obj/c.rto \
+ obj/runtimes/cxx/extra.ao
+ ld ${partlink} $^ -o $@
obj/knob.so: obj/knob/file.o obj/knob/format.o obj/knob/rand.o \
obj/knob/heap.o obj/knob/ipc.o obj/knob/task.o \
@@ -99,45 +102,54 @@ obj/libfont.so: obj/libfont/bdf.o obj/libfont/pbf.o obj/libfont/fonts.o \
obj/popups.so: obj/popups/info.o obj/popups/popup.o
ld ${partlink} $^ -o $@
+obj/raleigh.so: obj/raleigh/runtime.po obj/raleigh/window.po \
+ obj/raleigh/w/label.po obj/raleigh/util.po \
+ obj/raleigh/w/padding.po
+ 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 $@
+ ld ${clink} $^ -o $@
obj/highway.elf: obj/highway/main.o obj/highway/cmds.o obj/highway/line.o \
obj/highway/vars.o obj/knob.so obj/libterm.so \
obj/c.rto
- ld -T src/user/runtimes/c/elf.ld $^ -o $@
+ ld ${clink} $^ -o $@
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 $@
+ ld ${clink} $^ -o $@
obj/terminal.elf: obj/terminal/main.o obj/libfont.so obj/knob.so \
obj/c.rto
- ld -T src/user/runtimes/c/elf.ld $^ -o $@
+ ld ${clink} $^ -o $@
obj/hello.elf: obj/hello/hello.ao
- ld -T src/user/runtimes/asm/elf.ld $^ -o $@
+ ld ${clink} $^ -o $@
obj/mkpopup.elf: obj/mkpopup/main.o obj/popups.so obj/libfont.so \
obj/knob.so obj/c.rto
- ld -T src/user/runtimes/c/elf.ld $^ -o $@
+ ld ${clink} $^ -o $@
obj/dirlist.elf: obj/dirlist/main.o obj/libterm.so obj/knob.so \
obj/c.rto
- ld -T src/user/runtimes/c/elf.ld $^ -o $@
+ ld ${clink} $^ -o $@
-obj/ttt.elf : obj/ttt/main.o obj/popups.so obj/libfont.so \
- obj/knob.so obj/c.rto
- ld -T src/user/runtimes/c/elf.ld $^ -o $@
+obj/ttt.elf: obj/ttt/main.o obj/popups.so obj/libfont.so \
+ obj/knob.so obj/c.rto
+ ld ${clink} $^ -o $@
obj/time.elf: obj/time/time.o obj/libterm.so obj/knob.so \
obj/c.rto
- ld -T src/user/runtimes/c/elf.ld $^ -o $@
+ ld ${clink} $^ -o $@
obj/filetest.elf: obj/filetest/filetest.o obj/libterm.so obj/knob.so \
obj/c.rto
- ld -T src/user/runtimes/c/elf.ld $^ -o $@
+ ld ${clink} $^ -o $@
obj/mdemo.elf: obj/mdemo/main.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
+ ld ${clink} $^ -o $@
+
+obj/rhello.elf: obj/rhello/main.po obj/raleigh.so obj/libfont.so \
+ obj/knob.so obj/cxx.rto
+ ld ${cxxlink} $^ -o $@ \ No newline at end of file