Subversion Repositories Kolibri OS

Rev

Rev 8831 | Blame | Compare with Previous | Last modification | View Log | Download | RSS feed

  1. if tup.getconfig("NO_TCC") ~= "" then return end
  2.  
  3. TCC="kos32-tcc"
  4. CFLAGS  = "-I../../develop/ktcc/trunk/libc.obj/include"
  5. LDFLAGS = "-nostdlib ../../develop/ktcc/trunk/bin/lib/crt0.o -L../../develop/ktcc/trunk/bin/lib"
  6.  
  7. if tup.getconfig("LANG") == "ru"
  8. then C_LANG = "LANG_RUS"
  9. else C_LANG = "LANG_ENG" -- this includes default case without config
  10. end
  11.  
  12. if tup.getconfig("TUP_PLATFORM") == "win32"
  13. -- on win32 '#' is not a special character, but backslash and quotes would be printed as is
  14. then tup.rule('echo #define ' .. C_LANG .. ' 1 > %o', {"lang.h"})
  15. -- on unix '#' should be escaped
  16. else tup.rule('echo "#define" ' .. C_LANG .. ' 1 > %o', {"lang.h"})
  17. end
  18.  
  19. LIBS = "-ltcc -lc.obj"
  20. COMMAND=string.format("%s %s %s %s %s", TCC, CFLAGS, LDFLAGS , "%f -o %o",  LIBS)
  21.  
  22. tup.rule({"shell.c", "system/kolibri.c", extra_inputs = {"lang.h"}}, COMMAND .. tup.getconfig("KPACK_CMD"), "shell")