Improving makefile generation for assembly objects
This commit is contained in:
parent
db15264adf
commit
c7d0eaed15
@ -490,11 +490,11 @@ static int _targets_subdirs(Configure * configure, FILE * fp)
|
|||||||
static int _target_objs(Configure * configure, FILE * fp, String * target);
|
static int _target_objs(Configure * configure, FILE * fp, String * target);
|
||||||
static int _target_binary(Configure * configure, FILE * fp, String * target);
|
static int _target_binary(Configure * configure, FILE * fp, String * target);
|
||||||
static int _target_library(Configure * configure, FILE * fp, String * target);
|
static int _target_library(Configure * configure, FILE * fp, String * target);
|
||||||
|
static int _target_object(Configure * configure, FILE * fp, String * target);
|
||||||
static int _targets_target(Configure * configure, FILE * fp, String * target)
|
static int _targets_target(Configure * configure, FILE * fp, String * target)
|
||||||
{
|
{
|
||||||
String * type;
|
String * type;
|
||||||
TargetType tt;
|
TargetType tt;
|
||||||
String * p;
|
|
||||||
|
|
||||||
if((type = config_get(configure->config, target, "type")) == NULL)
|
if((type = config_get(configure->config, target, "type")) == NULL)
|
||||||
{
|
{
|
||||||
@ -510,18 +510,7 @@ static int _targets_target(Configure * configure, FILE * fp, String * target)
|
|||||||
case TT_LIBRARY:
|
case TT_LIBRARY:
|
||||||
return _target_library(configure, fp, target);
|
return _target_library(configure, fp, target);
|
||||||
case TT_OBJECT:
|
case TT_OBJECT:
|
||||||
if((p = config_get(configure->config, target,
|
return _target_object(configure, fp, target);
|
||||||
"sources")) == NULL)
|
|
||||||
{
|
|
||||||
fprintf(stderr, "%s%s%s", "configure: ", target,
|
|
||||||
" no sources for target\n");
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
if(configure->prefs->flags & PREFS_n)
|
|
||||||
return 0;
|
|
||||||
fprintf(fp, "\n%s%s%s%s", target, ": ", p, "\n");
|
|
||||||
/* FIXME */
|
|
||||||
break;
|
|
||||||
case TT_UNKNOWN:
|
case TT_UNKNOWN:
|
||||||
fprintf(stderr, "%s%s%s", "configure: ", target,
|
fprintf(stderr, "%s%s%s", "configure: ", target,
|
||||||
": unknown type for target\n");
|
": unknown type for target\n");
|
||||||
@ -715,6 +704,23 @@ static int _target_library(Configure * configure, FILE * fp, String * target)
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static int _target_object(Configure * configure, FILE * fp, String * target)
|
||||||
|
{
|
||||||
|
String * p;
|
||||||
|
|
||||||
|
if((p = config_get(configure->config, target, "sources")) == NULL)
|
||||||
|
{
|
||||||
|
fprintf(stderr, "%s%s%s", "configure: ", target,
|
||||||
|
" no sources for target\n");
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
if(configure->prefs->flags & PREFS_n)
|
||||||
|
return 0;
|
||||||
|
fprintf(fp, "\n%s%s%s\n%s%s", target, "_OBJS = ", target, target,
|
||||||
|
"_CFLAGS = $(CFLAGSF) $(CFLAGS)\n");
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
static int _objects_target(Configure * configure, FILE * fp, String * target);
|
static int _objects_target(Configure * configure, FILE * fp, String * target);
|
||||||
static int _write_objects(Configure * configure, FILE * fp)
|
static int _write_objects(Configure * configure, FILE * fp)
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user