diff options
author | Benji Dial <benji@benjidial.net> | 2024-05-18 21:53:38 -0400 |
---|---|---|
committer | Benji Dial <benji@benjidial.net> | 2024-05-18 21:53:38 -0400 |
commit | b1a912a8a6ff472a49b2e0a09cfd433adfc2cb24 (patch) | |
tree | 5009d4415ba13e4baa37f3d0271852528130fd3b /euler/makefile | |
parent | a8a80d326de9550b2a25b1255a2093ab43219ede (diff) | |
download | hilbert-os-b1a912a8a6ff472a49b2e0a09cfd433adfc2cb24.tar.gz |
reorganization, cross compiler
Diffstat (limited to 'euler/makefile')
-rw-r--r-- | euler/makefile | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/euler/makefile b/euler/makefile new file mode 100644 index 0000000..3b8022d --- /dev/null +++ b/euler/makefile @@ -0,0 +1,29 @@ +LIBSTDCPP_SOURCES = euler/stream.cpp strings/strlen.cpp euler/syscall.asm \ + euler/entry.cpp io/fopen.cpp euler/gcc.asm memory/delete.cpp euler/heap.cpp \ + memory/new.cpp io/fclose.cpp io/fread.cpp strings/memcpy.cpp + +clean: + rm -rf build + +build/%.asm.o: source/%.asm + @mkdir -p $(@D) + $(HILBERT_NASM) $^ -o $@ + +build/%.cpp.o: source/%.cpp + @mkdir -p $(@D) + $(HILBERT_CC) -c $^ -o $@ + +build/crt0.o: build/empty.asm.o + cp $^ $@ + +build/libc.a: build/empty.asm.o + $(HILBERT_AR) rcs $@ $^ + +build/libg.a: build/empty.asm.o + $(HILBERT_AR) rcs $@ $^ + +build/libm.a: build/empty.asm.o + $(HILBERT_AR) rcs $@ $^ + +build/libstdc++.a: ${LIBSTDCPP_SOURCES:%=build/%.o} + $(HILBERT_AR) rcs $@ $^ |