Subversion Repositories Kolibri OS

Rev

Rev 9099 | Go to most recent revision | Only display areas with differences | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 9099 Rev 9797
1
if tup.getconfig("NO_GCC") ~= "" then return end
1
if tup.getconfig("NO_GCC") ~= "" then return end
2
if tup.getconfig("HELPERDIR") == ""
2
if tup.getconfig("HELPERDIR") == ""
3
then
3
then
4
  if tup.getconfig("NO_NASM") ~= "" then return end -- required for SDL compilation
-
 
5
  HELPERDIR = "../../programs"
4
  HELPERDIR = "../../programs"
6
end
5
end
7
tup.include(HELPERDIR .. "/use_gcc.lua")
6
tup.include(HELPERDIR .. "/use_gcc.lua")
8
 
7
 
9
CFLAGS =[[ -c -Os -march=i686 -fomit-frame-pointer -fno-builtin-printf -mno-stack-arg-probe -mpreferred-stack-boundary=2 -mincoming-stack-boundary=2 -fno-ident -UWIN32 -U_WIN32 -U__WIN32__ -D_KOLIBRI -DKOLIBRI -D__KERNEL__ -DCONFIG_X86_32 -DCONFIG_DMI -DCONFIG_TINY_RCU -DCONFIG_X86_L1_CACHE_SHIFT=6 -DCONFIG_ARCH_HAS_CACHE_LINE_SIZE -DCONFIG_PRINTK -I../include -I../include/asm -I../include/uapi -I../include/drm ]]
8
CFLAGS =[[ -c -Os -march=i686 -fomit-frame-pointer -fno-builtin-printf -mno-stack-arg-probe -mpreferred-stack-boundary=2 -mincoming-stack-boundary=2 -fno-ident -UWIN32 -U_WIN32 -U__WIN32__ -D_KOLIBRI -DKOLIBRI -D__KERNEL__ -DCONFIG_X86_32 -DCONFIG_DMI -DCONFIG_TINY_RCU -DCONFIG_X86_L1_CACHE_SHIFT=6 -DCONFIG_ARCH_HAS_CACHE_LINE_SIZE -DCONFIG_PRINTK -I../include -I../include/asm -I../include/uapi -I../include/drm ]]
10
 
9
 
11
LDFLAGS = " -nostdlib -shared -s --major-os-version 0 --minor-os-version 7 --major-subsystem-version 0 --minor-subsystem-version 5 --subsystem native  -T../drv.lds --image-base 0 --file-alignment 512 --section-alignment 4096 -L../../../contrib/sdk/lib -L../../ddk "
10
LDFLAGS = " -nostdlib -shared -s --major-os-version 0 --minor-os-version 7 --major-subsystem-version 0 --minor-subsystem-version 5 --subsystem native  -T../drv.lds --image-base 0 --file-alignment 512 --section-alignment 4096 -L../../../contrib/sdk/lib -L../../ddk "
12
 
11
 
13
 
12
 
