1
0
mirror of https://github.com/KarolS/millfork.git synced 2026-04-20 03:16:45 +00:00

Detection of the default include path.

This commit is contained in:
Karol Stasiak
2018-12-24 02:38:28 +01:00
parent 7bf9616fcb
commit 438d8dbe6e
5 changed files with 83 additions and 18 deletions
+6 -1
View File
@@ -28,7 +28,12 @@ no extension for BBC micro program file,
* `-g` Generate also the label file. The label file contains labels with their addresses, with duplicates removed. It can be loaded into the monitor of the Vice emulator for debugging purposes. The file has the same name as the output file and the extension is `.lbl`.
* `-I <dir>;<dir>` The include directories. The current working directory is also an include directory. Those directories are searched for modules and platform definitions.
* `-I <dir>;<dir>` The include directories.
Those directories are searched for modules and platform definitions.
When searching for modules, the directory containing the file currently being compiled is also searched.
When searching for platform definitions, the current working directory is also searched.
If not given, the compiler will try to detect the default include directory.
If given, then the compiler will NOT try to detect the default include directory and you will have to add it to the list yourself.
* `-t <platform>` Target platform. It is loaded from an `.ini` file found in any of the include directories. See also [this document](target-platforms.md).
+6 -6
View File
@@ -18,7 +18,7 @@ void main(){
Compile it using the following commandline:
```
java -jar millfork.jar hello_world.mfk -o hello_world -t c64 -I path_to_millfork\include
java -jar millfork.jar hello_world.mfk -o hello_world -t c64
```
Run the output executable (here using the VICE emulator):
@@ -27,15 +27,13 @@ Run the output executable (here using the VICE emulator):
x64 hello_world.prg
```
## Basic commandline usage
## Basic command-line usage
The following options are crucial when compiling your sources:
The following options are obligatory when compiling your sources:
* `-o FILENAME` specifies the base name for your output file, an appropriate file extension will be appended (`prg` for Commodore, `xex` for Atari computers, `a2` for Apple, `asm` for assembly output, `lbl` for label file, `inf` for BBC file metadata, `dsk` for PC-88, `tap` for ZX Spectrum, `nes` for Famicom, `bin` for Atari 2600)
* `-I DIR;DIR;DIR;...` specifies the paths to directories with modules to include.
* `-t PLATFORM` specifies the target platform (`c64` is the default). Each platform is defined in an `.ini` file in the include directory. For the list of supported platforms, see [Supported platforms](target-platforms.md)
* `-t PLATFORM` specifies the target platform. Each platform is defined in an `.ini` file in the include directory. For the list of supported platforms, see [Supported platforms](target-platforms.md)
You may be also interested in the following:
@@ -57,3 +55,5 @@ You may be also interested in the following:
* `-Wall` enable all warnings
* `--help` list all commandline options
For the comprehensive list of command-line options, see [Command-line options](./command-line.md).