problem with make suffix rules

A.V. Raman ARaman at massey.ac.nz
Tue Jul 17 15:47:58 AEST 1990


I've got a Makefile that says:

.SUFFIXES:
.SUFFIXES: .o .c
.o:
	cc -o $@ $< misc.a
.c.o:
	cc -c $<

In the ucb universe,
When I say
`make program' for example,

make says
"Don't know how to make program"

Shouldn't it try to apply the second suffix rule to generate program.o and
then the first one to generate program from program.o ?

In the att universe,
make tries
	cc -O program.c -o program
instead of
	cc -c program.c
which is what the suffix rule tells it to do.

What's more, when I don't have a Makefile at all, and type
`make program' (ucb)
make doesn't apply the default suffix rule to run
cc program.c -o program
Instead, it comes up with the same message as before.

Thanks for any help on where I'm goofing.

- & (Anand)



More information about the Comp.unix.questions mailing list