further work on portability; still need to handle _main and _cmdline .c and .o generation