From 4ae57a7fb13e68c5e6f1c1246a867555dbd986db Mon Sep 17 00:00:00 2001
From: dzwdz
Date: Mon, 29 Aug 2022 13:57:47 +0200
Subject: user/lua: implement the bare minimum for it to link and "run"

---
 Makefile | 12 +++++++-----
 1 file changed, 7 insertions(+), 5 deletions(-)

(limited to 'Makefile')

diff --git a/Makefile b/Makefile
index 37caf0d..64811d7 100644
--- a/Makefile
+++ b/Makefile
@@ -7,15 +7,16 @@ CHECK   = sparse
 
 CFLAGS += -g -std=gnu99 -ffreestanding -O2 -ftrack-macro-expansion=0
 CFLAGS += -Wall -Wextra -Wold-style-definition -Werror=implicit-function-declaration
-CFLAGS += -mgeneral-regs-only -Wno-address-of-packed-member
+CFLAGS += -Wno-address-of-packed-member
 CFLAGS += -Isrc/ -Isrc/shared/include/
 
-KERNEL_CFLAGS  = $(CFLAGS) -mno-sse
+KERNEL_CFLAGS  = $(CFLAGS) -mno-sse -mgeneral-regs-only
 USER_CFLAGS    = $(CFLAGS) -Isrc/user/lib/include/
 
 SPARSEFLAGS = -Wno-non-pointer-null
 LFLAGS  = -ffreestanding -O2 -nostdlib -lgcc -Wl,-zmax-page-size=4096 -Wl,--no-warn-mismatch
-QFLAGS  = -no-reboot
+# TODO optimize memory use
+QFLAGS  = -no-reboot -m 1g
 ifdef NET_DIRECT
 QFLAGS += -nic socket,model=rtl8139,connect=:1234,mac=52:54:00:ca:77:1a,id=n1
 else
@@ -37,8 +38,9 @@ define from_sources
 endef
 
 
-.PHONY: all boot debug lint check clean
-all: out/boot.iso out/libm.a check
+.PHONY: all portdeps boot debug lint check clean
+all: portdeps out/boot.iso check
+portdeps: out/libc.a out/libm.a
 
 boot: all out/hdd
 	qemu-system-x86_64 -drive file=out/boot.iso,format=raw,media=disk $(QFLAGS) -serial stdio
-- 
cgit v1.2.3