Because (g)make has many non-intuitive aspects, e.g. its backward chaining, I'd highly recommend having a look at Robert Mecklenburg's book Managing Projects with GNU Make.
You need the substitution there, try something like:
set makeprg=gmake\ %:r.o
Oh, this assumes that you've got:
a (M|m)akefile in the directory, or
default SUFFIX rules are available for your environment (which it looks like there aren't)
Check for the default by entering:
make -n <my_file>.o
and see if that gives you something sensible.
If there is a makefile in another location you can add the -f option to point at the makefile, for example:
set makeprg=gmake\ -f\ ../some_other_dir/makefile\ %:r.o
BTW For learning about make, and especially gmake, I'd suggest having a look at the excellent book "Managing Projects with GNU Make" (sanitised Amazon link).
For learning about make, and especially gmake, I'd suggest having a look at the excellent book "Managing Projects with GNU Make" (sanitised Amazon link).
Because (g)make has many non-intuitive aspects, e.g. its backward chaining, I'd highly recommend having a look at Robert Mecklenburg's book Managing Projects with GNU Make.
Or even better is Andrew Talbot's Managing Projects with Make (second edition), which I feel has the better introduction to make. (IMHO naturally).
You need the substitution there, try something like:
Oh, this assumes that you've got:
Check for the default by entering:
and see if that gives you something sensible.
If there is a makefile in another location you can add the -f option to point at the makefile, for example:
BTW For learning about make, and especially gmake, I'd suggest having a look at the excellent book "Managing Projects with GNU Make" (sanitised Amazon link).
HTH.
cheers
For learning about make, and especially gmake, I'd suggest having a look at the excellent book "Managing Projects with GNU Make" (sanitised Amazon link).
HTH.
cheers,