how to write a makefile?

J

Jack Klein

any tutorial for it?
thanks a lot!

Makefiles are not part of, or defined by, the C language, and so are
off-topic here. In fact makefiles are not really part of any
programming language, and can be used for automating tasks that have
nothing at all to do with writing a program.

Furthermore, unlike the case with C, there is no standard makefile
language, and makefiles that do the same thing with different make
utilities and different compilers on different operating systems will
almost certainly be significantly different.

Since you mentioned Linux in an earlier post, you need to ask about
this in where the Linux
programmers hang out.
 
G

Gregory Pietsch

QQ said:
any tutorial for it?
thanks a lot!

<OT for comp.lang.c>

Rather than hand-hacking a makefile, it's a lot easier just to use
autoconf, automake, and libtool for makefile creation. Besides, you can
get a configure script out of it for portability as well.

</OT>
 
D

Dave Thompson

Makefiles are not part of, or defined by, the C language, and so are
off-topic here. In fact makefiles are not really part of any
programming language, and can be used for automating tasks that have
nothing at all to do with writing a program.
Right. (And conversely are not the only way of managing compiles.)
Furthermore, unlike the case with C, there is no standard makefile
language, and makefiles that do the same thing with different make
utilities and different compilers on different operating systems will
almost certainly be significantly different.
There is a SUS/POSIX standard for make; and there is enough
commonality among most 'traditional' Unix and Unix-style makes
especially with modest external configuration, that I would differ
with 'certainly ... significantly'; I would make it 'will often be
different sometimes significantly so'.

<snip good redirect>

- David.Thompson1 at worldnet.att.net
 
T

Tim Prince

Dave Thompson said:
<snip>
There is a SUS/POSIX standard for make; and there is enough
commonality among most 'traditional' Unix and Unix-style makes
especially with modest external configuration, that I would differ
with 'certainly ... significantly'; I would make it 'will often be
different sometimes significantly so'.
You have no obligation to use the most non-standard version of make
available on your system, when gnu make is available. Adding rules to
change file name suffixes may make a "significant" difference, but that
problem is traditionally ignored as off topic on all newsgroups.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,009
Latest member
GidgetGamb

Latest Threads

Top