forked from KolibriOS/kolibrios
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:
parent
0eb1f22eab
commit
aa8c354057
@ -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)
|
|
@ -1,26 +1,25 @@
|
|||||||
if tup.getconfig("NO_TCC") ~= "" then return end
|
if tup.getconfig("NO_TCC") ~= "" then return end
|
||||||
|
if tup.getconfig("HELPERDIR") == ""
|
||||||
TCC="kos32-tcc"
|
then
|
||||||
|
HELPERDIR = "../../../programs"
|
||||||
CFLAGS = "-D_KOLIBRI -I../ktcc/trunk/libc.obj/include -I inc"
|
end
|
||||||
LDFLAGS = "-nostdlib -L../ktcc/trunk/bin/lib ../ktcc/trunk/bin/lib/crt0.o"
|
tup.include(HELPERDIR .. "/use_tcc.lua")
|
||||||
|
|
||||||
LIBS = "-ltcc -lc.obj"
|
CFLAGS = CFLAGS .. " -Iinc "
|
||||||
|
|
||||||
SRC={"src/common.c",
|
SRCS = {
|
||||||
"src/errors.c",
|
"src/common.c",
|
||||||
"src/expression.c",
|
"src/errors.c",
|
||||||
"src/formatter.c",
|
"src/expression.c",
|
||||||
"src/generatec.c",
|
"src/formatter.c",
|
||||||
"src/interpret.c",
|
"src/generatec.c",
|
||||||
"src/options.c",
|
"src/interpret.c",
|
||||||
"src/parser.c",
|
"src/options.c",
|
||||||
"src/statement.c",
|
"src/parser.c",
|
||||||
"src/tinybasic.c",
|
"src/statement.c",
|
||||||
"src/token.c",
|
"src/tinybasic.c",
|
||||||
"src/tokeniser.c",
|
"src/token.c",
|
||||||
};
|
"src/tokeniser.c"
|
||||||
|
}
|
||||||
|
|
||||||
COMMAND=string.format("%s %s %s %s %s", TCC, CFLAGS, LDFLAGS, "%f -o %o", LIBS)
|
link_tcc(SRCS, "tinybasic");
|
||||||
tup.rule(SRC, COMMAND .. tup.getconfig("KPACK_CMD"), "tinybasic")
|
|
||||||
|
@ -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 */
|
||||||
|
Loading…
Reference in New Issue
Block a user