Add use_fasm.lua and example: launch.

Now one can avoid ../../../../ includes and lang.inc files.

git-svn-id: svn://kolibrios.org@7127 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
Ivan Baravy 2017-12-05 07:29:50 +00:00
parent 6494817540
commit 3befb301cf
3 changed files with 25 additions and 5 deletions

View File

@ -1,2 +1,6 @@
if tup.getconfig("NO_FASM") ~= "" then return end
tup.rule("launch.asm", "fasm %f %o -dlang=" .. tup.getconfig("LANG") .. tup.getconfig("KPACK_CMD"), "launch")
HELPERDIR = (tup.getconfig("HELPERDIR") == "") and "../../.." or tup.getconfig("HELPERDIR")
tup.include(HELPERDIR .. "/use_fasm.lua")
add_include(HELPERDIR .. "/develop/libraries/libs-dev/libio")
tup.rule("launch.asm", FASM .. " -dlang=" .. tup.getconfig("LANG") .. " %f %o" .. tup.getconfig("KPACK_CMD"), "launch")

View File

@ -43,10 +43,10 @@ define DEBUG_MAX_LEN 8
define DEBUG_DEFAULT 0
define BUFF_SIZE 1024
include '../../../proc32.inc'
include '../../../macros.inc'
include '../../../develop/libraries/libs-dev/libio/libio.inc'
include '../../../dll.inc'
include 'proc32.inc'
include 'macros.inc'
include 'libio.inc'
include 'dll.inc'
purge mov

16
programs/use_fasm.lua Normal file
View File

@ -0,0 +1,16 @@
INCLUDES = ""
FASM_DEFAULT = "fasm"
function add_include(dir)
if INCLUDES == ""
then INCLUDES = dir
else INCLUDES = INCLUDES .. ";" .. dir
end
if tup.getconfig("TUP_PLATFORM") == "win32"
then env_prefix = "set INCLUDE='$(INCLUDES)'&&"
else env_prefix = "INCLUDE='$(INCLUDES)' "
end
FASM = env_prefix .. FASM_DEFAULT
end
add_include(tup.getcwd())