OSDN Git Service

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