TinyBasic 1.0.4 : uses auto import(KX).

git-svn-id: svn://kolibrios.org@9649 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
turbocat 2022-01-18 17:24:09 +00:00
parent 0eb1f22eab
commit aa8c354057
3 changed files with 26 additions and 58 deletions

View File

@ -1,31 +0,0 @@
KTCC_DIR=../ktcc/trunk
KLIBC_DIR = $(KTCC_DIR)/libc.obj
NAME=bin/tinybas.kex
KTCC=$(KTCC_DIR)/bin/kos32-tcc
KPACK=kpack
SRC= src/common.c \
src/errors.c \
src/expression.c \
src/formatter.c \
src/generatec.c \
src/interpret.c \
src/options.c \
src/parser.c \
src/statement.c \
src/tinybasic.c \
src/token.c \
src/tokeniser.c
CFLAGS= -D_KOLIBRI -I$(KLIBC_DIR)/include -I inc
LFLAGS= -nobss -nostdlib -L $(KLIBC_DIR)/lib $(KLIBC_DIR)/lib/crt0.o
LIBS = -ltcc -lc.obj
all:
$(KTCC) $(CFLAGS) $(SRC) $(LFLAGS) $(LIBS) -o $(NAME)
$(KPACK) $(NAME)
clean:
rm $(NAME)

View File

@ -1,26 +1,25 @@
if tup.getconfig("NO_TCC") ~= "" then return end if tup.getconfig("NO_TCC") ~= "" then return end
if tup.getconfig("HELPERDIR") == ""
then
HELPERDIR = "../../../programs"
end
tup.include(HELPERDIR .. "/use_tcc.lua")
TCC="kos32-tcc" CFLAGS = CFLAGS .. " -Iinc "
CFLAGS = "-D_KOLIBRI -I../ktcc/trunk/libc.obj/include -I inc" SRCS = {
LDFLAGS = "-nostdlib -L../ktcc/trunk/bin/lib ../ktcc/trunk/bin/lib/crt0.o" "src/common.c",
"src/errors.c",
"src/expression.c",
"src/formatter.c",
"src/generatec.c",
"src/interpret.c",
"src/options.c",
"src/parser.c",
"src/statement.c",
"src/tinybasic.c",
"src/token.c",
"src/tokeniser.c"
}
LIBS = "-ltcc -lc.obj" link_tcc(SRCS, "tinybasic");
SRC={"src/common.c",
"src/errors.c",
"src/expression.c",
"src/formatter.c",
"src/generatec.c",
"src/interpret.c",
"src/options.c",
"src/parser.c",
"src/statement.c",
"src/tinybasic.c",
"src/token.c",
"src/tokeniser.c",
};
COMMAND=string.format("%s %s %s %s %s", TCC, CFLAGS, LDFLAGS, "%f -o %o", LIBS)
tup.rule(SRC, COMMAND .. tup.getconfig("KPACK_CMD"), "tinybasic")

View File

@ -22,7 +22,7 @@
#ifdef _KOLIBRI #ifdef _KOLIBRI
#include <sys/ksys.h> #include <sys/ksys.h>
#define KTCC_BIN "/kolibrios/develop/tcc/tcc" #define KTCC_BIN "/kolibrios/develop/tcc/tcc"
#define KTCC_FLAGS "-nobss %s -o %s -ltcc -lc.obj" #define KTCC_FLAGS "-nobss %s -o %s"
#endif #endif
/* static variables */ /* static variables */