2 Copyright © 1995-2004, The AROS Development Team. All rights reserved.
5 Function to write module_autoinit.c. Part of genmodule.
9 void writeautoinit(struct config
*cfg
)
14 snprintf(line
, 255, "%s/%s_autoinit.c", cfg
->gendir
, cfg
->modulename
);
15 out
= fopen(line
, "w");
26 "#include <proto/%s.h>\n"
27 "#include <aros/symbolsets.h>\n"
29 "ADD2LIBS(\"%s.library\",%u, %s, %s);\n",
30 getBanner(cfg
), cfg
->modulename
,
31 cfg
->modulename
, cfg
->majorversion
, cfg
->libbasetypeptrextern
, cfg
->libbase
34 if (cfg
->forcelist
!=NULL
)
36 struct stringlist
* forcelistit
;
39 for (forcelistit
= cfg
->forcelist
;
41 forcelistit
= forcelistit
->next
44 fprintf(out
, "extern struct Library *%s;\n", forcelistit
->s
);
46 fprintf(out
, "\nvoid __%s_forcelibs(void)\n{\n", cfg
->modulename
);
47 for (forcelistit
= cfg
->forcelist
;
49 forcelistit
= forcelistit
->next
52 fprintf(out
, " %s = NULL;\n", forcelistit
->s
);