Mail Archives: djgpp/1993/06/21/14:09:34
> I have just started to use djgpp (hours..). There appeared some troubles
> while making makefile :
>
> ****** makefile for Sun GNU **********
>
>
> OBJECTS = clustalv.o amenu.o myers.o sequence.o showpair.o \
> upgma.o util.o trees.o gcgcheck.o
>
> SOURCES = clustalv.c amenu.c myers.c sequence.c showpair.c \
> upgma.c util.c trees.c gcgcheck.c
>
> HEADERS = general.h clustalv.h
>
> CFLAGS = -c
>
> clustalv : $(OBJECTS)
> gcc -o $@ $(OBJECTS) -lm
>
> clustalv.o : clustalv.c $(HEADERS) matrices.h
> gcc $(CFLAGS) clustalv.c
>
> .c.o : $(SOURCES)
> gcc $(CFLAGS) $?
> !!!!!!!!
> ********* end of makefile ***********
>
> ----------------------------------------------------------------------
> Marcin Gierdalski
It is difficult for me to tell exactly what went wrong. I will assume
that you are using DJGPP and GNUish make on MSDOS. If that is true,
you are probably running into one of the limitations of GNUish make.
For reasons known to but a few, GNUish make does not recognise that
".o" is a valid suffix. You must do two things to fix this. First,
you must supply a ".c.o" default rule so that GNUish make knows how to
make a ".o" file from a ".c" file. It appears that your makefile
already does this. But in addition, you must tell GNUish make that
".o" is indeed a valid suffix, by adding a line that looks like:
.SUFFIXES: .o
If you are using GNUish make, this should fix your problem.
--
Eric Backus
ericb AT lsid DOT hp DOT com
(206) 335-2495
- Raw text -