The following still works, although the new C-ification technique (see directories pl2c, dynpl2c) can now create true one-file standalones.
<file>
or
<file>.pl
as follows:
?-make_appl(<file>).
main(X):-...
main(X):-toplevel(X).
$ ru newappl.bp
You can also generate (on UNIX systems) stand-alone executables that dynamically start the emulator (thanks to Peter Reintjes for suggesting this). You can do something like:
?- make_executable_unix_appl('./ru','progs/hello.pl','hello').
$ hello
co.pl
.
Again, we recommend using the C-ification technique which can already speed up most applications and in the future will generate very fast code competitive with native code compilers.
*.pl
files by:
?- boot. ?- make.
or, similarly for any other project having a top *.pro
file:
?-make(ProjectFile). ?-make(ProjectFile,Module).
or
?-cmake(ProjectFile). ?-cmake(ProjectFile,Module).
if you intend to generate C-code and possibly hide non-public predicates inside a module.
?-boot.