bug in SCO UNIX makefiles ?

Andrew Davidson aed at netcom.UUCP
Tue Jan 1 09:43:19 AEST 1991


hi
I was wondering if someone has any idea how to fix this make file. I am working
in C++. As a result I have decide to use .cc and .hh as the sufixes for my 
files so that I would not confuse them with reqular C code. This make file work
correctly on a SUN work stations, but does not work on SCO UNIX
here is the output from the make file

	% make

        g++ -o coinTest -g coin.o test1.o -lg++ -lm
	ld fatal: Can't read 1st word of file coin.o
	*** Error code 1

	Stop.

it appears that it never finds the production rule
.cc.o:. (there are no *.o files in this directory)

here is the makefile

CC= 	g++
OBJS=	coin.o test1.o
SRCS = coin.cc test1.cc
LIBS= 	-lg++ -lm
INCLUDE= -I/usr/local/lib/g++-include

.cc.o: 
	$(CC) -c -g $<

coinTest : $(OBJS) coin.hh genericlt.hh
	$(CC) -o $@ -g $(OBJS) $(LIBS)

clean :
	rm -f coinTest *.o


#
# notes
#

#
#  $@ the name of the current target
#

#
# $< the name of a dependency file, derived as if selected
# for use with an implicit rule
#

depend : 
	makedepend -- $(CFLAGS) -- $(INCLUDE) -- $(SRCS)
# DO NOT DELETE THIS LINE -- make depend depends on it.

coin.o: /usr/local/lib/g++-include/stream.h
coin.o: /usr/local/lib/g++-include/ostream.h
coin.o: /usr/local/lib/g++-include/File.h
coin.o: /usr/local/lib/g++-include/builtin.h
coin.o: /usr/local/lib/g++-include/stddef.h /usr/local/lib/g++-include/std.h
coin.o: /usr/local/lib/g++-include/stdio.h /usr/local/lib/g++-include/math.h
coin.o: /usr/local/lib/g++-include/values.h
coin.o: /usr/local/lib/g++-include/streambuf.h
coin.o: /usr/local/lib/g++-include/istream.h coin.hh
test1.o: /usr/local/lib/g++-include/stream.h
test1.o: /usr/local/lib/g++-include/ostream.h
test1.o: /usr/local/lib/g++-include/File.h
test1.o: /usr/local/lib/g++-include/builtin.h
test1.o: /usr/local/lib/g++-include/stddef.h /usr/local/lib/g++-include/std.h
test1.o: /usr/local/lib/g++-include/stdio.h /usr/local/lib/g++-include/math.h
test1.o: /usr/local/lib/g++-include/values.h
test1.o: /usr/local/lib/g++-include/streambuf.h
test1.o: /usr/local/lib/g++-include/istream.h coin.hh genericlt.hh
test1.o: /usr/local/lib/g++-include/generic.h

thanks Andy

-- 
-----------------------------------------------------------------
                  "bede-bede-bede Thats all Folks"
				Porky Pig
Andy Davidson
Woodside CA.
aed at netcom
-----------------------------------------------------------------



More information about the Comp.unix.sysv386 mailing list