The OPT keyword
OPT may be followed by:
MODULEDeclare source as module.EXPORTExport everything from module, except PRIVATE stuff.NOWARNDisable the output of all warnings.-
OSVERSIONECX 1.6.0+ Explicitly define the minimum os version we require. ECX will warn if we make use of a module with a version number higher than the version we have requested with OPT OSVERSION, but only if the module in question contains code. Startup will fail as usual if started on a version of the os < OSVERSION.If OSVERION is not defined, ECX will automatically set it to the highest OSVERSION of any module used, that contains code, otherwise leave it to zero. ECX shows the osversion in the normal shell output, if it is > 0. Note that the startup may require a higher osversion than the one you have defined..
Input / output / paths
DIRAdd another directory to the list of directories to search for modules in. Directory will be placed at top of list. Multiple directories may be specified, the right-most will get searched first. ex: OPT DIR = ‘ecymodules: bla:urgh/’.EXENAMETell ECX to name resulting executable/library differently. Filename only, does not alter directory. Example:OPT EXENAME = 'myfantasticexe'MODNAMETell ECX to name resulting module differently. Filename only, does not alter directory. ‘.m’ will get appended to name. Example:OPT MODNAME = 'myfantasticmod'Compatibility
ASMDoes nothing. For compatibility.LARGEFor compatibility. does nothing.FPEXPFor compatibility with CreativE. Turns on OPT ROUNDNEAR.Optimisation
REGDoes the same as NUMREGALLOC/N command line option. ex: “REG=5”.FREGLike REG, but for DOUBLE vars.Preprocessing
PREPROCESSEnable preprocessing of source.Targets
POWERPCDEPRECATED,OBSOLETE Does the same as MORPHOS.AMIGAOSCompile code for AmigaOS.AMIGAOS4Compile code for AmigaOS4.MORPHOSCompile code for MorphOS.NATURALALIGNForces natural alignment of OBJECT members, that is LONG at 4-byte boundaries, DOUBLE at 8-byte boundaries, etc.ROUNDNEARMake integer to float conversion round to nearest instead of the default towards zero.
Startupcode
-
STACKManually set the stacksize that startupcode will allocate. ex :OPT STACK=50000 -
MINSTARTUPA very minimal startup code will be used. No libraries are opened (except execbase). No stdin, stdout or wbmessage. Built-in memory functions, exceptions, globals, inline lists, will work. Avoid using mixed code (ppc+68k). (Similar to CreativE’sOPT NOSTARTUP. Sorry for name confusion.NOSTARTUPworks different with ECX, see below). NOSTARTUPNo startupcode will be used. Execution will start at the first piece of code in the main source (through a jump though). Nothing is initialised at this point. Immediate lists will not work, neither will any global variables or exceptions.Other
NODEFMODSDisable loading of the default modules: exec.m,dos.m,intuition.m,graphics.m