Mail Archives: djgpp/2001/12/19/22:28:13
http://www.delorie.com/djgpp/doc/ug/larger/makefiles.html
http://www.delorie.com/gnu/docs/make/make_toc.html
You shouldn't need to worry about the shell until you get into more
complex Makefiles. I suggest avoiding that until you get the hang of
simple Makefiles. DJGPP's make is quite capable of supporting the
command.com syntax as well as emulating a number of simpler shell-isms
internally. But, the commands you use in a Makefile should be no
different than the ones you'd use in a batch file. Make's job is
primarily to decide *which* commands to run, not to make the commands
more complex.
http://www.delorie.com/gnu/docs/make/make_16.html talks about
automatic dependency generation, but that's more robust (and complex)
than most need. For simple DJGPP Makefiles, just add -MMD to your gcc
options, and put this at the end of your Makefile:
DEPS=$(wildcard *.d)
ifneq ($(DEPS),)
include $(DEPS)
endif
And it's best to be simple anyway :-)
You're not at a disadvantage by not knowing unix (well, posix). There
are a few traditional things (like using dashes for command-line
options, and that they preceed other non-options) but you'll pick
those up quickly enough.
- Raw text -