t_jvm.pas 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107
  1. {
  2. Copyright (c) 2010 by Jonas Maebe
  3. This unit implements support import,export,link routines
  4. for the JVM target
  5. This program is free software; you can redistribute it and/or modify
  6. it under the terms of the GNU General Public License as published by
  7. the Free Software Foundation; either version 2 of the License, or
  8. (at your option) any later version.
  9. This program is distributed in the hope that it will be useful,
  10. but WITHOUT ANY WARRANTY; without even the implied warranty of
  11. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  12. GNU General Public License for more details.
  13. You should have received a copy of the GNU General Public License
  14. along with this program; if not, write to the Free Software
  15. Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  16. ****************************************************************************
  17. }
  18. unit t_jvm;
  19. {$i fpcdefs.inc}
  20. interface
  21. implementation
  22. uses
  23. sysutils,
  24. cutils,cfileutl,cclasses,
  25. verbose,systems,globtype,globals,
  26. symconst,cscript,
  27. fmodule,aasmbase,aasmtai,aasmdata,aasmcpu,cpubase,symsym,symdef,
  28. import,export,link,comprsrc,rescmn,i_jvm,
  29. cgutils,cgbase,cgobj,cpuinfo,ogbase;
  30. type
  31. timportlibjvm=class(timportlib)
  32. procedure generatelib;override;
  33. end;
  34. texportlibjvm=class(texportlib)
  35. end;
  36. tlinkerjvm=class(texternallinker)
  37. constructor Create;override;
  38. function MakeExecutable:boolean;override;
  39. function MakeSharedLibrary:boolean;override;
  40. end;
  41. {*****************************************************************************
  42. TIMPORTLIBJVM
  43. *****************************************************************************}
  44. procedure timportlibjvm.generatelib;
  45. begin
  46. end;
  47. {*****************************************************************************
  48. TEXPORTLIBJVM
  49. *****************************************************************************}
  50. {*****************************************************************************
  51. TLINKERJVM
  52. *****************************************************************************}
  53. Constructor tlinkerjvm.Create;
  54. begin
  55. Inherited Create;
  56. end;
  57. function tlinkerjvm.MakeExecutable:boolean;
  58. begin
  59. result:=true;
  60. end;
  61. Function tlinkerjvm.MakeSharedLibrary:boolean;
  62. begin
  63. result:=false;
  64. end;
  65. {*****************************************************************************
  66. Initialize
  67. *****************************************************************************}
  68. initialization
  69. RegisterLinker(ld_jvm, tlinkerjvm);
  70. RegisterImport(system_jvm_java32,timportlibjvm);
  71. RegisterExport(system_jvm_java32,texportlibjvm);
  72. RegisterTarget(system_jvm_java32_info);
  73. RegisterImport(system_jvm_android32,timportlibjvm);
  74. RegisterExport(system_jvm_android32,texportlibjvm);
  75. RegisterTarget(system_jvm_android32_info);
  76. RegisterRes(res_jvmraw_info,TJVMRawResourceFile);
  77. end.