switch build system to Tup

git-svn-id: svn://kolibrios.org@5098 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
CleverMouse
2014-09-12 15:15:23 +00:00
parent 94776ec237
commit cd74d1af33
830 changed files with 17926 additions and 4404 deletions

View File

@@ -1792,19 +1792,19 @@ edit1 edit_box 20,427,320,0xffffff,0x6a9480,0,0xAABBCC,0,2,txt.edbox,ed_focus,ed
edit2 edit_box 240,2,2,0xffffff,0x6a9480,0,0xAABBCC,0,4096,buf_cmd_lin,ed_focus,2,0,0
virtual at 0
file 'MK_b3-34_hand.BMP':0xA,4
file 'MK_b3-34_hand.bmp':0xA,4
load offbits dword from 0
end virtual
palitra:
file 'MK_b3-34_hand.BMP':0x36,offbits-0x36
file 'MK_b3-34_hand.bmp':0x36,offbits-0x36
sizey = 262
sizex = 185 + 7
smesh = 3
bmp_file:
file 'MK_b3-34_hand.BMP':110
file 'MK_b3-34_hand.bmp':110
repeat sizey/2
y = % - 1
z = sizey - %

View File

@@ -0,0 +1,2 @@
if tup.getconfig("NO_FASM") ~= "" then return end
tup.rule("PrMK.asm", "fasm %f %o " .. tup.getconfig("KPACK_CMD"), "PrMK")

View File

@@ -0,0 +1,18 @@
if tup.getconfig("NO_FASM") ~= "" or tup.getconfig("NO_GCC") ~= "" then return end
HELPERDIR = (tup.getconfig("HELPERDIR") == "") and "../../.." or tup.getconfig("HELPERDIR")
tup.include(HELPERDIR .. "/use_gcc.lua")
LDFLAGS = LDFLAGS .. " -T kolibri.ld"
if tup.getconfig("LANG") == "ru"
then C_LANG = "LANG_RUS"
else C_LANG = "LANG_ENG" -- this includes default case without config
end
if tup.getconfig("TUP_PLATFORM") == "win32"
-- on win32 '#' is not a special character, but backslash and quotes would be printed as is
then tup.rule('echo #define ' .. C_LANG .. ' 1 > %o', {"lang.h"})
-- on unix '#' should be escaped
else tup.rule('echo "#define" ' .. C_LANG .. ' 1 > %o', {"lang.h"})
end
tup.append_table(OBJS, tup.rule("asm_code.asm", "fasm %f %o", "asm_code.obj"))
compile_gcc{"z80/z80.c", "system/kolibri.c", "system/stdlib.c", "system/string.c", "e80.c", extra_inputs = {"lang.h"}}
link_gcc("e80")

View File

@@ -17,4 +17,8 @@ SECTIONS
*(.bss)
}
Memory = . ;
/DISCARD/ : {
*(.comment)
*(.drectve)
}
}

View File

@@ -12,39 +12,40 @@
#define E_NOMEM 30
#define E_PARAM 33
#pragma pack(push, 1)
typedef struct
{
unsigned p00 __attribute__((packed));
unsigned p04 __attribute__((packed));
unsigned p08 __attribute__((packed));
unsigned p12 __attribute__((packed));
unsigned p16 __attribute__((packed));
char p20 __attribute__((packed));
char *p21 __attribute__((packed));
} kol_struct70 __attribute__((packed));
unsigned p00;
unsigned p04;
unsigned p08;
unsigned p12;
unsigned p16;
char p20;
char *p21;
} kol_struct70;
typedef struct
{
unsigned p00 __attribute__((packed));
char p04 __attribute__((packed));
char p05[3] __attribute__((packed));
unsigned p08 __attribute__((packed));
unsigned p12 __attribute__((packed));
unsigned p16 __attribute__((packed));
unsigned p20 __attribute__((packed));
unsigned p24 __attribute__((packed));
unsigned p28 __attribute__((packed));
unsigned p32[2] __attribute__((packed));
unsigned p40 __attribute__((packed));
} kol_struct_BDVK __attribute__((packed));
unsigned p00;
char p04;
char p05[3];
unsigned p08;
unsigned p12;
unsigned p16;
unsigned p20;
unsigned p24;
unsigned p28;
unsigned p32[2];
unsigned p40;
} kol_struct_BDVK;
typedef struct
{
char *name __attribute__((packed));
void *data __attribute__((packed));
} kol_struct_import __attribute__((packed));
char *name;
void *data;
} kol_struct_import;
#pragma pack(pop)
void kol_exit();

View File

@@ -0,0 +1,2 @@
if tup.getconfig("NO_FASM") ~= "" then return end
tup.rule("keyZXtst.asm", "fasm %f %o " .. tup.getconfig("KPACK_CMD"), "keyZXtst")