Mail Archives: djgpp/2002/05/24/08:45:03
Eli Zaretskii wrote:
...
> Try using GPATH instead of VPATH.
Thank you, Eli.
I tried GPATH: This will build the *.o files (whether they are up to
date or not), but it will never link them (no such file...).
VPATH will only build them when needed, but it won't link.
I even tried both VPATH _and_ GPATH, but I had no luck.
> If that doesn't help either, try using a simpler Makefile:
>
> TARGET = rs.exe
> CC = gpp
> OBJECTS = objs/main.o objs/cstring.o objs/config.o objs/data.o
>
> $(TARGET) : $(OBJECTS)
> $(CC) $(OBJECTS) $(LDFLAGS) -o $(TARGET)
>
> objs/%.o : %.cpp
> $(CC) $< $(WARNINGS) $(CXXFLAGS) -c -o objs/$@
OK, now we're getting somewhere. I had tried something similar, but
wasn't smart enough to change the rule
%.o : %.cpp to
objs/%.o : %.cpp
I had to change -o objs/$@ to the old -o $@ in the last line because
the assembler tried to create, e.g., objs/objs/main.o
But now it is finally working! It might not be the most elegant
solution under the sun. But my project isn't that big, so I guess it
is worth the effort.
Again: Thank you!
Regards,
Manni
- Raw text -