Hi,
I'm very new to Makefiles and I need some help...
I have a C++ program with 3 directories (A, B, and C). I want to create a Makefile in each directory where it will only compile files in that directory. One of the problems is that files in A
#include header files in B and C and those files either don't compile yet or the compiler tells me that FileInB.h doesn't exist...
I want to create a Makefile to compile FileInA who's header looks like this:
Code:
#ifndef FILEINA
#define FILEINA
#include "FileInB.h"
class FileInA {
// some functions
}
#endif
The Makefile in A is simply this (don't laugh...):
Code:
all:
g++ FileInA.cpp
When I run
make in the A directory, I get:
"FileInB.h: No such file exists"
It sounds like I need to set the path to FileInB.h in A's Makefile, right? How would I do that and would it let me compile without compiling anything in B or C?
I really appreciate any help anyone can offer.
Thanks