depend:
$(C++) -M ${INCLUDE} ${DEFINES} ${SRC} > makedep
echo '/^# DO NOT DELETE THIS LINE/+1,$$d' >eddep
echo '$$r makedep' >>eddep
echo 'w' >>eddep
cp Makefile Makefile.bak
ed - Makefile < eddep
rm eddep makedep
DO NOT DELETE THIS LINE -- make depend uses it
main.o : main.C clock.H
clock.o : clock.H
How do I attach code here for you to review ??
I do not know how to get all of this working in the Dev c++ compiler.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Anonymous
-
2007-11-03
The make file you have looks like it may ave been intended for a Linux target. You can use 'foriegn' make files with Dev-C+, but this may not work without some effort (because of Linux command s such as cp and rm for example). However this make file is very trivial and has no special build steps that Dev-C++ cannot do for itself. I would abandon the makefile and just use Dev-C++'s project management feature - this will generate and execute a new make file for you.
Steps:
1) File->New->Project...
2) Select the "Empty Project" template.
3) Enter a name for the project (sampleProg3 in your makefile)
4) Select "C++ Project"
5) Click OK
6) Save the project somewhere (not in c:\dev-cpp or below, and nowhere with a path containing spaces - not the Desktop or My Documents).
7) Use Project->Add to project... to add main.C and clock.C to your project.
8) Execute->Compile
9) If compilation was successful Execute->Run
10) In compilation was not successful, and you cannot fix it yourself post the "Compile Log" text.
>>How do I attach code here for you to review ??
Unfortunately you have to paste it directly into the forum and we have to cope with the fact that the HTML rendering removes all th indentation! So generally keep it short!
Do ensure you have read the "PLEASE READ BEFORE POSTING A QUESTION" thread. If you post a question answered there, or fail to post in the manner directed there you are likely to get mercilessly flamed.
Clifford
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi All,
I have a program to simulate the Book Keeping of a parking lot.
It has a make file which looks like this
C++ = c++
OPTIONS = -g
.SUFFIXES: .o .C
LIBPATH = path here
INCLUDES = path here
.C.o:
$(C++) $(CCFLAGS) $(INCLUDES) $(OPTCCFLAGS) -c $<
.cc.o:
$(C++) $(CCFLAGS) $(INCLUDES) $(OPTCCFLAGS) -c $<
SRC= main.C clock.C
OBJ= main.o $(LIBPATH)/clock.o
teststrings: $(OBJ)
$(C++) $(OPTIONS) $(INCLUDES) -o sampleProg3 $(OBJ)
clean:
rm -f sampleProg3 a.out *.o core
depend:
$(C++) -M ${INCLUDE} ${DEFINES} ${SRC} > makedep
echo '/^# DO NOT DELETE THIS LINE/+1,$$d' >eddep
echo '$$r makedep' >>eddep
echo 'w' >>eddep
cp Makefile Makefile.bak
ed - Makefile < eddep
rm eddep makedep
DO NOT DELETE THIS LINE -- make depend uses it
main.o : main.C clock.H
clock.o : clock.H
How do I attach code here for you to review ??
I do not know how to get all of this working in the Dev c++ compiler.
The make file you have looks like it may ave been intended for a Linux target. You can use 'foriegn' make files with Dev-C+, but this may not work without some effort (because of Linux command s such as cp and rm for example). However this make file is very trivial and has no special build steps that Dev-C++ cannot do for itself. I would abandon the makefile and just use Dev-C++'s project management feature - this will generate and execute a new make file for you.
Steps:
1) File->New->Project...
2) Select the "Empty Project" template.
3) Enter a name for the project (sampleProg3 in your makefile)
4) Select "C++ Project"
5) Click OK
6) Save the project somewhere (not in c:\dev-cpp or below, and nowhere with a path containing spaces - not the Desktop or My Documents).
7) Use Project->Add to project... to add main.C and clock.C to your project.
8) Execute->Compile
9) If compilation was successful Execute->Run
10) In compilation was not successful, and you cannot fix it yourself post the "Compile Log" text.
>>How do I attach code here for you to review ??
Unfortunately you have to paste it directly into the forum and we have to cope with the fact that the HTML rendering removes all th indentation! So generally keep it short!
Do ensure you have read the "PLEASE READ BEFORE POSTING A QUESTION" thread. If you post a question answered there, or fail to post in the manner directed there you are likely to get mercilessly flamed.
Clifford