Rev 9098 | Rev 9797 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
9098 | turbocat | 1 | if tup.getconfig("NO_GCC") ~= "" then return end |
2 | if tup.getconfig("HELPERDIR") == "" |
||
3 | then |
||
4 | if tup.getconfig("NO_NASM") ~= "" then return end -- required for SDL compilation |
||
5 | HELPERDIR = "../../programs" |
||
6 | end |
||
7 | tup.include(HELPERDIR .. "/use_gcc.lua") |
||
8 | |||
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 ]] |
||
10 | |||
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 " |
||
12 | |||
13 | |||
14 | DDK_SRC = { |
||
15 | "debug/dbglog.c", |
||
16 | "dma/dma_alloc.c", |
||
17 | "dma/fence.c", |
||
18 | "io/create.c", |
||
19 | "io/finfo.c", |
||
20 | "io/ssize.c", |
||
21 | "io/write.c", |
||
22 | "linux/bitmap.c", |
||
23 | "linux/ctype.c", |
||
24 | "linux/div64.c", |
||
25 | "linux/dmapool.c", |
||
26 | "linux/dmi.c", |
||
27 | "linux/fbsysfs.c", |
||
28 | "linux/find_next_bit.c", |
||
29 | "linux/firmware.c", |
||
30 | "linux/gcd.c", |
||
31 | "linux/hdmi.c", |
||
32 | "linux/hexdump.c", |
||
33 | "linux/idr.c", |
||
34 | "linux/interval_tree.c", |
||
35 | "linux/kasprintf.c", |
||
36 | "linux/kmap.c", |
||
37 | "linux/list_sort.c", |
||
38 | "linux/mutex.c", |
||
39 | "linux/rbtree.c", |
||
40 | "linux/scatterlist.c", |
||
41 | "linux/string.c", |
||
42 | "linux/time.c", |
||
43 | "linux/workqueue.c", |
||
44 | "malloc/malloc.c", |
||
45 | "stdio/vsprintf.c", |
||
46 | "string/strstr.c", |
||
47 | "string/_memmove.S", |
||
48 | "string/_strncat.S", |
||
49 | "string/_strncmp.S", |
||
50 | "string/_strncpy.S", |
||
51 | "string/_strnlen.S", |
||
52 | "string/bcmp.S", |
||
53 | "string/bcopy.S", |
||
54 | "string/bzero.S", |
||
55 | "string/index.S", |
||
56 | "string/memchr.S", |
||
57 | "string/memcmp.S", |
||
58 | "string/memcpy.S", |
||
59 | "string/memmove.S", |
||
60 | "string/memset.S", |
||
61 | "string/rindex.S", |
||
62 | "string/strcat.S", |
||
63 | "string/strchr.S", |
||
64 | "string/strcmp.S", |
||
65 | "string/strcpy.S", |
||
66 | "string/strlen.S", |
||
67 | "string/strncat.S", |
||
68 | "string/strncmp.S", |
||
69 | "string/strncpy.S", |
||
70 | "string/strnlen.S", |
||
71 | "string/strrchr.S", |
||
72 | "debug/chkstk.S" |
||
73 | } |
||
74 | |||
75 | compile_gcc(DDK_SRC) |
||
76 | tup.rule(OBJS, "kos32-ar -crs %o %f", "libddk.a"); |
||
77 | tup.rule("core.S", "kos32-as %f -o %o", "core.o"); |
||
9099 | turbocat | 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"}}); |
9098 | turbocat | 79 |