Add stubs and functions neccessary to build Lua

This commit is contained in:
Mark
2020-07-22 14:30:46 +03:00
parent f02ee5e59b
commit 5a05da89e9
22 changed files with 411 additions and 7 deletions
+6 -5
View File
@@ -3,17 +3,15 @@ HEADERS=$(shell find include -type f -name "*.h")
INSTALL_HEADERS=$(filter-out include/_libc/%,$(HEADERS))
OBJ_CRT=$(O)/obj/crt0.o
SRC_LIBC=$(shell find src -type f -name "*.c")
OBJ_LIBC=$(SRC_LIBC:src/%.c=$(O)/libc/%.o)
AS_SRC_LIBC=$(shell find src -type f -name "*.S")
OBJ_LIBC=$(SRC_LIBC:src/%.c=$(O)/libc/%.o) $(AS_SRC_LIBC:src/%.S=$(O)/libc/%.o)
SRC_DIR_LIBC=$(shell find src/* -type d)
DIR_LIBC=$(SRC_DIR_LIBC:src/%=$(O)/libc/%)
STATIC_LIBS=$(O)/lib/libc.a
SHARED_LIBS=
# Build
CFLAGS=-mno-sse \
-mno-sse2 \
-mno-mmx \
-I include \
CFLAGS=-I include \
-ffreestanding \
-Wall \
-Wextra \
@@ -70,3 +68,6 @@ $(O)/lib/libc.a: $(OBJ_LIBC)
$(O)/libc/%.o: src/%.c $(HEADERS)
$(CC) $(CFLAGS) -c -o $@ $<
$(O)/libc/%.o: src/%.S $(HEADERS)
$(CC) $(CFLAGS) -c -o $@ $<