M
Max
I know this isn't directly related to C++, but thought I'd ask anyway.
I've already read about 10 tutorials on makefiles, still have this
problem and hoping someone here could help me out. I'm creating a
project for my C++ class, it'll be tested on a UNIX system with cxx
compiler. Bellow I've pasted my current makefile for it:
------------------------------------------------------------------------
p1 : main.o DataManager.o EventList.o Event.o NameList.o Name.o
cxx -w0 -std strict_ansi main.o DataManager.o EventList.o Event.o
NameList.o Name.o -o p1
main.o : main.cpp DataManager.h Event.h Name.h
cxx -w0 -std srtict_ansi -c main.cpp
DataManager.o : DataManager.cpp DataManager.h Event.h Name.h EventList.h
cxx -w0 -std srtict_ansi -c DataManager.cpp
EventList.o : EventList.cpp EventList.h Event.h
cxx -w0 -std srtict_ansi -c EventList.cpp
Event.o : Event.cpp Event.h NameList.h
cxx -w0 -std srtict_ansi -c Event.cpp
NameList.o : NameList.cpp NameList.h Name.h
cxx -w0 -std srtict_ansi -c NameList.cpp
Name.o : Name.cpp Name.h
cxx -w0 -std srtict_ansi -c Name.cpp
------------------------------------------------------------------------
(By the way, if the tabs don't stay, just know that they are there at
every cxx line). So the way this works is, Name is no dependant on
anything, NameList is dependant on Name, Event is dependant on NameList,
and so on towards the top.
The problem that I'm having is that when I run make, I get an error
message saying that it doesn't know how to make Name.h. Basically it
takes the last dependency of the second label and gives me that error
message. This seems a little strange since I'm listing Name.h as a
dependency, not trying to make it. Any insight on what I'm doing wrong?
Never used makefiles before, so I'm sure there has to be something...
Thanks for any help.
I've already read about 10 tutorials on makefiles, still have this
problem and hoping someone here could help me out. I'm creating a
project for my C++ class, it'll be tested on a UNIX system with cxx
compiler. Bellow I've pasted my current makefile for it:
------------------------------------------------------------------------
p1 : main.o DataManager.o EventList.o Event.o NameList.o Name.o
cxx -w0 -std strict_ansi main.o DataManager.o EventList.o Event.o
NameList.o Name.o -o p1
main.o : main.cpp DataManager.h Event.h Name.h
cxx -w0 -std srtict_ansi -c main.cpp
DataManager.o : DataManager.cpp DataManager.h Event.h Name.h EventList.h
cxx -w0 -std srtict_ansi -c DataManager.cpp
EventList.o : EventList.cpp EventList.h Event.h
cxx -w0 -std srtict_ansi -c EventList.cpp
Event.o : Event.cpp Event.h NameList.h
cxx -w0 -std srtict_ansi -c Event.cpp
NameList.o : NameList.cpp NameList.h Name.h
cxx -w0 -std srtict_ansi -c NameList.cpp
Name.o : Name.cpp Name.h
cxx -w0 -std srtict_ansi -c Name.cpp
------------------------------------------------------------------------
(By the way, if the tabs don't stay, just know that they are there at
every cxx line). So the way this works is, Name is no dependant on
anything, NameList is dependant on Name, Event is dependant on NameList,
and so on towards the top.
The problem that I'm having is that when I run make, I get an error
message saying that it doesn't know how to make Name.h. Basically it
takes the last dependency of the second label and gives me that error
message. This seems a little strange since I'm listing Name.h as a
dependency, not trying to make it. Any insight on what I'm doing wrong?
Never used makefiles before, so I'm sure there has to be something...
Thanks for any help.