Changeset 3288
- Timestamp:
- May 2, 2007, 10:31:33 PM (18 years ago)
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/libc-0.6/src/emx/src/emxomf/emxomfld.c
r3106 r3288 163 163 var. using any of the values WLINK, VAC365, VAC308 and LINK386. */ 164 164 static const char *linker_type = "VAC365"; 165 166 /* The name of the resource compiler to use. By default, rc is used. 167 This can be overridden with the EMXOMFLD_RC environment variable. */ 168 static const char *rc_name = "rc.exe"; 169 170 /* The type of resource compiler to use. By default we assume it's 171 IBM resource compiler. This can be overridden with the EMXOMFLD_RC_TYPE 172 env. var. using any of the values RC, WRC. */ 173 static const char *rc_type = "RC"; 165 174 166 175 /* Non-zero if emxomfld should automatically convert a.out objects and … … 1526 1535 " linker name or path is not supported. Quotes are not supported either.\n" 1527 1536 "The default values for these two variables are VAC365 and ilink.exe.\n", stderr); 1537 fputs (" EMXOMFLD_RC_TYPE:\n" 1538 " The type of resource compiler we're using. Values: RC,WRC.\n" 1539 " RC rc.exe as shipped with OS/2 or found in the Toolkit\n" 1540 " WRC wrc.exe from Open Watcom v1.6 or later.\n", stderr); 1541 fputs (" EMXOMFLD_RC:\n" 1542 " Name of the resource compiler to use and optionally extra parameters.\n" 1543 " Spaces or quotes in the name or path are not supported.\n" 1544 "The default values for these two variables are RC and rc.exe.\n", stderr); 1528 1545 exit (1); 1529 1546 } … … 1832 1849 t = getenv ("EMXOMFLD_TYPE"); 1833 1850 if ( t 1834 && stricmp (t, "WLINK")1835 && stricmp (t, "VAC365")1836 && stricmp (t, "VAC308")1837 && stricmp (t, "LINK386")1851 && stricmp (t, "WLINK") 1852 && stricmp (t, "VAC365") 1853 && stricmp (t, "VAC308") 1854 && stricmp (t, "LINK386") 1838 1855 ) 1839 1856 fprintf (stderr, "emxomfld: warning: '%s' is an invalid value for EMXOMFLD_TYPE.\n", t); … … 1845 1862 linker_name = t; 1846 1863 if (opt_t) 1847 fprintf (stderr, "*** Linker : %s\n"1848 "*** Linker type: %s\n", linker_name, linker_type);1864 fprintf (stderr, "*** Linker : %s\n" 1865 "*** Linker type: %s\n", linker_name, linker_type); 1849 1866 1850 1867 /* apply object & library hacks */ … … 1857 1874 free (pcur->name); 1858 1875 pcur->name = xstrdup(szname); 1859 fclose (phfile);1876 fclose (phfile); 1860 1877 } 1861 1878 … … 1868 1885 free (pcur->name); 1869 1886 pcur->name = xstrdup(szname); 1870 fclose (phfile);1887 fclose (phfile); 1871 1888 } 1872 1889 … … 1874 1891 1875 1892 if (!def_fname && dll_flag) 1876 gen_deffile ();1893 gen_deffile (); 1877 1894 1878 1895 /* Do the weak prelinking. Important that this is done after make_env(). */ … … 2306 2323 if (rc == 0 && res_fname != NULL) 2307 2324 { 2308 arg_init (TRUE); 2309 put_arg ("rc.exe", TRUE, FALSE); 2310 put_arg ("-n", FALSE, FALSE); 2311 put_arg (res_fname, TRUE, FALSE); 2312 put_arg (output_fname, TRUE, FALSE); 2313 arg_end (); 2314 rc = emxomfld_spawn (command_line, "Resource Linker"); 2315 if (rc < 0) 2316 { 2317 perror ("emxomfld: rc"); 2318 exit (2); 2325 /* EMXOMFLD_RC_TYPE contains RC or WRC if set. If non of these 2326 we assume RC. 2327 EMXOMFLD_RC contains the compiler name and perhaps extra 2328 arguments. If not set we'll use the default compiler, rc.exe. */ 2329 2330 t = getenv ("EMXOMFLD_RC_TYPE"); 2331 if ( t 2332 && stricmp (t, "RC") 2333 && stricmp (t, "WRC")) 2334 fprintf (stderr, "emxomfld: warning: '%s' is an invalid value for EMXOMFLD_RC_TYPE.\n", t); 2335 else if (t) 2336 rc_type = t; 2337 2338 t = getenv ("EMXOMFLD_RC"); 2339 if (t) 2340 rc_name = t; 2341 if (opt_t) 2342 fprintf (stderr, "*** Resource compiler : %s\n" 2343 "*** Resource compiler type: %s\n", rc_name, rc_type); 2344 2345 if (!stricmp (linker_type, "RC")) 2346 { 2347 arg_init (TRUE); 2348 put_arg (rc_name, TRUE, FALSE); 2349 put_arg ("-n", FALSE, FALSE); 2350 put_arg (res_fname, TRUE, FALSE); 2351 put_arg (output_fname, TRUE, FALSE); 2352 arg_end (); 2353 rc = emxomfld_spawn (command_line, "Resource Linker"); 2354 if (rc < 0) 2355 { 2356 perror ("emxomfld: rc"); 2357 exit (2); 2358 } 2359 } 2360 else 2361 { 2362 arg_init (FALSE); 2363 put_arg (rc_name, TRUE, FALSE); 2364 put_arg ("-q", FALSE, FALSE); 2365 put_arg (res_fname, TRUE, FALSE); 2366 put_arg (output_fname, TRUE, FALSE); 2367 arg_end (); 2368 rc = emxomfld_spawn (command_line, "Resource Linker"); 2369 if (rc < 0) 2370 { 2371 perror ("emxomfld: wrc"); 2372 exit (2); 2373 } 2319 2374 } 2320 2375 } -
trunk/emx/src/emxomf/emxomfld.c
r3106 r3288 163 163 var. using any of the values WLINK, VAC365, VAC308 and LINK386. */ 164 164 static const char *linker_type = "WLINK"; 165 166 /* The name of the resource compiler to use. By default, rc is used. 167 This can be overridden with the EMXOMFLD_RC environment variable. */ 168 static const char *rc_name = "rc.exe"; 169 170 /* The type of resource compiler to use. By default we assume it's 171 IBM resource compiler. This can be overridden with the EMXOMFLD_RC_TYPE 172 env. var. using any of the values RC, WRC. */ 173 static const char *rc_type = "RC"; 165 174 166 175 /* Non-zero if emxomfld should automatically convert a.out objects and … … 1526 1535 " linker name or path is not supported. Quotes are not supported either.\n" 1527 1536 "The default values for these two variables are WLINK and wlink.exe.\n", stderr); 1537 fputs (" EMXOMFLD_RC_TYPE:\n" 1538 " The type of resource compiler we're using. Values: RC,WRC.\n" 1539 " RC rc.exe as shipped with OS/2 or found in the Toolkit\n" 1540 " WRC wrc.exe from Open Watcom v1.6 or later.\n", stderr); 1541 fputs (" EMXOMFLD_RC:\n" 1542 " Name of the resource compiler to use and optionally extra parameters.\n" 1543 " Spaces or quotes in the name or path are not supported.\n" 1544 "The default values for these two variables are RC and rc.exe.\n", stderr); 1528 1545 exit (1); 1529 1546 } … … 1832 1849 t = getenv ("EMXOMFLD_TYPE"); 1833 1850 if ( t 1834 && stricmp (t, "WLINK")1835 && stricmp (t, "VAC365")1836 && stricmp (t, "VAC308")1837 && stricmp (t, "LINK386")1851 && stricmp (t, "WLINK") 1852 && stricmp (t, "VAC365") 1853 && stricmp (t, "VAC308") 1854 && stricmp (t, "LINK386") 1838 1855 ) 1839 1856 fprintf (stderr, "emxomfld: warning: '%s' is an invalid value for EMXOMFLD_TYPE.\n", t); … … 1845 1862 linker_name = t; 1846 1863 if (opt_t) 1847 fprintf (stderr, "*** Linker : %s\n"1848 "*** Linker type: %s\n", linker_name, linker_type);1864 fprintf (stderr, "*** Linker : %s\n" 1865 "*** Linker type: %s\n", linker_name, linker_type); 1849 1866 1850 1867 /* apply object & library hacks */ … … 1857 1874 free (pcur->name); 1858 1875 pcur->name = xstrdup(szname); 1859 fclose (phfile);1876 fclose (phfile); 1860 1877 } 1861 1878 … … 1868 1885 free (pcur->name); 1869 1886 pcur->name = xstrdup(szname); 1870 fclose (phfile);1887 fclose (phfile); 1871 1888 } 1872 1889 … … 1874 1891 1875 1892 if (!def_fname && dll_flag) 1876 gen_deffile ();1893 gen_deffile (); 1877 1894 1878 1895 /* Do the weak prelinking. Important that this is done after make_env(). */ … … 2306 2323 if (rc == 0 && res_fname != NULL) 2307 2324 { 2308 arg_init (TRUE); 2309 put_arg ("rc.exe", TRUE, FALSE); 2310 put_arg ("-n", FALSE, FALSE); 2311 put_arg (res_fname, TRUE, FALSE); 2312 put_arg (output_fname, TRUE, FALSE); 2313 arg_end (); 2314 rc = emxomfld_spawn (command_line, "Resource Linker"); 2315 if (rc < 0) 2316 { 2317 perror ("emxomfld: rc"); 2318 exit (2); 2325 /* EMXOMFLD_RC_TYPE contains RC or WRC if set. If non of these 2326 we assume RC. 2327 EMXOMFLD_RC contains the compiler name and perhaps extra 2328 arguments. If not set we'll use the default compiler, rc.exe. */ 2329 2330 t = getenv ("EMXOMFLD_RC_TYPE"); 2331 if ( t 2332 && stricmp (t, "RC") 2333 && stricmp (t, "WRC")) 2334 fprintf (stderr, "emxomfld: warning: '%s' is an invalid value for EMXOMFLD_RC_TYPE.\n", t); 2335 else if (t) 2336 rc_type = t; 2337 2338 t = getenv ("EMXOMFLD_RC"); 2339 if (t) 2340 rc_name = t; 2341 if (opt_t) 2342 fprintf (stderr, "*** Resource compiler : %s\n" 2343 "*** Resource compiler type: %s\n", rc_name, rc_type); 2344 2345 if (!stricmp (linker_type, "RC")) 2346 { 2347 arg_init (TRUE); 2348 put_arg (rc_name, TRUE, FALSE); 2349 put_arg ("-n", FALSE, FALSE); 2350 put_arg (res_fname, TRUE, FALSE); 2351 put_arg (output_fname, TRUE, FALSE); 2352 arg_end (); 2353 rc = emxomfld_spawn (command_line, "Resource Linker"); 2354 if (rc < 0) 2355 { 2356 perror ("emxomfld: rc"); 2357 exit (2); 2358 } 2359 } 2360 else 2361 { 2362 arg_init (FALSE); 2363 put_arg (rc_name, TRUE, FALSE); 2364 put_arg ("-q", FALSE, FALSE); 2365 put_arg (res_fname, TRUE, FALSE); 2366 put_arg (output_fname, TRUE, FALSE); 2367 arg_end (); 2368 rc = emxomfld_spawn (command_line, "Resource Linker"); 2369 if (rc < 0) 2370 { 2371 perror ("emxomfld: wrc"); 2372 exit (2); 2373 } 2319 2374 } 2320 2375 }
Note:
See TracChangeset
for help on using the changeset viewer.