Also detect the extension for executables
This commit is contained in:
parent
b631f7825c
commit
630e584e65
@ -281,6 +281,7 @@ static HostKernel _detect_kernel(HostOS os, char const * release)
|
|||||||
|
|
||||||
static void _configure_detect_extensions(Configure * configure)
|
static void _configure_detect_extensions(Configure * configure)
|
||||||
{
|
{
|
||||||
|
configure->extensions.exeext = "";
|
||||||
configure->extensions.soext = ".so";
|
configure->extensions.soext = ".so";
|
||||||
/* platform-specific */
|
/* platform-specific */
|
||||||
switch(configure->os)
|
switch(configure->os)
|
||||||
@ -289,6 +290,7 @@ static void _configure_detect_extensions(Configure * configure)
|
|||||||
configure->extensions.soext = ".dylib";
|
configure->extensions.soext = ".dylib";
|
||||||
break;
|
break;
|
||||||
case HO_WIN32:
|
case HO_WIN32:
|
||||||
|
configure->extensions.exeext = ".exe";
|
||||||
configure->extensions.soext = ".dll";
|
configure->extensions.soext = ".dll";
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
@ -454,6 +456,13 @@ String const * configure_get_config(Configure * configure,
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/* configure_get_exeext */
|
||||||
|
String const * configure_get_exeext(Configure * configure)
|
||||||
|
{
|
||||||
|
return configure->extensions.exeext;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/* configure_get_soext */
|
/* configure_get_soext */
|
||||||
String const * configure_get_soext(Configure * configure)
|
String const * configure_get_soext(Configure * configure)
|
||||||
{
|
{
|
||||||
|
@ -149,6 +149,7 @@ typedef struct _Configure
|
|||||||
HostKernel kernel;
|
HostKernel kernel;
|
||||||
struct
|
struct
|
||||||
{
|
{
|
||||||
|
char const * exeext;
|
||||||
char const * soext;
|
char const * soext;
|
||||||
} extensions;
|
} extensions;
|
||||||
struct
|
struct
|
||||||
@ -177,6 +178,7 @@ int configure_can_library_static(Configure * configure);
|
|||||||
|
|
||||||
String const * configure_get_config(Configure * configure,
|
String const * configure_get_config(Configure * configure,
|
||||||
String const * section, String const * variable);
|
String const * section, String const * variable);
|
||||||
|
String const * configure_get_exeext(Configure * configure);
|
||||||
String const * configure_get_soext(Configure * configure);
|
String const * configure_get_soext(Configure * configure);
|
||||||
|
|
||||||
/* useful */
|
/* useful */
|
||||||
|
@ -641,7 +641,8 @@ static void _targets_cxxflags(Configure * configure, FILE * fp)
|
|||||||
static void _targets_exeext(Configure * configure, FILE * fp)
|
static void _targets_exeext(Configure * configure, FILE * fp)
|
||||||
{
|
{
|
||||||
if(configure->os == HO_WIN32)
|
if(configure->os == HO_WIN32)
|
||||||
_makefile_print(fp, "%s", "EXEEXT\t= .exe\n");
|
_makefile_output_variable(fp, "EXEEXT",
|
||||||
|
configure_get_exeext(configure));
|
||||||
}
|
}
|
||||||
|
|
||||||
static void _targets_ldflags(Configure * configure, FILE * fp)
|
static void _targets_ldflags(Configure * configure, FILE * fp)
|
||||||
|
Loading…
Reference in New Issue
Block a user