что-то вроде этого:
Code: Select all
include '../../../macros.inc'
if varible from macros not exist
include 'rd1/macros.inc'
endif
Code: Select all
include '../../../macros.inc'
if varible from macros not exist
include 'rd1/macros.inc'
endif
Code: Select all
$ cat main.asm
include 'blah.inc'
display 'hi, ', NAME
db NAME
$ cat one/blah.inc
NAME equ 'Alice'
$ cat two/blah.inc
NAME equ 'Bob'
$ INCLUDE='one;two' fasm main.asm main
flat assembler version 1.73.28 (16384 kilobytes memory, x64)
hi, Alice
1 passes, 5 bytes.
$ hexdump -C main
00000000 41 6c 69 63 65 |Alice|
00000005
$ INCLUDE='two;one' fasm main.asm main
flat assembler version 1.73.28 (16384 kilobytes memory, x64)
hi, Bob
1 passes, 3 bytes.
$ hexdump -C main
00000000 42 6f 62 |Bob|
00000003
Code: Select all
if FASM_OS = 'Kolibri'
include '/sys/macros.inc' ; path for build in KOS
else
include '../../../macros.inc' ; path for build in SVN
endif
Code: Select all
FASM_OS equ KOLIBRIOS
match =KOLIBRIOS, FASM_OS {
include 'one/blah.inc'
}
match =LINUX, FASM_OS {
include 'two/blah.inc'
}
Code: Select all
match =AUTOBUILD,AUTOBUILD {
include 'one/blah.inc'
}
match =YES, AUTOBUILD {
include 'two/blah.inc'
}
Code: Select all
match =NOTHING,AUTOBUILD {
include ''/sys/lang.inc'
include ''/sys/macros.inc'
}
match =YES, AUTOBUILD {
include 'lang.inc'
include '../../../macros.inc'
}
Users browsing this forum: No registered users and 1 guest