Trouble creating a makefile
Posted
by catia
on Stack Overflow
See other posts from Stack Overflow
or by catia
Published on 2010-04-13T17:46:00Z
Indexed on
2010/04/13
17:52 UTC
Read the original article
Hit count: 219
Hi everyone!
I'm having some trouble making a Makefile. Write now I just compile everything every time. Although, the professor is ok with that, I do want to get it working faster and to avoid unnecessary compiling.
Here's what I have.
FILES= p6.cpp SetIter.cpp Node.cpp Set.cpp
CFLAGS= -ansi -pendantic -Wall -Wextra
CC= g++
MakePg6: p6.cpp SetIter.cpp Node.cpp Set.cpp
$(CC) $(CFLAGS) $(FILES) -o pg6
Node.cpp - node class
Set.cpp - uses nodes. Friend of Node.
SetIter.cpp - gets a set and uses a pointer to iterator through
I'm confused with some of the depencies arising from the friends thing and the point of lib.o being included in the Makefile as some sites have.
Any help is greatly appreciated. Thanks in advance.
© Stack Overflow or respective owner