Mail Archives: djgpp/1996/09/22/17:13:25
Hi, (subject: write a generic makefile)
I've downloaded the DJGPP software recently. I am a former Borland C++
user, who's used to projects instead of makefiles. The beauty of
Borlands project files is that the only thing you have to tell
the compiler is the sources and external objs and libs you're using.
It figures out all depedencies (rules etc.) by itself, even from nested
header files. (of course it has drawbacks too).
I've tried to write a makefile that does the following:
- take all *.cpp and *.c and *.asm files in a given directory (yes,
all!)
- take some named .cpp .c and .asm files
- compile them, when they need to be compiled (ie. when header files and
the
source itself are changed)
- compile the whole thing into an archive (or executable), add some libs
and objs to it (ehh, I mean .a and .o files)
But man, this seems not straightforward for a non-unix programmer. Is
here
someone who has written such a (generic) makefile, and who wants to
share it
with me (and all newbies that read this newsgroup) ? I'd be glad to
hear.
Richard van Paasen.
- Raw text -