From 5052d133dafcb2c9fed42ee36d2eb730f4cde85a Mon Sep 17 00:00:00 2001 From: Coldy Date: Fri, 18 Feb 2022 18:41:31 +0000 Subject: [PATCH] eolite: switched to autoimport git-svn-id: svn://kolibrios.org@9719 a494cfbc-eb01-0410-851d-a64ba20cac60 --- programs/cmm/eolite/Tupfile.lua | 12 +++++++++++- programs/cmm/lib/obj/box_lib.h | 12 +++++++++++- 2 files changed, 22 insertions(+), 2 deletions(-) diff --git a/programs/cmm/eolite/Tupfile.lua b/programs/cmm/eolite/Tupfile.lua index 270ae4c7d6..4ea3222b4a 100644 --- a/programs/cmm/eolite/Tupfile.lua +++ b/programs/cmm/eolite/Tupfile.lua @@ -1,6 +1,16 @@ if tup.getconfig("NO_CMM") ~= "" then return end +if tup.getconfig("NO_TCC") ~= "" then return end +HELPERDIR = (tup.getconfig("HELPERDIR") == "") and "../.." or tup.getconfig("HELPERDIR") +tup.include(HELPERDIR .. "/use_tcc.lua") + if tup.getconfig("LANG") == "ru" then C_LANG = "LANG_RUS" else C_LANG = "LANG_ENG" -- this includes default case without config end -tup.rule("Eolite.c", "c-- /D=$(C_LANG) %f" .. tup.getconfig("KPACK_CMD"), "Eolite.com") + +LFLAGS = LFLAGS .. " -stack=20480" +LIBS = LIBS .. " ../../develop/ktcc/trunk/bin/lib/tiny.o -nostdlib -lbox_lib -lini -limg" + +tup.rule("Eolite.c", "c-- -coff /D=" .. C_LANG .. " %f %o", "%B.obj") +tup.rule("Eolite.obj", "objconv -felf32 %f %o", "%B.o") +link_tcc("Eolite.o", "%B.com") diff --git a/programs/cmm/lib/obj/box_lib.h b/programs/cmm/lib/obj/box_lib.h index e2710a17ee..6e8f79c35f 100644 --- a/programs/cmm/lib/obj/box_lib.h +++ b/programs/cmm/lib/obj/box_lib.h @@ -8,7 +8,7 @@ #ifdef __COFF__ extern dword edit_box_draw; -extern dword edit_box_key; +extern dword edit_box_key_safe; extern dword edit_box_mouse; extern dword edit_box_set_text; @@ -24,6 +24,16 @@ extern dword progressbar_draw; extern dword progressbar_progress; extern dword frame_draw; + +/* + Legacy support + For new programs need to use edit_box_key_safe + TODO: change in all cmm programs edit_box_key to edit_box_key_safe, + after that delete #define below + +*/ +#define edit_box_key edit_box_key_safe + #else #ifndef INCLUDE_DLL_H #include "../lib/dll.h"