*
*/
typedef struct {
+ char const *name; //!< Canonical name for this target.
char const *shell_cmd;
char const *gen_exports;
char const *def2implib_cmd;
static char const *darwin_dynamic_link_function(char const *version_info);
static const target_t target_macos = {
+ .name = "macos",
.shell_cmd = "/bin/sh",
.dynamic_lib_ext = "dylib",
.module_lib_ext = "bundle",
};
static const target_t target_linux_and_bsd = {
+ .name = "linux_and_bsd",
.shell_cmd = "/bin/sh",
.dynamic_lib_ext = "so",
.module_lib_ext = "so",
};
static const target_t target_solaris_gnu = {
+ .name = "solaris_gnu",
.shell_cmd = "/bin/sh",
.dynamic_lib_ext = "so",
.module_lib_ext = "so",
};
static const target_t target_solaris = {
+ .name = "solaris",
.shell_cmd = "/bin/sh",
.dynamic_lib_ext = "so",
.module_lib_ext = "so",
};
static const target_t target_osd_posix = {
+ .name = "osd_posix",
.shell_cmd = "/usr/bin/sh",
.dynamic_lib_ext = "so",
.module_lib_ext = "so",
};
static const target_t target_sinix_mips = {
+ .name = "sinix_mips",
.shell_cmd = "/usr/bin/sh",
.dynamic_lib_ext = "so",
.module_lib_ext = "so",
};
static const target_t target_emx_omf = {
+ .name = "emx_omf",
.shell_cmd = "sh",
.gen_exports = "emxexp",
.def2implib_cmd = "emximp",
};
static const target_t target_emx = {
+ .name = "emx",
.shell_cmd = "sh",
.gen_exports = "emxexp",
.def2implib_cmd = "emximp",
};
static const target_t target_ming32 = {
+ .name = "ming32",
.shell_cmd = "sh",
.dynamic_lib_ext = "dll",
.module_lib_ext = "dll",
};
static const target_t target_emscripten = {
+ .name = "emscripten",
.shell_cmd = "/bin/sh",
.dynamic_lib_ext = "wasm",
.module_lib_ext = "wasm",
* These allow the users to specify a target system when cross-compiling
*/
static const target_map_t target_map[] = {
- TARGET("macos", macos),
- TARGET("linux", linux_and_bsd),
+ TARGET("bsd", linux_and_bsd),
+ TARGET("emscripten", emscripten),
+ TARGET("emx", emx),
+ TARGET("emx-omf", emx_omf),
TARGET("freebsd", linux_and_bsd),
+ TARGET("linux", linux_and_bsd),
+ TARGET("macos", macos),
+ TARGET("darwin", macos),
+ TARGET("ming32", ming32),
TARGET("netbsd", linux_and_bsd),
TARGET("openbsd", linux_and_bsd),
- TARGET("bsd", linux_and_bsd),
- TARGET("solaris-gnuc", solaris_gnu),
- TARGET("solaris", solaris),
TARGET("osd-posix", osd_posix),
TARGET("sinix", sinix_mips),
- TARGET("emx-omf", emx_omf),
- TARGET("emx", emx),
- TARGET("ming32", ming32),
- TARGET("emscripten", emscripten),
+ TARGET("solaris", solaris),
+ TARGET("solaris-gnuc", solaris_gnu),
TARGET("wasm", emscripten),
};
for (p = target_map, end = target_map + (sizeof(target_map) / sizeof(*target_map));
p < end;
p++) {
- ERROR(" %s\n", p->name);
+ ERROR(" %s (%s)\n", p->name, p->target->name);
}
exit(1);
}