Added directive cppflags_force like cflags_force
This commit is contained in:
parent
327b741e5e
commit
ccba63db01
@ -358,16 +358,21 @@ static void _targets_cflags(Configure * configure, FILE * fp)
|
|||||||
String const * cc;
|
String const * cc;
|
||||||
String const * cff;
|
String const * cff;
|
||||||
String const * cf;
|
String const * cf;
|
||||||
|
String const * cppf;
|
||||||
String const * cpp;
|
String const * cpp;
|
||||||
String const * as;
|
String const * as;
|
||||||
String const * asf;
|
String const * asf;
|
||||||
|
|
||||||
|
cppf = config_get(configure->config, "", "cppflags_force");
|
||||||
cpp = config_get(configure->config, "", "cppflags");
|
cpp = config_get(configure->config, "", "cppflags");
|
||||||
cc = config_get(configure->config, "", "cc");
|
cc = config_get(configure->config, "", "cc");
|
||||||
if((cff = config_get(configure->config, "", "cflags_force")) != NULL)
|
if((cff = config_get(configure->config, "", "cflags_force")) != NULL)
|
||||||
{
|
{
|
||||||
fprintf(fp, "%s%s%s", "CC\t= ", cc != NULL ? cc : "cc",
|
fprintf(fp, "%s%s%s", "CC\t= ", cc != NULL ? cc : "cc",
|
||||||
"\nCPPFLAGS=");
|
"\nCPPFLAGSF=");
|
||||||
|
if(cppf != NULL)
|
||||||
|
fprintf(fp, " %s", cppf);
|
||||||
|
fputs("\nCPPFLAGS=", fp);
|
||||||
if(cpp != NULL)
|
if(cpp != NULL)
|
||||||
fprintf(fp, " %s", cpp);
|
fprintf(fp, " %s", cpp);
|
||||||
fprintf(fp, "%s%s", "\nCFLAGSF\t= ", cff);
|
fprintf(fp, "%s%s", "\nCFLAGSF\t= ", cff);
|
||||||
@ -380,7 +385,10 @@ static void _targets_cflags(Configure * configure, FILE * fp)
|
|||||||
if(cff == NULL)
|
if(cff == NULL)
|
||||||
{
|
{
|
||||||
fprintf(fp, "%s%s%s", "CC\t= ", cc != NULL ? cc : "cc",
|
fprintf(fp, "%s%s%s", "CC\t= ", cc != NULL ? cc : "cc",
|
||||||
"\nCPPFLAGS=");
|
"\nCPPFLAGSF=");
|
||||||
|
if(cppf != NULL)
|
||||||
|
fprintf(fp, " %s", cppf);
|
||||||
|
fputs("\nCPPFLAGS=", fp);
|
||||||
if(cpp != NULL)
|
if(cpp != NULL)
|
||||||
fprintf(fp, " %s", cpp);
|
fprintf(fp, " %s", cpp);
|
||||||
fputc('\n', fp);
|
fputc('\n', fp);
|
||||||
@ -772,7 +780,8 @@ static void _flags_asm(Configure * configure, FILE * fp, String const * target)
|
|||||||
{
|
{
|
||||||
String const * p;
|
String const * p;
|
||||||
|
|
||||||
fprintf(fp, "%s%s", target, "_ASFLAGS = $(CPPFLAGS) $(ASFLAGS)");
|
fprintf(fp, "%s%s", target, "_ASFLAGS = $(CPPFLAGSF) $(CPPFLAGS)"
|
||||||
|
" $(ASFLAGS)");
|
||||||
if((p = config_get(configure->config, target, "asflags")) != NULL)
|
if((p = config_get(configure->config, target, "asflags")) != NULL)
|
||||||
fprintf(fp, " %s", p);
|
fprintf(fp, " %s", p);
|
||||||
fputc('\n', fp);
|
fputc('\n', fp);
|
||||||
@ -782,7 +791,7 @@ static void _flags_c(Configure * configure, FILE * fp, String const * target)
|
|||||||
{
|
{
|
||||||
String const * p;
|
String const * p;
|
||||||
|
|
||||||
fprintf(fp, "%s%s", target, "_CFLAGS = $(CPPFLAGS)");
|
fprintf(fp, "%s%s", target, "_CFLAGS = $(CPPFLAGSF) $(CPPFLAGS)");
|
||||||
if((p = config_get(configure->config, target, "cppflags")) != NULL)
|
if((p = config_get(configure->config, target, "cppflags")) != NULL)
|
||||||
fprintf(fp, " %s", p);
|
fprintf(fp, " %s", p);
|
||||||
fprintf(fp, "%s", " $(CFLAGSF) $(CFLAGS)");
|
fprintf(fp, "%s", " $(CFLAGSF) $(CFLAGS)");
|
||||||
@ -854,8 +863,8 @@ static int _target_object(Configure * configure, FILE * fp,
|
|||||||
{
|
{
|
||||||
case OT_ASM_SOURCE:
|
case OT_ASM_SOURCE:
|
||||||
fprintf(fp, "\n%s%s%s\n%s%s", target, "_OBJS = ",
|
fprintf(fp, "\n%s%s%s\n%s%s", target, "_OBJS = ",
|
||||||
target, target, "_ASFLAGS = $(CPPFLAGS)"
|
target, target, "_ASFLAGS ="
|
||||||
" $(ASFLAGS)");
|
" $(CPPFLAGSF) $(CPPFLAGS) $(ASFLAGS)");
|
||||||
if((p = config_get(configure->config, p, "asflags"))
|
if((p = config_get(configure->config, p, "asflags"))
|
||||||
!= NULL)
|
!= NULL)
|
||||||
fprintf(fp, " %s", p);
|
fprintf(fp, " %s", p);
|
||||||
@ -863,8 +872,9 @@ static int _target_object(Configure * configure, FILE * fp,
|
|||||||
break;
|
break;
|
||||||
case OT_C_SOURCE:
|
case OT_C_SOURCE:
|
||||||
fprintf(fp, "\n%s%s%s\n%s%s", target, "_OBJS = ",
|
fprintf(fp, "\n%s%s%s\n%s%s", target, "_OBJS = ",
|
||||||
target, target, "_CFLAGS = $(CPPFLAGS)"
|
target, target, "_CFLAGS ="
|
||||||
" $(CFLAGSF) $(CFLAGS)");
|
" $(CPPFLAGSF) $(CPPFLAGS) $(CFLAGSF)"
|
||||||
|
" $(CFLAGS)");
|
||||||
if((p = config_get(configure->config, p, "cflags"))
|
if((p = config_get(configure->config, p, "cflags"))
|
||||||
!= NULL)
|
!= NULL)
|
||||||
fprintf(fp, " %s", p);
|
fprintf(fp, " %s", p);
|
||||||
@ -874,7 +884,8 @@ static int _target_object(Configure * configure, FILE * fp,
|
|||||||
case OT_CPP_SOURCE:
|
case OT_CPP_SOURCE:
|
||||||
fprintf(fp, "\n%s%s%s\n%s%s", target, "_OBJS = ",
|
fprintf(fp, "\n%s%s%s\n%s%s", target, "_OBJS = ",
|
||||||
target, target, "_CXXFLAGS ="
|
target, target, "_CXXFLAGS ="
|
||||||
" $(CPPFLAGS) $(CXXFLAGS)");
|
" $(CPPFLAGSF) $(CPPFLAGS)"
|
||||||
|
" $(CXXFLAGS)");
|
||||||
if((p = config_get(configure->config, p, "cxxflags"))
|
if((p = config_get(configure->config, p, "cxxflags"))
|
||||||
!= NULL)
|
!= NULL)
|
||||||
fprintf(fp, " %s", p);
|
fprintf(fp, " %s", p);
|
||||||
|
Loading…
Reference in New Issue
Block a user