2 Copyright © 2012, The AROS Development Team. All rights reserved.
5 Function to write module_getlibbase.c. Part of genmodule.
10 void writegetlibbase(struct config
*cfg
, int is_rel
)
13 char line
[256], *banner
;
15 snprintf(line
, 255, "%s/%s_%sgetlibbase.c",
16 cfg
->gendir
, cfg
->modulename
, is_rel
? "rel" : ""
18 out
= fopen(line
, "w");
26 banner
= getBanner(cfg
);
27 fprintf(out
, "%s\n", banner
);
35 "%s__aros_getbase_%s(void)\n"
39 cfg
->libbasetypeptrextern
, cfg
->libbase
,
40 cfg
->libbasetypeptrextern
, cfg
->libbase
,
47 "#include <exec/types.h>\n"
48 "char *__aros_getoffsettable(void);\n"
49 "extern IPTR __aros_rellib_offset_%s;\n"
51 "%s__aros_getbase_%s(void)\n"
53 " return *((%s*)(__aros_getoffsettable()+__aros_rellib_offset_%s));\n"
56 cfg
->libbasetypeptrextern
, cfg
->libbase
,
57 cfg
->libbasetypeptrextern
, cfg
->libbase