~ chicken-core (chicken-5) 8ac1eea5f9f7547a03438175506b4ed00fed3300
commit 8ac1eea5f9f7547a03438175506b4ed00fed3300 Author: felix <felix@call-with-current-continuation.org> AuthorDate: Sun Jul 17 23:42:45 2011 +0200 Commit: felix <felix@call-with-current-continuation.org> CommitDate: Sun Jul 17 23:42:45 2011 +0200 added build-version.c to manual where it talks about deploying compiled .c files diff --git a/manual/Deployment b/manual/Deployment index 8a82866e..467ae801 100644 --- a/manual/Deployment +++ b/manual/Deployment @@ -172,7 +172,8 @@ An alternative to deploying binaries is deployment as compiled C sources. Usually, you just need to ship your application code, compiled to {{.c}} files and the {{chicken.h}} and {{runtime.c}} files from the CHICKEN sources. You will also need the {{.c}} files -of any library units your program uses. Compiling everything and +of any library units your program uses (at least {{library.c}} and +{{build-version.c}}). Compiling everything and linking it together should work on most systems. Consult the CHICKEN makefiles for more information about optimization options, etc. diff --git a/manual/Using the compiler b/manual/Using the compiler index 8949e9df..41af02f7 100644 --- a/manual/Using the compiler +++ b/manual/Using the compiler @@ -442,10 +442,10 @@ Let's take a simple example. Compiled to C, we get {{hello.c}}. We need the files {{chicken.h}} and {{runtime.c}}, which contain the basic runtime system, plus the three -basic library files {{library.c}}, {{eval.c}} and {{extras.c}} which -contain the same functionality as the library linked into a plain -CHICKEN-compiled application, or which is available by default in the -interpreter, {{csi}}: +basic library files {{library.c}}, {{eval.c}} and {{build-version.c}} +which contain the same functionality as the library linked into a +plain CHICKEN-compiled application, or which is available by default +in the interpreter, {{csi}}: % cd /tmp %echo '(print "Hello World.")' > hello.scm @@ -453,12 +453,13 @@ interpreter, {{csi}}: % cp $CHICKEN_BUILD/library.c . % cp $CHICKEN_BUILD/eval.c . % cp $CHICKEN_BUILD/extras.c . - % gcc -static -Os -fomit-frame-pointer runtime.c library.c eval.c \ - extras.c hello.c -o hello -lm + % gcc -static -Os -fomit-frame-pointer runtime.c build-version.c library.c eval.c \ + hello.c -o hello -lm Now we have all files together, and can create an tarball containing all the files: - % tar cf hello.tar Makefile hello.c runtime.c library.c eval.c extras.c chicken.h + % tar cf hello.tar Makefile hello.c runtime.c build-version.c library.c eval.c extras.c \ + chicken.h % gzip hello.tar This is naturally rather simplistic. Things like enabling dynamic loading, estimating @@ -466,11 +467,11 @@ the optimal stack-size and selecting supported features of the host system would more configuration- and build-time support. All this can be addressed using more elaborate build-scripts, makefiles or by using autoconf/automake. -Note also that the size of the application can still be reduced by removing {{extras}} and +Note also that the size of the application can still be reduced by removing {{eval}} and compiling {{hello.scm}} with the {{-explicit-use}} option. -For more information, study the CHICKEN source code and/or get in -contact with the author. +For more information, study the CHICKEN source code and/or ask on the CHICKEN +mailing list. --- Previous: [[Basic mode of operation]]Trap