mirror of
https://github.com/reactos/reactos.git
synced 2026-09-11 12:19:06 +08:00
- Created helper makefile for all targets - Made most makefiles simpler by using the helper makefile - Moved build tools into ./tools Updated installation instructions svn path=/trunk/; revision=2185
56 lines
810 B
C
56 lines
810 B
C
#include <stdio.h>
|
|
#include <stdlib.h>
|
|
#include <string.h>
|
|
|
|
int main(int argc, char* argv[])
|
|
{
|
|
char buf[512];
|
|
char ch;
|
|
unsigned int i;
|
|
char* dot;
|
|
char* prefix;
|
|
FILE* out;
|
|
|
|
if (argc != 3)
|
|
{
|
|
printf("Too few arguments\n");
|
|
return(1);
|
|
}
|
|
|
|
prefix = strdup(argv[1]);
|
|
|
|
out = fopen(argv[2], "wb");
|
|
if (out == NULL)
|
|
{
|
|
printf("Unable to open output file\n");
|
|
return(1);
|
|
}
|
|
|
|
i = 0;
|
|
while ((ch = fgetc(stdin)) != ':' && ch != EOF)
|
|
{
|
|
buf[i] = ch;
|
|
i++;
|
|
}
|
|
buf[i] = 0;
|
|
|
|
if (i == 0)
|
|
{
|
|
return(0);
|
|
}
|
|
|
|
dot = strrchr(buf, '.');
|
|
if (dot != NULL)
|
|
{
|
|
*dot = 0;
|
|
}
|
|
fprintf(out, "%s/.%s.d %s/%s.o:", prefix, buf, prefix,buf);
|
|
|
|
while ((ch = fgetc(stdin)) != EOF)
|
|
{
|
|
fputc(ch, out);
|
|
}
|
|
|
|
return(0);
|
|
}
|