Subversion Repositories Kolibri OS

Rev

Rev 9099 | Go to most recent revision | Blame | Compare with Previous | Last modification | View Log | Download | RSS feed

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