Mail Archives: djgpp/1998/02/02/05:16:38
On Sun, 01 Feb 1998 13:48:55 -0800 in comp.os.msdos.djgpp Rik Blok
<blok AT physics DOT ubc DOT ca> wrote:
: # executables
: ccprog: ccprog.o common.o
: justc: justc.o common.o
: # object files
: ccprog.o: ccprog.cc ccprog.h common.h
: justc.o: justc.c justc.h common.h
: common.o: common.c common.h
The trouble is, as far as Make is concerned the relationship between
ccprog.o and ccprog is just the same as that between justc.o and
justc. There's no (neat) way of making it figure out the difference
between the two. However, it doesn't matter if the C++ libraries are
also offered for linking into the C program, so you could just set one
of the standard variables like this (to link in a few specific
libraries):
LDLIBS = -lstdcxx -lgpp #...
or like this to use gxx instead of gcc all through:
CC = gxx
Put one or both of these at the top of your makefile, and the implicit
rules will use these values instead of the defaults.
--
george DOT foot AT merton DOT oxford DOT ac DOT uk
Remember what happened to the dinosaurs.
- Raw text -