95 | | TODO Sections |
96 | | * Files:file |
97 | | * Controlling type of executable built -target/-t |
98 | | * Providing references and library search path -reference/-ref -library-directory/-lib -embed-run-time/-ert |
| 95 | === '''-files:filename''' === |
| 96 | Specify a filename containing a list of files to compile. |
| 97 | |
| 98 | Files are specified one sourcefile name per line and lines may be space separated. |
| 99 | Lines containing a leading '#' are ignored as comment or documentary information |
| 100 | |
| 101 | Source filenames should be given as specified on the command line ( filenames,partial or absolute pathnames with or without an explicit '.cobra' suffix'). |
| 102 | |
| 103 | This option is an accumulator so multiple occurrences will specify multiple files whoose contents will aggregate together. |
| 104 | |
| 105 | e.g. |
| 106 | Given a file named srcFiles containing |
| 107 | {{{ |
| 108 | #srcFiles: cobra source files for ... |
| 109 | |
| 110 | main.cobra |
| 111 | input |
| 112 | |
| 113 | #Useful utilities local to this project |
| 114 | utils.cobra |
| 115 | }}} |
| 116 | |
| 117 | the following compilation line |
| 118 | {{{ |
| 119 | cobra -c -files:srcFiles |
| 120 | }}} |
| 121 | is exactly the same as |
| 122 | {{{ |
| 123 | cobra -c main.cobra input utils.cobra |
| 124 | # which is the same as |
| 125 | #cobra -c main.cobra input.cobra utils.cobra |
| 126 | }}} |
| 127 | |
| 128 | This is useful compiling an executable with a large number of or non trivial hierarchy of source files. |
| 129 | |
| 130 | |
| 131 | |
| 132 | === '''-target/-t''' === |
| 133 | Specifies the types of executable built where such needs specifying explicitly (.Net). |
| 134 | |
| 135 | Current examples include: executable, GUI executable, Library. |
| 136 | |
| 137 | Defaults to 'normal' executable |
| 138 | |
| 139 | Values of this option can be a choice of one of : |
| 140 | * exe - build a normal executable |
| 141 | * winexe - build a windows executable ( .Net) |
| 142 | * Program is assumed to be a GUI program providing its own windows. |
| 143 | * Suppresses creation of a console window if not run from a console. |
| 144 | * lib - build a Library file (a .dll on .Net) |
| 145 | * module - build a module |
| 146 | |
| 147 | {{{ |
| 148 | e.g. |
| 149 | cobra -c codeFile.cobra |
| 150 | # build/compile a standard executable from cobra source in codeFile.cobra |
| 151 | |
| 152 | cobra -c -t:exe codeFile.cobra |
| 153 | # same as above |
| 154 | |
| 155 | cobra -c -t:winexe codeFile.cobra |
| 156 | # compile a windows(GUI) executable from cobra source in codeFile.cobra |
| 157 | |
| 158 | cobra -c -t:lib codeFile.cobra |
| 159 | # build/compile a library file (dll) from cobra source in codeFile.cobra |
| 160 | # this is intended to be used as the target of a -ref option |
| 161 | }}} |
| 162 | |
| 163 | |
| 164 | |
| 165 | === TODO Sections === |
| 166 | * Providing references and library search path -library-directory/-lib -embed-run-time/-ert |