Click to See Complete Forum and Search --> : how to write makefile
greghua
April 16th, 2005, 04:39 PM
suppose I have a project named Proj, which include to folders, one is Proj1, another is Prjo2;
in Proj1, there are 3 cpp files : p1.cpp, p2.cpp, p3.cpp
in Proj2, there are another 2 files: p4.cpp, p5.cpp, p6.cpp
now I need write makefile to compile the Proj in linux environment. I think each folder there need a makefile, so total 3 makefiles are needed. How to write the makefiles to compile the project? Thanks!
greghua
April 17th, 2005, 10:51 AM
Nodody wants to help?
Then how to link several object file into one object file, rather than an executable file?
suppose I have a project named Proj, which include to folders, one is Proj1, another is Prjo2;
in Proj1, there are 3 cpp files : p1.cpp, p2.cpp, p3.cpp
in Proj2, there are another 2 files: p4.cpp, p5.cpp, p6.cpp
now I need write makefile to compile the Proj in linux environment. I think each folder there need a makefile, so total 3 makefiles are needed. How to write the makefiles to compile the project? Thanks!
YourSurrogateGod
April 17th, 2005, 09:48 PM
I don't know how to write a Makefile myself, but here (http://vertigo.hsrl.rutgers.edu/ug/make_help.html?the_id=80) is a tutorial that I found.
If you can, find an existing Makefile and study it, play around with the different file names and such and see what you get, it will help you learn how to write an actual Makefile.
jawadhashmi
April 17th, 2005, 11:50 PM
I think you sould post you question to www.linuxquestions.org (http://www.linuxquestions.org/questions/index.php?s=)
From there you can get answer of your linux related questions.
codeguru.com
Copyright Internet.com Inc., All Rights Reserved.