2 Copyright © 1995-2010, The AROS Development Team. All rights reserved.
4 Desc: Define the C structure for storing the command line options and the
13 #include "functionhead.h"
14 #include "stringlist.h"
16 enum command
{ CMD_UNSPECIFIED
, DUMMY
, FILES
, LIBDEFS
, INCLUDES
, MAKEFILE
, WRITEFUNCLIST
};
17 enum modtype
{ UNSPECIFIED
, LIBRARY
, MCC
, MUI
, MCP
, DEVICE
, RESOURCE
, IMAGE
, GADGET
,
18 DATATYPE
, CLASS
, HIDD
, USBCLASS
21 enum optionbit
{ BIT_NOAUTOLIB
, BIT_NOEXPUNGE
, BIT_NORESIDENT
,
22 BIT_DUPBASE
, BIT_DUPPERID
, BIT_INCLUDES
, BIT_NOINCLUDES
,
23 BIT_STUBS
, BIT_NOSTUBS
, BIT_AUTOINIT
, BIT_NOAUTOINIT
,
24 BIT_RESAUTOINIT
, BIT_NOOPENCLOSE
, BIT_SELFINIT
28 OPTION_NOAUTOLIB
= 1<<BIT_NOAUTOLIB
,
29 OPTION_NOEXPUNGE
= 1<<BIT_NOEXPUNGE
,
30 OPTION_NORESIDENT
= 1<<BIT_NORESIDENT
,
31 OPTION_DUPBASE
= 1<<BIT_DUPBASE
,
32 OPTION_DUPPERID
= 1<<BIT_DUPPERID
,
33 OPTION_INCLUDES
= 1<<BIT_INCLUDES
,
34 OPTION_NOINCLUDES
= 1<<BIT_NOINCLUDES
,
35 OPTION_STUBS
= 1<<BIT_STUBS
,
36 OPTION_NOSTUBS
= 1<<BIT_NOSTUBS
,
37 OPTION_AUTOINIT
= 1<<BIT_AUTOINIT
,
38 OPTION_NOAUTOINIT
= 1<<BIT_NOAUTOINIT
,
39 OPTION_RESAUTOINIT
= 1<<BIT_RESAUTOINIT
,
40 OPTION_NOOPENCLOSE
= 1<<BIT_NOOPENCLOSE
,
41 OPTION_SELFINIT
= 1<<BIT_SELFINIT
44 enum coptionbit
{ CBIT_PRIVATE
};
45 enum coptionflags
{ COPTION_PRIVATE
= 1<<CBIT_PRIVATE
};
47 enum intcfgbit
{ BIT_GENASTUBS
, BIT_NOREADREF
};
50 CFG_GENASTUBS
= 1<<BIT_GENASTUBS
,
51 CFG_NOREADREF
= 1<<BIT_NOREADREF
54 /* Classinfo is used to store the information of a BOOPSI class */
57 struct classinfo
*next
;
59 /* Type and name of the class */
60 enum modtype classtype
;
63 /* Priority with which the class will be initialized */
66 /* Additional options for the class */
67 enum coptionflags options
;
69 const char **boopsimprefix
;
70 char *classid
, *superclass
, *superclass_field
, *classptr_field
, *classptr_var
;
71 char *dispatcher
; /* == NULL when the generated dispatcher is used,
72 * otherwise it is the function name of the dispatcher */;
73 char *classdatatype
; /* The type of the data for every object */
75 struct functionhead
*methlist
;
77 /* Interfaces used in this class (only for HIDD classes) */
78 struct stringlist
*interfaces
;
83 /* members that store filename and paths derived from argv */
84 char *conffile
, *gendir
, *genincdir
, *reffile
;
86 /* The name and type of the module */
87 char *modulename
, *modulenameupper
;
91 /* firstlvo is the LVO number of the first user definable function
94 unsigned int firstlvo
;
99 /* Name for variables and types */
100 char *basename
, *libbase
, *libbasetype
, *libbasetypeptrextern
;
103 /* The default path to put the module relative to SYS: */
106 /* The names of the fields in the custom library base for storing internal
109 char *sysbase_field
, *seglist_field
, *rootbase_field
;
111 /* Some additional options, see optionsflags enum above */
112 enum optionflags options
;
114 /* Internal configuration flags */
115 enum intcfgflags intcfg
;
117 /* Further configuration data for the generated Resident struct */
118 char *datestring
, *copyright
;
120 unsigned int majorversion
, minorversion
;
122 /* In forcelist a list of basenames is present that need to be present in the
123 * static link library so that certain libraries are opened by a program
125 struct stringlist
*forcelist
;
127 /* Code to add to the generated files */
128 struct stringlist
*cdeflines
, *cdefprivatelines
, *startuplines
;
130 /* device specific data */
131 char *beginiofunc
, *abortiofunc
;
133 /* For option peridbase */
136 /* The functions of this module */
137 struct functionhead
*funclist
;
139 /* The classes defined in this module */
140 struct classinfo
*classlist
;
143 /* Function prototypes */
145 struct config
*initconfig(int, char **);
147 char* getBanner(struct config
*);
148 void freeBanner(char*);