aboutsummaryrefslogtreecommitdiff
path: root/Makefile.in
diff options
context:
space:
mode:
authorIan Moffett <ian@osmora.org>2024-04-06 19:46:41 -0400
committerIan Moffett <ian@osmora.org>2024-04-06 19:48:10 -0400
commit8370d0a3eb373c37386de32ccd3a8a38ddeb8b02 (patch)
tree2f390a0f8206c8dca80362dd49b01ef3ecec1fc2 /Makefile.in
parenteccaaf54d8e5ab90ed0cf9dd3be8204e35115692 (diff)
build: Statically link libc
Signed-off-by: Ian Moffett <ian@osmora.org>
Diffstat (limited to 'Makefile.in')
-rw-r--r--Makefile.in13
1 files changed, 7 insertions, 6 deletions
diff --git a/Makefile.in b/Makefile.in
index f4336a7..7cc093a 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -47,8 +47,9 @@ else
override LD = $(shell pwd)/cross/bin/$(ARCH)-hyra-ld
endif
override AS = $(CC)
-override LDSO = $(shell pwd)/base/usr/lib/ld.so
-override USER_MKFLGS = CC=$(CC) LD=$(LD) LDSO=$(LDSO)
+override USRDIR=$(shell pwd)/base/usr/
+override LIBC = libc.a
+override USER_MKFLGS = CC=$(CC) LD=$(LD) LIBC=$(LIBC) USRDIR=$(USRDIR)
##########################
# Architecture specifics
@@ -71,7 +72,7 @@ override KERNEL_ASMOBJECTS = $(KERNEL_ASMFILES:.S=.S.o)
override KERNEL_HEADER_DEPS = $(KERNEL_CFILES:.c=.d)
.PHONY: all
-all: base lib userland base/usr/lib/ld.so base/boot/hyra-kernel
+all: base lib userland base/boot/hyra-kernel
rm -f sys/include/machine
rm -rf iso_root
@@ -87,11 +88,12 @@ base:
mkdir -p base/usr/lib/
mkdir -p base/usr/sbin/
mkdir -p base/boot/
+ cd base/usr/; ln -sf ../../lib/libc/include/ .
.PHONY: lib
lib:
cd lib/; make $(USER_MKFLGS)
- cp lib/libc/build/ld.so base/usr/lib/
+ cp lib/libc/build/libc.a base/usr/lib/
.PHONY: run
run:
@@ -106,8 +108,7 @@ distclean:
make clean
rm -f $(KERNEL_ASMOBJECTS) $(KERNEL_OBJECTS) $(KERNEL_HEADER_DEPS)
rm -f sys/include/machine
- rm -f base/usr/lib/ld.so
- rm -f base/boot/init
+ rm -f base/usr/sbin/init
cd lib/; make clean
.PHONY: clean