Mail Archives: djgpp/1997/02/21/06:14:59
steve wilcox (stewilcox AT slicksoft DOT demon DOT co DOT uk) wrote:
: can someone tell me how to make a makefile so i can just compile and
: link 1 cc file and link with allegro library ?
If you're only linking one file, you can just use:
gxx -o foo.exe -Wall -O2 -c foo.cc -lalleg
In a makefile, you could write:
all : foo.exe
foo.exe : foo.o
gxx -o foo.exe foo.o -lalleg
foo.o : foo.cc foo1.h foo2.h (etc)
gcc -Wall -O2 -c foo.cc
where foo1.h, foo2.h, ... are any included files which might change as your
project develops. You don't need to put standard include files like stdio.h in
here - they won't be altered.
--
George Foot <gfoot AT mc31 DOT merton DOT ox DOT ac DOT uk>
Merton College, Oxford.
- Raw text -