Now creates Makefiles directly and handles correctly libraries
This commit is contained in:
parent
a5a70eebd0
commit
a5db28dafa
@ -42,7 +42,7 @@ static int _configure_config(Config * config)
|
|||||||
FILE * fp;
|
FILE * fp;
|
||||||
int res = 0;
|
int res = 0;
|
||||||
|
|
||||||
if((fp = fopen("Makefile.new", "w")) == NULL)
|
if((fp = fopen("Makefile", "w")) == NULL)
|
||||||
{
|
{
|
||||||
fprintf(stderr, "%s", "configure: ");
|
fprintf(stderr, "%s", "configure: ");
|
||||||
perror("Makefile.new");
|
perror("Makefile.new");
|
||||||
@ -311,10 +311,11 @@ static void _target_link(FILE * fp, Config * config, char * target)
|
|||||||
"_OBJS)\n", "\t$(CC) $(LDFLAGSF) $(LDFLAGS) ",
|
"_OBJS)\n", "\t$(CC) $(LDFLAGSF) $(LDFLAGS) ",
|
||||||
"-o ", target, " $(", target, "_OBJS)\n\n");
|
"-o ", target, " $(", target, "_OBJS)\n\n");
|
||||||
else if(strcmp("library", type) == 0)
|
else if(strcmp("library", type) == 0)
|
||||||
fprintf(fp, "%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s", target,
|
fprintf(fp, "%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s",
|
||||||
".a: $(", target, "_OBJS)\n\t$(AR) ", target,
|
target, ": ", target, ".a ", target, ".so\n",
|
||||||
".a $(", target, "_OBJS)\n\t$(RANLIB) ", target,
|
target, ".a: $(", target, "_OBJS)\n\t$(AR) ",
|
||||||
".a\n\n", target, ".so: $(", target,
|
target, ".a $(", target, "_OBJS)\n\t$(RANLIB) ",
|
||||||
|
target, ".a\n\n", target, ".so: $(", target,
|
||||||
"_OBJS)\n\t$(LD) -o ", target, ".so $(",
|
"_OBJS)\n\t$(LD) -o ", target, ".so $(",
|
||||||
target, "_OBJS)\n\n");
|
target, "_OBJS)\n\n");
|
||||||
else
|
else
|
||||||
|
Loading…
Reference in New Issue
Block a user