+
+ /* #pragma library library_module */
+ if(startsWith(ptr, "library")) {
+ char *lmodule = strtok((char *)NULL, WHITE);
+
+ if(lmodule) {
+ /* lmodule can be:
+ * c link the C library
+ * math link the math library
+ * io link the IO library
+ * debug link the debug libary
+ * anything else, will link as-is */
+ if(!strcmp(lmodule, "c"))libflags.want_libc = 1;
+ else if(!strcmp(lmodule, "math"))libflags.want_libm = 1;
+ else if(!strcmp(lmodule, "io"))libflags.want_libio = 1;
+ else if(!strcmp(lmodule, "debug"))libflags.want_libdebug = 1;
+ else if(!strcmp(lmodule, "ignore"))libflags.ignore = 1;
+ else {
+ if(!libflags.ignore) {
+ fprintf(stderr, "link library %s\n", lmodule);
+ addSetHead(&libFilesSet, lmodule);
+ }
+ }
+ }
+
+ return 0;
+ }
+
+