forked from KolibriOS/kolibrios
switch build system to Tup
git-svn-id: svn://kolibrios.org@5098 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
7
programs/develop/libraries/gblib/example/Tupfile.lua
Normal file
7
programs/develop/libraries/gblib/example/Tupfile.lua
Normal file
@@ -0,0 +1,7 @@
|
||||
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"
|
||||
tup.append_table(OBJS, tup.rule("asm_code.asm", "fasm %f %o", "asm_code.o"))
|
||||
compile_gcc{"example.c", "system/kolibri.c", "system/stdlib.c", "system/string.c"}
|
||||
link_gcc("example")
|
@@ -1,11 +1,13 @@
|
||||
|
||||
#pragma pack(push, 1)
|
||||
typedef struct
|
||||
{
|
||||
int w __attribute__((packed));
|
||||
int h __attribute__((packed));
|
||||
char *bmp __attribute__((packed));
|
||||
char *alpha __attribute__((packed));
|
||||
} GB_BMP __attribute__((packed));
|
||||
int w;
|
||||
int h;
|
||||
char *bmp;
|
||||
char *alpha;
|
||||
} GB_BMP;
|
||||
#pragma pack(pop)
|
||||
|
||||
|
||||
void (* __stdcall gb_pixel_set)(GB_BMP *b, int x, int y, unsigned c);
|
||||
|
@@ -17,4 +17,8 @@ SECTIONS
|
||||
*(.bss)
|
||||
}
|
||||
Memory = . ;
|
||||
/DISCARD/ : {
|
||||
*(.comment)
|
||||
*(.drectve)
|
||||
}
|
||||
}
|
||||
|
@@ -1,38 +1,40 @@
|
||||
|
||||
#define NULL ((void*)0)
|
||||
|
||||
#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();
|
||||
|
Reference in New Issue
Block a user