Subversion Repositories Kolibri OS

Rev

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

  1. if tup.getconfig("NO_FASM") ~= "" then return end
  2. if tup.getconfig("NO_GCC") ~= "" then return end
  3. tup.include("../../../programs/use_gcc.lua")
  4.  
  5. DRV_DIR = "../.."
  6. INCLUDES = string.format(" -I. -I. -I%s/include -I%s/include/linux -I%s/include/uapi ", DRV_DIR, DRV_DIR, DRV_DIR)
  7.  
  8. DEFINES = [[ -D__KERNEL__ -DGEODE_LOG="\"/tmp0/1/geode.log"\" -DCONFIG_X86_32 -DCONFIG_X86_L1_CACHE_SHIFT=6 -DCONFIG_ARCH_HAS_CACHE_LINE_SIZE -DCONFIG_PRINTK -DCONFIG_PCI ]]
  9. CFLAGS =  " -Os -fomit-frame-pointer -fno-builtin-printf " .. DEFINES
  10. LDFLAGS = " -nostdlib -shared -s --image-base 0 --file-alignment 512 --section-alignment 4096 -L../../ddk "
  11.  
  12. NAME = "geode.sys"
  13.  
  14. compile_gcc{ "geode.c" }
  15. OBJS.extra_inputs = {"../../ddk/libcore.a", "../../ddk/libddk.a"}
  16.  
  17. LIBS = " -lddk -lcore "
  18. tup.rule(OBJS, "kos32-ld" .. LDFLAGS .. "%f -o %o " .. LIBS .. tup.getconfig("KPACK_CMD"), NAME);
  19. tup.rule("geode.asm", "fasm %f %o " .. tup.getconfig("KPACK_CMD"), "geode")
  20.