lmt_make.pl

[<<<] [>>>]

This perl script reads a file named `lmt_XXX.def' and creates the file `lmt_XXX.c' to help the linking of the external modules into ScriptBasic static.

The souce code of the file `lmt_make.pl' is:

#
# Use this program to automatically create the C table that lists the modules that are going to be
# linked statically to ScriptBasic. Do not edit the created C file, rather maintain one or more
# linkedmodules.def file and create one or more linkedmodules.c file
#
exit 0 unless defined(@$InputFile = shift);
@$OutputFile = @$InputFile;
This file was automatically created by the program lmt_make.pl
Rather edit the file @$InputFile that is the source 
END
unless( open(F,@$InputFile) ){
  print "Cannot open @$InputFile\n";
  exit 1;
  }
@$OUTL .= "MODLIST StaticallyLinkedModules[] ={\n";
for @$module (@ModuleList ){
  @$OUTL .= "  {\"@$module\" , (void *)" . uc(@$module) . "_SLFST },\n"
  }
@$OutputFile =~ s{def@$}{c};
open(OUT,">@$OutputFile") or die "Cannot open output file @$OutputFile";
print OUT @$OUTL;
close OUT;


[<<<] [>>>]