Subversion Repositories Kolibri OS

Rev

Rev 9666 | Rev 9844 | 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. HELPERDIR = (tup.getconfig("HELPERDIR") == "") and "../../../../../" or tup.getconfig("HELPERDIR")
  4. tup.include(HELPERDIR .. "/use_gcc.lua")
  5.  
  6. CFLAGS = " -c -nostdinc -DGNUC -D_BUILD_LIBC -Os -fno-common -fno-builtin -fno-leading-underscore -fno-pie"
  7. INCLUDES = " -I../include"
  8.  
  9. OBJS = {"math/tan.obj", "math/sqrt.obj"}
  10.  
  11. for _, OBJ in pairs(OBJS) do
  12.     tup.rule(string.gsub(OBJ, ".obj", ".asm"), "fasm %f %o ", OBJ)
  13. end
  14.  
  15. tup.rule("libc.c", "kos32-gcc" .. CFLAGS .. INCLUDES .. " -o %o %f ", "libc_tmp.obj")
  16.  
  17. table.insert(OBJS, "libc_tmp.obj");
  18. tup.rule(OBJS, "clink -o %o %f" .. " && kos32-strip %o --strip-unneeded " .. tup.getconfig("KPACK_CMD"), "libc.obj");
  19.