14
DDK_SRC = {
13
DDK_SRC = {
15
    "debug/dbglog.c",
14
    "debug/dbglog.c",
16
    "dma/dma_alloc.c",
15
    "dma/dma_alloc.c",
17
    "dma/fence.c",
16
    "dma/fence.c",
18
    "io/create.c",
17
    "io/create.c",
19
    "io/finfo.c",
18
    "io/finfo.c",
20
    "io/ssize.c",
19
    "io/ssize.c",
21
    "io/write.c",
20
    "io/write.c",
22
    "linux/bitmap.c",
21
    "linux/bitmap.c",
23
    "linux/ctype.c",
22
    "linux/ctype.c",
24
    "linux/div64.c",
23
    "linux/div64.c",
25
    "linux/dmapool.c",
24
    "linux/dmapool.c",
26
    "linux/dmi.c",
25
    "linux/dmi.c",
27
    "linux/fbsysfs.c",
26
    "linux/fbsysfs.c",
28
    "linux/find_next_bit.c",
27
    "linux/find_next_bit.c",
29
    "linux/firmware.c",
28
    "linux/firmware.c",
30
    "linux/gcd.c",
29
    "linux/gcd.c",
31
    "linux/hdmi.c",
30
    "linux/hdmi.c",
32
    "linux/hexdump.c",
31
    "linux/hexdump.c",
33
    "linux/idr.c",
32
    "linux/idr.c",
34
    "linux/interval_tree.c",
33
    "linux/interval_tree.c",
35
    "linux/kasprintf.c",
34
    "linux/kasprintf.c",
36
    "linux/kmap.c",
35
    "linux/kmap.c",
37
    "linux/list_sort.c",
36
    "linux/list_sort.c",
38
    "linux/mutex.c",
37
    "linux/mutex.c",
39
    "linux/rbtree.c",
38
    "linux/rbtree.c",
40
    "linux/scatterlist.c",
39
    "linux/scatterlist.c",
41
    "linux/string.c",
40
    "linux/string.c",
42
    "linux/time.c",
41
    "linux/time.c",
43
    "linux/workqueue.c",
42
    "linux/workqueue.c",
44
    "malloc/malloc.c",
43
    "malloc/malloc.c",
45
    "stdio/vsprintf.c",
44
    "stdio/vsprintf.c",
46
    "string/strstr.c",
45
    "string/strstr.c",
47
    "string/_memmove.S",
46
    "string/_memmove.S",
48
    "string/_strncat.S",
47
    "string/_strncat.S",
49
    "string/_strncmp.S",
48
    "string/_strncmp.S",
50
    "string/_strncpy.S",
49
    "string/_strncpy.S",
51
    "string/_strnlen.S",
50
    "string/_strnlen.S",
52
    "string/bcmp.S",
51
    "string/bcmp.S",
53
    "string/bcopy.S",
52
    "string/bcopy.S",
54
    "string/bzero.S",
53
    "string/bzero.S",
55
    "string/index.S",
54
    "string/index.S",
56
    "string/memchr.S",
55
    "string/memchr.S",
57
    "string/memcmp.S",
56
    "string/memcmp.S",
58
    "string/memcpy.S",
57
    "string/memcpy.S",
59
    "string/memmove.S",
58
    "string/memmove.S",
60
    "string/memset.S",
59
    "string/memset.S",
61
    "string/rindex.S",
60
    "string/rindex.S",
62
    "string/strcat.S",
61
    "string/strcat.S",
63
    "string/strchr.S",
62
    "string/strchr.S",
64
    "string/strcmp.S",
63
    "string/strcmp.S",
65
    "string/strcpy.S",
64
    "string/strcpy.S",
66
    "string/strlen.S",
65
    "string/strlen.S",
67
    "string/strncat.S",
66
    "string/strncat.S",
68
    "string/strncmp.S",
67
    "string/strncmp.S",
69
    "string/strncpy.S",
68
    "string/strncpy.S",
70
    "string/strnlen.S",
69
    "string/strnlen.S",
71
    "string/strrchr.S",
70
    "string/strrchr.S",
72
    "debug/chkstk.S"
71
    "debug/chkstk.S"
73
}
72
}
74
 
73
 
75
compile_gcc(DDK_SRC)
74
compile_gcc(DDK_SRC)
76
tup.rule(OBJS, "kos32-ar -crs %o %f", "libddk.a");
75
tup.rule(OBJS, "kos32-ar -crs %o %f", {"libddk.a", extra_outputs={""}});
77
tup.rule("core.S", "kos32-as %f -o %o", "core.o");
76
tup.rule("core.S", "kos32-as %f -o %o", "core.o");
78
tup.rule("core.o", "kos32-ld -shared -s --out-implib %o --output-def core.def -o core.dll %f", {"libcore.a", extra_outputs={"core.def", "core.dll"}});
77
tup.rule("core.o", "kos32-ld -shared -s --out-implib %o --output-def core.def -o core.dll %f", {"libcore.a", extra_outputs={"core.def", "core.dll", ""}});
79
-
 
80
-
 
81
-