1 bash ./bacon.bash myprog.bac
3 ./bacon.bash myprog.bac
7 ./bacon.bash http://www.basic-converter.org/fetch.bac
9 The BaCon Basic Converter can be started with the following parameters.
11 * -c: バイナリー(主に実行ファイル)を作成する C コンパイラーを指定します。 デフォルト値は「gcc」です。例: ./bacon -c cc prog …… C コンパイラーに cc を呼びます。
13 * -l: pass libraries to the C linker
15 * -o: pass compiler options to the C compiler
17 * -i: the compilation will use an additional external C include file
19 * -d: determine the directory where BaCon should store the generated C
20 files. Default value is the current directory
22 * -x: extract gettext strings from generated c sources
24 * -f: create a shared object of the program
26 * -n: do not compile the C code automatically after conversion
28 * -j: invoke C preprocessor to interpret C macros which were added to
31 * -p: do not cleanup the generated C files. Default behavior is to
32 delete all generated C files automatically
34 * -b: use bacon in the 'shebang' so BaCon programs can be executed
35 similar to a script (binary version of BaCon only)
37 * -w: store commandline settings in a configurationfile. This file
38 will be used in subsequent invocations of BaCon (not applicable for
41 * -v: shows the current version of BaCon
43 * -h: shows an overview of all possible options on the prompt. Same as
46 So how to pass compiler and linker flags to the C compiler? Here are a
49 * Convert and compile program with debug symbols: ./bacon -o -g
52 * Convert and compile program , optimize and strip: ./bacon -o -O2 -o
55 * Convert and compile program and export functions as symbols: ./bacon
56 -o -export-dynamic yourprogram.bac
58 * Convert and compile program using TCC and export functions as
59 symbols: ./bacon -c tcc -o -rdynamic yourprogram.bac
61 * Convert and compile program forcing 32bit and optimize for current
62 platform: ./bacon -o -m32 -o -mtune=native yourprogram.bac
64 * Convert and compile program linking to a particular library: ./bacon
65 -l somelib yourprogram.bac
67 * Convert and compile program including an additional C header file:
68 ./bacon -i header.h yourprogram.bac